Repository navigation
fix(mcp): Name the replacements when a client calls a removed or deprecated tool - #2847
Draft
sentry-junior[bot] wants to merge 2 commits into
Draft
sentry-junior[bot] wants to merge 2 commits into
sentry-junior[bot] wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
sentry-junior
Bot
force-pushed
the
fix/mcp-keep-deprecated-tools-callable
branch
from
December 3, 2026 17:45
df4fd51 to
f363946
Compare
Member
|
i disagree this is stupid we're not going to fix bugs in the users harness junior what harness is causing these issues? |
Calls to tool names the server no longer has, such as find_issues or list_projects, got the SDK's bare "Tool X not found" error. REMOVED_TOOL_REPLACEMENTS in tools/surfaces.ts maps those names to the tools that replaced them, and the unknown-tool handler now answers with a -32602 error that names the replacements this session registers. Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
sentry-junior
Bot
force-pushed
the
fix/mcp-keep-deprecated-tools-callable
branch
from
December 3, 2026 21:25
44b81f1 to
98477db
Compare
Deprecated tools such as search_events are not registered when EXPOSE_ALL_TOOLS is on, so a direct call got the SDK's bare "not found" error. The unknown-tool handler now looks the name up in the tool registry and, for a deprecated tool, answers with the same -32602 error naming its replacedBy tools that the session registers. Deprecated tools stay out of tools/list and stay uncallable. Co-Authored-By: David Cramer <23610+dcramer@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.
A call to a tool name the session doesn't register gets the SDK's bare
Tool X not founderror. That error doesn't say which tool to use instead. It happens with deleted tools likefind_issuesandlist_projects. It also happens with deprecated tools likesearch_events, which aren't registered whenEXPOSE_ALL_TOOLSis on.For these names, the unknown-tool handler in
server.tsnow answers with a -32602 error that names the replacements, for exampleTool search_events was removed from the Sentry MCP server. Use search_errors, search_logs, search_traces, search_metrics, search_profiles, search_replays instead.The replacements come from two places:deprecated.replacedBy, looked up in the session's tool registry.REMOVED_TOOL_REPLACEMENTSintools/surfaces.ts, which coversfind_issues,list_issues,list_events,list_issue_events,list_projects,list_organizations,find_errors,find_transactionsandfind_tags.Other details:
error.type: unknown_tool.tools/listand still can't be called directly, so the tool count doesn't change.search_sentry_toolsandexecute_sentry_toolgateway tools is unchanged.docs/contributing/adding-tools.mddescribes both cases.via @dcramer.
--
View Session [Sentry]