Summary
Since 0.37.0, search_events calls GET /api/0/organizations/{org}/events/validate/ before every events query (#1105, #1113). Our self-hosted Sentry 25.7.0 answers 404 on that endpoint. The tool treats the 404 as a fatal error, so search_events fails on every call, even though the events query itself would succeed.
Environment
@sentry/mcp-server 0.42.0, stdio
- Self-hosted Sentry 25.7.0 (build
0ce69559)
- Flags:
--host=<self-hosted host> --organization-slug=<org> --project-slug=<project> --skills=inspect,triage
- User auth token with
event:read, project:read, org:read, alerts:read
Steps to reproduce
- Start the server with the flags above against a self-hosted Sentry 25.7.0.
- Call
search_events with dataset: "errors", query: "level:error", statsPeriod: "24h".
Expected
The tool returns the matching error events.
Actual
API error (404): API request failed: Not Found
What we checked
With the same token, directly against the API:
| Request |
Status |
GET /organizations/{org}/events/validate/?project=<id>&dataset=errors&field=title |
404 |
GET /organizations/{org}/events/?project=<id>&dataset=errors&field=title&field=count() |
200 |
GET /organizations/{org}/events/?...&dataset=discover |
200 |
GET /organizations/{org}/events/?...&dataset=spans |
200 |
GET /organizations/{org}/events/?...&dataset=ourlogs |
200 |
search_issues and get_sentry_resource work on 0.42.0. On 0.36.0, the last version without the validate call, search_events returns results against the same instance with the same flags. We pinned 0.36.0 as a workaround.
Suggestion
When /events/validate/ answers 404, skip validation and run the events query, maybe with a warning in the tool output. A 404 there most likely means that the server does not have the endpoint, and not that the query is invalid.
If the maintainers prefer not to fall back: which Sentry version is the minimum for search_events? A version check or a note in the self-hosted docs would help.
Related
Summary
Since 0.37.0,
search_eventscallsGET /api/0/organizations/{org}/events/validate/before every events query (#1105, #1113). Our self-hosted Sentry 25.7.0 answers 404 on that endpoint. The tool treats the 404 as a fatal error, sosearch_eventsfails on every call, even though the events query itself would succeed.Environment
@sentry/mcp-server0.42.0, stdio0ce69559)--host=<self-hosted host> --organization-slug=<org> --project-slug=<project> --skills=inspect,triageevent:read,project:read,org:read,alerts:readSteps to reproduce
search_eventswithdataset: "errors",query: "level:error",statsPeriod: "24h".Expected
The tool returns the matching error events.
Actual
What we checked
With the same token, directly against the API:
GET /organizations/{org}/events/validate/?project=<id>&dataset=errors&field=titleGET /organizations/{org}/events/?project=<id>&dataset=errors&field=title&field=count()GET /organizations/{org}/events/?...&dataset=discoverGET /organizations/{org}/events/?...&dataset=spansGET /organizations/{org}/events/?...&dataset=ourlogssearch_issuesandget_sentry_resourcework on 0.42.0. On 0.36.0, the last version without the validate call,search_eventsreturns results against the same instance with the same flags. We pinned 0.36.0 as a workaround.Suggestion
When
/events/validate/answers 404, skip validation and run the events query, maybe with a warning in the tool output. A 404 there most likely means that the server does not have the endpoint, and not that the query is invalid.If the maintainers prefer not to fall back: which Sentry version is the minimum for
search_events? A version check or a note in the self-hosted docs would help.Related
validateEvents. This report is about a 404.search_eventson the hosted server. That may be a different cause.