Skip to content

fix(mcp): Link Seer credit failures to the auto-reload modal - #2454

Open
srest2021 wants to merge 5 commits into
mainfrom
srest2021/mcp-seer-auto-reload-modal-link
Open

srest2021 wants to merge 5 commits into
mainfrom
srest2021/mcp-seer-auto-reload-modal-link

Conversation

@srest2021

@srest2021 srest2021 commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Depends on getsentry/sentry#131613

Relates to CW-3144

When Seer stops because the org is out of credits or hit its daily spend limit, analyze_issue_with_seer said to fix it "in Sentry" without a link. It now links to /settings/billing/overview/#open-seer-auto-reload-modal, which opens the auto-reload modal, and adds the 402's denial reason when Sentry sends one (:daily_cap_exceeded or :not_enough_credits).

Out of credits

Before:

Your organization does not have enough credits to start an Autofix run. Someone with billing access can adjust Seer spend and auto-reload in Sentry.

After:

Your organization does not have enough credits to start an Autofix run. Someone with billing access can adjust Seer spend and auto-reload in Sentry.

Configure auto-reload: https://<org-slug>.sentry.io/settings/billing/overview/#open-seer-auto-reload-modal:not_enough_credits

Daily spend limit

Before:

Your organization has reached its daily Seer spend limit. Someone with billing access can raise the limit in Sentry, or you can try again tomorrow.

After:

Your organization has reached its daily Seer spend limit. Someone with billing access can raise the limit in Sentry, or you can try again tomorrow.

Configure auto-reload: https://<org-slug>.sentry.io/settings/billing/overview/#open-seer-auto-reload-modal:daily_cap_exceeded

When Seer stops because the org is out of credits or hit its daily spend
limit, analyze_issue_with_seer now links to the billing page with the
auto-reload modal open, adding the 402's denial reason when Sentry sends
one. Only SaaS has a billing page, so other hosts get no link.
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Nov 21, 2026 12:10am UTC
1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 21, 2026 12:10am UTC

Request Review

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

📊 MCP Server Token Cost Report

Summary

  • Total Tokens: 65205 tokens
  • Tool Count: 74 tools
  • Average: 881 tokens/tool

Per-Tool Breakdown

Tool Tokens % of Total
get_issue_details 3938 6%
get_alert_rule 2245 3.4%
find_releases 1805 2.8%
get_issue_activity 1759 2.7%
update_alert_rule 1653 2.5%
get_replay_details 1602 2.5%
create_alert_rule 1506 2.3%
get_monitor_details 1501 2.3%
update_metric_monitor 1479 2.3%
create_metric_monitor 1458 2.2%
get_event_stacktrace 1381 2.1%
update_issue 1380 2.1%
get_snapshot 1308 2%
get_profile 1291 2%
get_agent_conversation_details 1278 2%
find_monitors 1261 1.9%
search_logs 1248 1.9%
search_traces 1246 1.9%
get_alert_options 1236 1.9%
search_profiles 1228 1.9%
search_metrics 1216 1.9%
search_errors 1214 1.9%
get_profile_details 1200 1.8%
get_uptime_monitor_details 1163 1.8%
create_monitor 1135 1.7%
onboarding_status_update 1109 1.7%
search_issue_events 1103 1.7%
search_replays 1095 1.7%
find_related_issues 1068 1.6%
get_release_details 1056 1.6%
get_dashboard_details 1052 1.6%
search_issues 977 1.5%
search_docs 973 1.5%
find_alert_rules 908 1.4%
update_uptime_monitor 873 1.3%
create_uptime_monitor 871 1.3%
search_agent_conversations 830 1.3%
find_dropped_events 819 1.3%
get_metric_monitor_details 797 1.2%
create_project 793 1.2%
update_dsn 765 1.2%
get_issue_user_reports 630 1%
get_latest_base_snapshot 623 1%
find_dashboards 553 0.8%
link_issue 545 0.8%
find_uptime_monitors 537 0.8%
get_issue_breadcrumbs 492 0.8%
unlink_issue 476 0.7%
find_metric_monitors 471 0.7%
get_issue_tag_values 469 0.7%
update_project 441 0.7%
get_sentry_resource 429 0.7%
submit_feedback_to_sentry_team 426 0.7%
add_issue_note 404 0.6%
delete_monitor_environment 363 0.6%
find_teams 351 0.5%
find_projects 346 0.5%
delete_alert_rule 345 0.5%
delete_uptime_monitor 333 0.5%
delete_metric_monitor 331 0.5%
create_dsn 326 0.5%
add_team_to_project 324 0.5%
remove_team_from_project 320 0.5%
find_dsns 319 0.5%
find_organizations 311 0.5%
get_snapshot_image 302 0.5%
analyze_issue_with_seer 300 0.5%
get_event_attachment 299 0.5%
get_trace_details 282 0.4%
create_team 266 0.4%
get_span_details 263 0.4%
whoami 261 0.4%
get_sentry_mcp_info 142 0.2%
get_doc 102 0.2%

Note: This measures the static overhead of tool definitions sent to LLM clients with every request. Lower is better.

MCP Apps views

Each ui:// view as a host receives it from resources/read.

View MIME type Raw Gzip Brotli Budget % of budget
ui://sentry/chart/v3.html text/html;profile=mcp-app 17,018 B 7,155 B 6,370 B 24,576 B 69.2%

The budget applies to raw bytes, and the view's generator fails over it.

@linear-code

linear-code Bot commented Nov 20, 2026

Copy link
Copy Markdown

CW-3144

Credit checks only deny orgs with token-billed Seer, which self-hosted
doesn't have, so the SaaS-only check never applied.
Use the shared getSentryWebBaseUrl instead of a SaaS/self-hosted branch, drop
URL tests the tool tests already cover, and test that an unknown denial reason
stays out of the link.
@vercel
vercel Bot temporarily deployed to Preview – sentry-local November 20, 2026 23:45 Inactive
@srest2021
srest2021 marked this pull request as ready for review November 21, 2026 00:02
@srest2021
srest2021 requested a review from a team as a code owner November 21, 2026 00:02
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 21, 2026

@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.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fdb5136. Configure here.

…edicated hosts

Sentry serves billing at /settings/<org>/billing/, not under /organizations/<org>/,
so build the path directly as the CLI does.

This branch was successfully deployed

2 active and 1 inactive deployments
Preview – cli — 9c1a11b4 Deployed Nov 21, 2026 by vercel[bot]
Actions — 9c1a11b4 Deployed Nov 21, 2026 by srest2021 via eval #2016
Preview – sentry-local — 9c1a11b4 Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant