Repository navigation
fix(mcp): Move dropped description steering into tool code - #2298
Merged
Merged
Conversation
#2260 removed tool description text that carried behavior the handlers did not enforce. Put that behavior in code. - Alert and Metric Monitor writes explain a bare 403: the scope and project permission Sentry checks, org:write for the all-projects source, and that retrying with the same token will not help. The error stays an ApiPermissionError; a 403 that names its scopes keeps the shared Missing Permission message. - create_project returns guidance that tells the user the DSN, points to create_dsn when no DSN was set up, and reports a repository that did not link. - get_profile returns guidance when a period has no profiles. - onboarding_status_update rejects a failed status without eventNote. 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
|
dcramer
approved these changes
Nov 16, 2026
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 486f55c. Configure here.
… 403 Sentry checks detector permissions before it saves, and saves inside one transaction, so a permission denial never leaves a monitor behind.
7 tasks done
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.

Follow-ups from #2260, which removed description text that carried behavior the handlers did not enforce.
403 on Alert and Metric Monitor writes (
create_alert_rule,update_alert_rule,create_metric_monitor,update_metric_monitor)Today a denied write returns
API error (403): You do not have permission to perform this action.followed by "you may be able to resolve this by trying again".withAlertWritePermissionHintwraps only the write call and adds what Sentry checks to a bare 403:alerts:writeand permission to edit alerts in every connected project. An Alert that uses the all-projects source also needsorg:write.alerts:writein their project.The message also says that retrying with the same token will not help: reconnect with those scopes, or ask an org Owner or Manager. The error stays an
ApiPermissionError, so it remains an expected 4xx with its status. A 403 that names its missing scopes is unchanged, andformatErrorForUserstill reports it as Missing Permission.These 403s are bare because of how the Sentry endpoints check permissions. The workflow and detector endpoints let
org:readtokens through to object-level checks (enforce_workflow_edit_permissions,enforce_detector_workflow_connection_permissions,can_edit_detectorinworkflow_engine/endpoints/validators/utils.py).enforce_scopesends aninsufficient_scopechallenge only to Seer agent tokens.There is no
org:writepre-check for all-project sources. The server can't see the token's effective scopes (token scopes combined with the member's role), so a pre-check would cost an extra API call and could guess wrong. The 403 guidance covers that case instead.Other tools
create_projectadds aguidancefield. It tells the agent to give the user the project slug and DSN, points tocreate_dsnwhen no DSN was set up, and says when the repository did not link.get_profileadds optionalguidancewhen there is no data: check the exact transaction name withsearch_traces, try a longer period, or confirm profiling is enabled. In comparison mode it names the period with no profiles.onboarding_status_updaterejectsstatus: "failed"withouteventNote.Nothing breaks.
guidanceis additive in both output schemas. The neweventNoterule rejects only input that the description already called invalid.via @dcramer.
--
View Session [Sentry]