feat(monitors): Add monitor catalog tools#1057
Merged
Merged
Conversation
Add catalog-only tools for discovering cron monitors and inspecting monitor details, check-ins, and stats. Wire monitor URLs through get_sentry_resource while preserving the default direct tool surface. Co-Authored-By: Codex <codex@openai.com>
Use the project read scope for monitor details and only advertise monitor resources when the inspect monitor tool is available. This keeps generated catalog guidance aligned with the exposed tool surface. Co-Authored-By: Codex <codex@openai.com>
Reject monitor detail requests that provide only one side of an absolute time range. This returns a clear local input error instead of forwarding partial start or end parameters to Sentry. Co-Authored-By: Codex <codex@openai.com>
Reject contradictory monitor time ranges and ensure monitor listing honors active project constraints. Add request-shape coverage for monitor list filters and stats omission when stats are disabled. Co-Authored-By: Codex <codex@openai.com>
fab2748 to
8627fc2
Compare
Co-Authored-By: Codex <codex@openai.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2c15f60. Configure here.
Co-Authored-By: Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds catalog-only cron monitor support so agents can discover monitors and inspect metadata, environment status, recent check-ins, and aggregate stats through
find_monitors,get_monitor_details, and monitor URL resolution inget_sentry_resource. The direct tool surface stays unchanged while generated catalog definitions expose the new tools through the catalog/skill paths.The API client now covers monitor list, detail, check-in, and stats endpoints and maps agent-facing filters and time ranges to Sentry params. Monitor discovery respects active project constraints, including
all, rejects explicit project mismatches, forwards list filters, and detail requests reject ambiguousstatsPeriodplus absolutestart/endranges while honoringincludeStats: false.The diff includes MSW fixtures and regression coverage for endpoint params, catalog routing, URL parsing, project constraints, and time-range validation. Verified locally with
pnpm run tsc,pnpm run lint, and focused@sentry/mcp-corecatalog tests.