Skip to content

feat(monitors): Add monitor catalog tools#1057

Merged
dcramer merged 6 commits into
mainfrom
codex/sentry-monitor-tools
Jun 9, 2026
Merged

feat(monitors): Add monitor catalog tools#1057
dcramer merged 6 commits into
mainfrom
codex/sentry-monitor-tools

Conversation

@dcramer

@dcramer dcramer commented Jun 5, 2026

Copy link
Copy Markdown
Member

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 in get_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 ambiguous statsPeriod plus absolute start/end ranges while honoring includeStats: 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-core catalog tests.

Comment thread packages/mcp-core/src/tools/catalog/get-monitor-details.ts
Comment thread packages/mcp-core/src/tools/catalog/get-monitor-details.ts
sentry-warden[bot]

This comment was marked as outdated.

dcramer and others added 4 commits June 9, 2026 14:33
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>
@dcramer dcramer force-pushed the codex/sentry-monitor-tools branch from fab2748 to 8627fc2 Compare June 9, 2026 21:36
Comment thread packages/mcp-core/src/api-client/client.ts
Co-Authored-By: Codex <codex@openai.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread packages/mcp-core/src/api-client/client.ts
Co-Authored-By: Codex <codex@openai.com>
@dcramer dcramer marked this pull request as ready for review June 9, 2026 22:25
@dcramer dcramer merged commit 48dcd7a into main Jun 9, 2026
20 checks passed
@dcramer dcramer deleted the codex/sentry-monitor-tools branch June 9, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant