Repository navigation
feat(tools): Add outputSchema to get_monitor_details - #2020
Merged
Merged
Conversation
Return cron monitor details as structuredContent with a declared outputSchema instead of handwritten markdown. Config, environments, check-ins, and stat buckets are mapped explicitly, so passthrough fields such as alertRule and extra config keys stay private. Durations are labeled in milliseconds (Sentry's unit); the old markdown printed them as seconds. The search_issues follow-up hint moves into the tool description. Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
This branch was previously deployed
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.
get_monitor_details(cron monitors) now declares anoutputSchemaand returnsstructuredResult()on every success path, in place of handwritten markdown. This follows the Structured Content policy indocs/contributing/tool-responses.md.checkinMarginMinutesandmaxRuntimeMinutes: Sentry documents both in minutes.durationMsandavgDurationMs: Sentry stores these in milliseconds. The old markdown printed them as seconds.owneris the display name, andownerEmailis the owner's email when a user owns the monitor. A test asserts it comes through.nullwhenincludeStatsis false.schedulestring and ms-scale durations.get-sentry-resource.test.tsnow use structuredContent.Review: ready, no must-fix. The should-fixes are applied: the
*Minutesfield names, the stats.describe()now says "at most 10 most recent buckets", and the fixture nits (crontab string, ms durations).Tokens (
pnpm run measure-tokens, description + inputSchema): 1051 → 1074 (+23). On the test fixture, the model-visible payload went from 474 markdown tokens to 594 JSON tokens (1.25x).Checks (package-scoped,
env -u SENTRY_AUTH_TOKEN):pnpm run --filter @sentry/mcp-core generate-definitionstscpnpm run lintRoot
pnpm run tsc/testwere not run, because the cloudflare build uploads source maps to Sentry. Evals were skipped (they need API keys).Rebase note: sibling structured-output PRs also touch
packages/mcp-core/src/toolDefinitions.json. If it conflicts, regenerate it withpnpm run --filter @sentry/mcp-core generate-definitionsinstead of hand-merging.via @dcramer.
--
View Session [Sentry]