Skip to content

fix(mcp): Accept common name and arguments aliases in execute_sentry_tool - #1827

Merged
BYK merged 1 commit into
mainfrom
fix/mcp-execute-tool-name-aliases
Nov 3, 2026
Merged

BYK merged 1 commit into
mainfrom
fix/mcp-execute-tool-name-aliases

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

execute_sentry_tool failed input validation on name about 7.2K times in the last 7 days in sentry/mcp-server. In about 4.1K of those calls the model did name the target tool, but as toolName (~3.1K), tool (~0.8K) or tool_name (~0.2K). Those calls often put the target arguments in params (~0.8K) or args (~0.3K) instead of arguments. Separately, about 1.2K calls/week tried to run search_sentry_tools through the wrapper and got "not available in this session".

What changed:

  • name and arguments are now optional in the schema. The handler resolves name from toolName / tool / tool_name and arguments from params / args when the canonical key is missing. The aliases have no descriptions to keep the cost down: execute_sentry_tool goes from 275 to 339 tokens (pnpm run measure-tokens).
  • A call with no tool name at all now gets a short error that shows the expected name / arguments shape, not a Zod message.
  • execute_sentry_tool(name='search_sentry_tools', …) now runs the search tool, which is read-only. execute_sentry_tool still can't call itself.

Tradeoff for review: the JSON schema no longer marks name as required. The SDK strips unknown keys before the handler runs, so the alias keys can't reach the handler unless the schema stops requiring name. The handler still requires a name.

via @BYK.

--

View Session [Sentry]

…tool

Models often call execute_sentry_tool with toolName, tool, or tool_name
instead of name, and params or args instead of arguments. Normalize those
keys in the handler and explain a missing name. Also allow running
search_sentry_tools through the wrapper since it is read-only.

Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
@vercel

vercel Bot commented Nov 3, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 3, 2026 12:06am UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 3, 2026
@BYK
BYK merged commit f39572a into main Nov 3, 2026
35 checks passed
@BYK
BYK deleted the fix/mcp-execute-tool-name-aliases branch November 3, 2026 12:15

This branch was previously deployed

2 inactive deployments
Actions — bfce70a8 Deployed Nov 3, 2026 by sentry-junior[bot] via eval #1499
Preview — bfce70a8 Deployed Nov 3, 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