Repository navigation
fix(mcp): Read snapshot approval status and approvers - #2857
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Contributor
📊 MCP Server Token Cost ReportSummary
Per-Tool Breakdown
Note: This measures the static overhead of tool definitions sent to LLM clients with every request. Lower is better. MCP Apps viewsEach
The budget applies to raw bytes, and the view's generator fails over it. |
get_snapshot read approval_info, which the snapshot details endpoint never returns, so approval was always null. Build approval from the approval_status and approvers fields the endpoint does return. Refs EME-1369
NicoHinderling
force-pushed
the
nico/fix-snapshot-approval-status
branch
from
December 3, 2026 18:41
f02ce92 to
d7a19e0
Compare
NicoHinderling
marked this pull request as ready for review
December 3, 2026 18:41
NicoHinderling
approved these changes
Dec 3, 2026
NicoHinderling
enabled auto-merge
December 3, 2026 18:45
NicoHinderling
disabled auto-merge
December 3, 2026 18:50
github-actions Bot
pushed a commit
to Fields-Education/sentry-mcp
that referenced
this pull request
Dec 4, 2026
Adds `approve_snapshot` so an agent can approve a preprod snapshot's
visual changes when a user asks. It sits behind a new `snapshots` skill
("Approve Snapshots", off by default) and requires `project:releases`.
This is the write half of EME-1369; the read half is
getsentry#2857.
It calls `POST
/api/0/organizations/{org}/preprodartifacts/{artifact_id}/approve/` with
`{"feature_type": "snapshots"}` through a new
`SentryApiService.approveSnapshot`. `@sentry/api` has no wrapper for
this endpoint.
- `201 {"detail": "Approved"}` returns `result: "approved"`, and `200
{"detail": "Already approved"}` returns `result: "already_approved"`.
`requestJSON` only exposes the body, so the tool maps on `detail`, not
the status code.
- A `400`, such as "This build doesn't need approval", becomes a
`UserInputError` with the API's `detail`.
`defaultEnabled: false` means the remote server's OAuth consent screen
leaves `snapshots` unchecked. The stdio server (`sentry mcp`) still
grants every active skill when no `--skills` flag is given, so
`snapshots` is on there by default, like `triage` and
`project-management`.
The CLI's copy of the skill list (`MCP_SKILL_NAMES`) and its MCP config
tests now include `snapshots`. Tools available to every skill now list
`snapshots` in the generated definitions. The regenerated definitions
also add the tool to the plugin agents' `allowedTools`.
The `@sentry/mcp-server` bundle budget goes from 3.77 to 3.78 MiB.
`main` was only 677 bytes under the budget, and this tool adds about 1.7
KB, bringing the bundle to 3,954,128 bytes. The new budget leaves about
9 KB of headroom, which is what the budget's comment intends.
Refs EME-1369
<!-- junior-request-attribution:start -->
via @NicoHinderling.
<!-- junior-request-attribution:end -->
<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AD0ASU4QCY3G%3A1796323785.570449 -->
--
[View
Session](https://junior-prod.sentry.dev/conversations/slack%3AD0ASU4QCY3G%3A1796323785.570449)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0ASU4QCY3G%3A1796323785.570449/?project=4510944073809921)
<!-- junior-session-footer:end -->
---------
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Nico Hinderling <9902528+NicoHinderling@users.noreply.github.com>
Co-authored-by: Nico Hinderling <NicoHinderling@users.noreply.github.com>
This branch was successfully 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_snapshotreadapproval_infofrom the snapshot details endpoint (/organizations/{org}/preprodartifacts/snapshots/{id}/), but that endpoint has never returned it. Soapprovalwas alwaysnull, and an agent couldn't tell whether a snapshot needs approval. The test fixture used the same made-up shape, which hid the bug.The endpoint returns
approval_status(approved,auto_approved,requires_approval, ornull; stale approvals already don't count) andapprovers.approvalis now built from those:It is
nullonly whenapproval_statusis null andapproversis empty.autoApprovedis dropped since it equalsstatus === "auto_approved". Approveremailandavatar_urlare left out of the output. Test fixtures now use the real response shape, andtoolDefinitions.jsonis regenerated for the new output schema.Read-only half of EME-1369.
via @NicoHinderling.
--
View Session [Sentry]