Skip to content

feat(tools): Add find_dropped_events tool for the events-dropped endpoint - #1410

Open
manessaraj wants to merge 4 commits into
mainfrom
sarajmanes/dain-1863-mcp-dropped-events-tool
Open

manessaraj wants to merge 4 commits into
mainfrom
sarajmanes/dain-1863-mcp-dropped-events-tool

Conversation

@manessaraj

@manessaraj manessaraj commented Oct 5, 2026 •

Copy link
Copy Markdown

Adds a find_dropped_events tool that exposes Sentry's dedicated events-dropped endpoint to agents. It returns ground-truth data-fidelity information — what Sentry received but dropped (rate limited, over quota, filtered, invalid, abuse/spike protection, client-discarded via sample_rate/before_send, cardinality limited) — bucketed over time, plus the accepted volume per bucket so a caller can compute the dropped share.

Refs DAIN-1863

@linear-code

linear-code Bot commented Oct 5, 2026

Copy link
Copy Markdown

DAIN-1863

@manessaraj
manessaraj force-pushed the sarajmanes/dain-1863-mcp-dropped-events-tool branch from 46bd05f to 556cbc5 Compare October 5, 2026 16:11
@manessaraj
manessaraj marked this pull request as ready for review October 5, 2026 19:35
…oint

Exposes Sentry's dedicated events-dropped endpoint to agents as a new
find_dropped_events tool: ground-truth data-fidelity information (what Sentry
received but dropped, and why) bucketed over time, alongside accepted volume
so a caller can compute the dropped share.

Surfaced directly (same tier as search_events) since an agent debugging a
flat/spiky/low chart should be able to reach it without discovery.

- api-client: getDroppedEvents() + DroppedEvents response schemas
- tool: find_dropped_events (datasets: spans, logs, metrics)
- registered in the catalog + direct surface; regenerated definitions

Backed by an agent eval: naive agents given a user-phrased question reliably
discovered and called this tool, and attributed flat/spiky charts to the right
drop reason — where the same agents without it concluded "nothing is broken."

Refs DAIN-1863
Remove doc comments that restated project framing / dev decisions rather than
explaining non-obvious code. Matches the surrounding file convention, where
sibling schemas, client methods, and tools carry no such comments. The
caller-facing tool description and param descriptions are unchanged.

Refs DAIN-1863
Three targeted edits to the tool description, keeping the tested structure:
- Lead with what the tool captures (dropped before storage), not "received"
  — SDK-side drops (sample_rate, before_send) never reach Sentry.
- Frame charts as one example of an accepted-only view, not the purpose; the
  tool's role is ground-truth data fidelity: is the data in Sentry or dropped.
- Reframe the trust bullet around confirming data is actually in Sentry before
  relying on a query, aggregate, or dashboard.

Regenerated tool/skill definitions.

Refs DAIN-1863
Adding find_dropped_events to TOP_LEVEL_TOOL_NAMES changes the exact direct
tool set these guardrail tests assert, so add it to DEFAULT_DIRECT_TOOL_NAMES.
The catalog-search test queried 'event stacktrace' at limit 5; find_dropped_events
now ranks there (its name contains 'events'), so raise the limit to 8 to keep
asserting that catalog-only tools remain findable via search.

Refs DAIN-1863
@manessaraj
manessaraj force-pushed the sarajmanes/dain-1863-mcp-dropped-events-tool branch from 7eb699a to 143768d Compare October 5, 2026 20:04
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Oct 5, 2026

This branch was successfully deployed

No deployments
Actions — 143768d0 Deployed Oct 5, 2026 by manessaraj via eval #1217
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant