Repository navigation
Description
No MCP tool can count events for performance or other generic issues (N+1 queries, slow DB queries, etc.) over a fixed time window. Callers fall back to search_errors or search_traces, and both give an empty or failed answer.
From user feedback MCP-SERVER-GQH (2026-11-15, Linear's agent, server 0.42.0). MCP-SERVER-GP2 (2026-11-12, also Linear's agent, a different user) reported the same gap as a side note.
What happened
The caller wanted exact per-issue event counts in [start, end) for a list of issues, some of them performance issues.
get_sentry_resourceresolved the issues fine.search_errorswithissue.id:[…] timestamp:>=… timestamp:<…andfields=["issue.id","count()"]ran ondataset=errorswith the absolute window kept (traces2f32e101,52dc19b9). It returned counts for some IDs and no rows for the rest (9 of 9 in the second call). That is expected for performance issues: the errors dataset has no performance/generic occurrences.search_traceswithissue.id:7833063087inside a prose request failed validation withINVALID issue.id — Unknown attribute(tracec13c8fc3). Spans don't carry the issue ID, so a clean query can't do this either. The prose part of that call is the toolkit#2263 pattern; commented there separately.search_issue_eventslists events for one issue, but it has nocount(), caps at 100 events, and has no cursor (toolkit#2143), so it can't give an exact count.
Cause
PUBLIC_EVENTS_DATASETSisspans, errors, logs, metrics, profiles(packages/mcp-core/src/utils/events-datasets.ts:1-7at cfd76ae). No search tool reaches the issue platform dataset.- Sentry's events endpoint already supports it:
DATASET_OPTIONS["issuePlatform"]in getsentry/sentrysrc/sentry/snuba/utils.py:48(0af5f8184). Checked live:GET /api/0/organizations/{org}/events/?dataset=issuePlatform&field=issue.id&field=count()&sort=-count()returns 200 with per-issue counts. The same map also has anoccurrencestrace item type (EAP), which may be the longer-term target.
Options
- Let
search_issue_events(orsearch_issues) return an exactcount()for one or more issues over an absolutestart/end, backed bydataset=issuePlatformfor non-error issues anderrorsfor error issues. - Or let the
search_errorsrunner switch toissuePlatformwhen theissue.idfilters point at non-error issues, and say so in the result. - At minimum: when
search_errorsgetsissue.idfilters and returns no rows, add a note that performance/generic issue events are not in the errors dataset, and name the tool that can count them.
Reports
2: MCP-SERVER-GQH, MCP-SERVER-GP2 (part 3).
Not checked: the type of every issue in the caller's list (I relied on the caller's own query text), and start/end on dataset=issuePlatform (only statsPeriod was tried live).
via automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_bbbfefbbb6caae96f29cedd9ba376bcf.
--
Activity
linear-code commentedon Nov 15, 2026
MCP-1235