Skip to content

feat(uptime): add MVP tools for uptime monitors - #1229

Merged
dcramer merged 4 commits into
mainfrom
feat/uptime-monitor-tools
Aug 5, 2026
Merged

dcramer merged 4 commits into
mainfrom
feat/uptime-monitor-tools

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an MVP for Sentry HTTP uptime monitor management in MCP, separate from existing cron monitor tools.

Closes #1136

Tools

  • find_uptime_monitors (inspect) — list org uptime monitors
  • get_uptime_monitor_details (inspect) — config + recent checks
  • create_uptime_monitor (project-management)
  • update_uptime_monitor (project-management) — includes enable/disable
  • delete_uptime_monitor (project-management)

Catalog-only (not top-level tools/list).

Upstream schema verification (getsentry/sentry)

Verified request/response contracts against:

  • src/sentry/api/urls.py routes under /organizations/{org}/uptime/ and /projects/{org}/{project}/uptime/
  • src/sentry/uptime/endpoints/organiation_uptime_alert_index.py (list)
  • src/sentry/uptime/endpoints/project_uptime_alert_index.py (create)
  • src/sentry/uptime/endpoints/project_uptime_alert_details.py (get/update/delete)
  • src/sentry/uptime/endpoints/project_uptime_alert_checks_index.py (checks)
  • src/sentry/uptime/endpoints/validators.py (UptimeMonitorValidator, camelCase via CamelSnakeSerializer)
  • src/sentry/uptime/endpoints/serializers.py (UptimeDetectorSerializer)
  • src/sentry/uptime/models.py interval/method enums: 60/300/600/1200/1800/3600, HTTP methods

Out of scope (intentionally)

  • uptime stats/summary/count endpoints
  • preview-check / assertion suggestions
  • response captures
  • get_sentry_resource URL wiring for uptime
  • cron monitor create/update/delete

Checks

  • pnpm --filter @sentry/mcp-core exec tsc --noEmit
  • targeted vitest: uptime tools + tools.test.ts + skills.test.ts + url-utils.test.ts (87 passed)
  • biome check/write on touched files
  • generate-definitions regenerated tool/skill defs

Requested by David Cramer.

--

View Junior Session [Sentry]

@dcramer dcramer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Flow: feature
Risk: medium — new create/update/delete surface over live uptime monitors; reversible, catalog-only, but can store and re-surface request credentials
Verdict: request-changes

Adds a solid MVP for HTTP uptime monitors, separate from cron tools, with verified upstream routes/schemas and baseline snapshots. Direction matches existing catalog patterns. One privacy issue should be fixed before merge.

Findings

  • [should-fix] packages/mcp-core/src/tools/catalog/get-uptime-monitor-details.ts: details output dumps full headers and body into the tool response (and the description even uses Authorization as the example). Uptime monitors commonly store bearer tokens / basic auth; those values then land in agent context and chat logs. Omit body/headers by default, or redact sensitive header names (authorization, cookie, set-cookie, x-api-key, etc.) and only show non-sensitive metadata (method/url/status/checks).

Checks

test/typecheck/smoke green; eval + warden still pending.

Notes

  • Residual: update path cannot clear nullable fields (owner/body/assertion) because tool null is collapsed to omit — fine for MVP if not advertised as clear-support.
  • Residual: tests are baseline-only vs denser cron suites; not merge-blocking for this MVP, but constraint/empty-update coverage would help before ready-for-review.
  • Scopes (project:write / project:read) match upstream ProjectAlertRulePermission alternatives and existing MCP scope set.

Comment thread packages/mcp-core/src/tools/catalog/delete-uptime-monitor.test.ts
Comment thread packages/mcp-core/src/tools/catalog/create-uptime-monitor.ts Outdated
Comment thread packages/mcp-core/src/tools/catalog/update-uptime-monitor.ts Outdated
Comment thread packages/mcp-core/src/utils/url-utils.test.ts
Comment thread packages/mcp-core/src/tools/catalog/get-uptime-monitor-details.ts Outdated
@dcramer
dcramer marked this pull request as ready for review August 5, 2026 16:20
sentry-junior Bot and others added 3 commits August 5, 2026 16:23
Add catalog tools for listing, inspecting, creating, updating, and
deleting Sentry HTTP uptime monitors, backed by verified upstream API
schemas and endpoints.

Closes #1136

Co-Authored-By: David Cramer <david@sentry.io>

Co-Authored-By: David Cramer <david@sentry.io>
Redact sensitive headers and omit request bodies from details output,
normalize regional SaaS web URLs, make delete idempotent on 404, reject
empty owners, and support clearing nullable update fields.

Co-Authored-By: David Cramer <david@sentry.io>

Co-Authored-By: David Cramer <david@sentry.io>
Slim list results, normalize uptimeStatus, use optional fields instead of
null placeholders, drop opaque assertion inputs, and make update clear
semantics omit-vs-null.

Co-Authored-By: David Cramer <david@sentry.io>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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 fb874af. Configure here.

Comment thread packages/mcp-core/src/tools/catalog/get-uptime-monitor-details.ts
@sentry-junior
sentry-junior Bot force-pushed the feat/uptime-monitor-tools branch from fb874af to 812ccde Compare August 5, 2026 16:24
@dcramer
dcramer self-requested a review August 5, 2026 17:08

@dcramer dcramer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the hints are often describing things that should be descriptions on the params themselves. move the per-param hints, and if there is nothing left, you dont need to render the hints block...

…body

Move create-tool param guidance out of the <hints> block onto existing
parameter descriptions, and show the request-body omission note even when
headers are also present.

Co-Authored-By: David Cramer <david@sentry.io>
@dcramer
dcramer merged commit 533883d into main Aug 5, 2026
19 of 21 checks passed
@dcramer
dcramer deleted the feat/uptime-monitor-tools branch August 5, 2026 18:01

This branch was previously deployed

1 inactive deployment
Actions — 1b16f080 Deployed Aug 5, 2026 by sentry-junior[bot] via eval #1078
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.

Add tools for managing uptime monitors

1 participant