Repository navigation
feat(mcp): Keep get_sentry_resource loaded in Claude Code - #1989
Open
sentry-junior[bot] wants to merge 2 commits into
Open
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.
|
Claude Code defers MCP tools behind tool search unless a tool sets `_meta["anthropic/alwaysLoad"]`. harnesses.md named get_sentry_resource as the tool to keep loaded, but no tool sent `_meta`. Add an optional `_meta` field to ToolConfig, pass it to registerTool, and set `anthropic/alwaysLoad` on get_sentry_resource only. A test checks that tools/list exports it on that tool and no other. Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
sentry-junior
Bot
force-pushed
the
feat/mcp-always-load-resource
branch
from
November 5, 2026 19:19
bbbf943 to
cd23ede
Compare
Resolve the ToolConfig conflict with #2035: keep the _meta field and the outputSchema-typed handler.
|
@getsentry-bot It looks like it's added to all clients? Can server not sent this field if |
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.
Summary
Claude Code hides MCP tools behind tool search unless a tool sets
_meta["anthropic/alwaysLoad"].docs/mcp/harnesses.mdalready namedget_sentry_resourceas the tool to keep loaded, but none of our tools sent_meta.ToolConfiggets an optional_metafield, whichbuildServerpasses toregisterTool.get_sentry_resourceis the only tool that sets{"anthropic/alwaysLoad": true}. A pasted Sentry URL then works without a tool search first. The key follows the current Claude Code docs ("Mark a tool to load upfront or stay deferred").harnesses.mdnow says we set it. A user's server-levelalwaysLoadsetting can still override it.measure-tokensnow includes_meta, so its count matches the wire.Impact
main, which now includes the feat(mcp): Add a display title to every tool #1991 titles (47,553 → 47,564).server.all-tools.test.tschecks thatget_sentry_resourceis the only tool intools/listwith_meta.Checks: package-scoped
tscfor@sentry/mcp-coreand@sentry/mcp-cloudflare, rootlint, and the mcp-core and mcp-cloudflare test suites. After rebasing ontomain(with #1991), I re-ran mcp-coretsc,check:generated, rootlintand the mcp-core tests. I didn't run the roottscortestscripts, because they run the cloudflare build, which uploads source maps to Sentry.via @dcramer.
--
View Session [Sentry]