Repository navigation
fix(mcp): Accept common name and arguments aliases in execute_sentry_tool - #1827
Merged
Merged
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
BYK
approved these changes
Nov 3, 2026
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.
execute_sentry_toolfailed input validation onnameabout 7.2K times in the last 7 days insentry/mcp-server. In about 4.1K of those calls the model did name the target tool, but astoolName(~3.1K),tool(~0.8K) ortool_name(~0.2K). Those calls often put the target arguments inparams(~0.8K) orargs(~0.3K) instead ofarguments. Separately, about 1.2K calls/week tried to runsearch_sentry_toolsthrough the wrapper and got "not available in this session".What changed:
nameandargumentsare now optional in the schema. The handler resolvesnamefromtoolName/tool/tool_nameandargumentsfromparams/argswhen the canonical key is missing. The aliases have no descriptions to keep the cost down:execute_sentry_toolgoes from 275 to 339 tokens (pnpm run measure-tokens).name/argumentsshape, not a Zod message.execute_sentry_tool(name='search_sentry_tools', …)now runs the search tool, which is read-only.execute_sentry_toolstill can't call itself.Tradeoff for review: the JSON schema no longer marks
nameasrequired. The SDK strips unknown keys before the handler runs, so the alias keys can't reach the handler unless the schema stops requiringname. The handler still requires a name.via @BYK.
--
View Session [Sentry]