Repository navigation
feat(tools): Return structured output from get_snapshot - #1998
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Base automatically changed from
feat/structured-get-latest-base-snapshot
to
main
November 5, 2026 21:46
Replace the markdown snapshot summary with a structured payload that uses the shared grouped image shape from get_latest_base_snapshot. Point next steps at get_snapshot_image with the snapshotId and an imageFileName as imageIdentifier, and drop the now-unused markdown tree renderer. Co-Authored-By: David Cramer <[email protected]>
Assert the exact responseNotes when get_snapshot_image is unavailable, reuse the shared snapshot diff percent math, and switch the get_sentry_resource snapshot placeholders to camelCase field names. Co-Authored-By: David Cramer <[email protected]>
sentry-junior
Bot
force-pushed
the
feat/structured-get-snapshot
branch
from
November 5, 2026 21:51
4cc0b20 to
da0a78b
Compare
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_snapshotnow declares anoutputSchemaand returns the snapshot comparison asstructuredContentthroughstructuredResult(), following the Structured Content policy indocs/contributing/tool-responses.md. It's one of the per-tool outputSchema PRs.Stacked on #1984. It reuses the grouped image shape and
tools/support/snapshots/structured.tsfrom that branch. After #1984 merges, retarget this PR tomain.What clients see
url,state,comparisonType,app,vcs,approval,counts, the image sections andresponseNotes.[{ group, images: [{ imageFileName, displayName, ... }] }]. Changed images carrydiffPercent, and renamed images carryprevious.images(the full inventory) appears only when there are no diffs.unchanged/skippedappear only withshowUnmodified=trueon a non-solo snapshot, matching what the markdown showed.responseNotespoint atget_snapshot_image(organizationSlug, snapshotId, imageIdentifier='<imageFileName>')for previews andimageResolution='full'for original bytes, throughformatToolCallInstruction. Whenget_snapshot_imageisn't in the session, the preview note falls back toget_sentry_resource(url="<url>?selectedSnapshot=<URL-encoded imageFileName>")without the imageIdentifier wording.get_sentry_resourcepasses the structured result through for snapshot URLs. It has no outputSchema of its own, which the policy allows. Its snapshot placeholders now use<organizationSlug>/<snapshotId>/<imageFileName>.fetchSnapshotSummaryhelpers are removed, since nothing calls them anymore.Review
A reviewer pass found one must-fix: the imageIdentifier suffix sat outside
formatToolCallInstruction, so theget_sentry_resourcefallback named the wrong argument. It's fixed in this head. The same commit adds an exactresponseNotesassertion for the case where get_snapshot_image is unavailable, and the diff percent math now reuses the shared helper.Leak safety
Fields are mapped explicitly, and no API object is spread. Tests assert that internal fixture values (content hashes, storage URLs,
project_id) and hidden unchanged/skipped images don't reachstructuredContent.Token cost
measure-tokens: 47,096 → 47,114 on top of feat(tools): Return structured output from get_latest_base_snapshot #1984 (+18; +35 vs main).outputSchemaadds about 1,010 tokens totools/list, whichmeasure-tokensdoesn't count. That's comparable tofind_releases(1,497).showUnmodified2,466 → 5,546 (2.25x).Checks
generate-definitions,pnpm --filter @sentry/mcp-core run tscand rootpnpm run lintpass. Rootpnpm run tscis left out because its Cloudflare build uploads source maps.Merge note:
toolDefinitions.jsonandskillDefinitions.jsonwill conflict with sibling schema PRs. Regenerate them on rebase withpnpm run --filter @sentry/mcp-core generate-definitions.via @dcramer.
--
View Session [Sentry]