Repository navigation
fix(search): Keep the output keys that connected clients still require - #2919
Open
sentry-junior[bot] wants to merge 1 commit into
Open
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
#2846 removed `explanation` from every search tool's output and stopped emitting `timeSeries` unless a series was requested. Both keys were required in the listed output schemas. A client that listed tools before that deploy validates each result against its cached schema, so it rejected every search result until it listed tools again. Emit both keys as `null` again, typed as `retiredOutputField()`, and keep them required. `timeSeries` stays the series payload on the trace-item datasets and `null` on profiles. Add `output-required-keys.test.ts`, which fails when a tool stops requiring a top-level output key listed in `output-required-keys.json`, or requires one that is not listed yet. Fixes #2918
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📊 MCP Server Token Cost ReportSummary
Per-Tool Breakdown
Note: This measures the static overhead of tool definitions sent to LLM clients with every request. Lower is better. MCP Apps viewsEach
The budget applies to raw bytes, and the view's generator fails over it. |
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.
#2846 removed
explanationfrom every search tool's output and stopped emittingtimeSeriesunless a series was requested. Both keys were required in the listed output schemas. MCP SDK clients validate each result against theoutputSchemathey cached attools/list, so a client that listed tools before that deploy rejects every search result until it lists tools again.This PR puts both keys back as required and emits them as
null:retiredOutputField()(z.null(), "Retired; always null.") is the schema for a key a tool no longer fills.explanation: null.timeSeriesis required again: the series ornullon errors, logs, spans and metrics, alwaysnullon profiles.output-required-keys.jsonnow lists the top-level required output keys of every tool. Removing one from a schema means keeping it withretiredOutputField()instead; a new required key gets a new line.docs/contributing/tool-responses.mdsays so.A stale client that requests a series can still break: #2846 also gave
timeSeriesthe formertransformedTimeSeriesshape. Those clients lack the newtimeSeriesinput in their cached input schema, so this should be rare.Open decision: the list holds top-level keys only. Nested keys (for example
get_snapshot'sapproval.autoApproved, dropped about a week ago) would need about 1,800 path entries. Worth it, or keep it top-level?Fixes #2918
via automation
evt_905b9c478746fd9deeb853f85ad7441b· Run IDdispatch_33826307ff28ff4e658b51de064825a7.--
View Session [Sentry]