Repository navigation
Description
Problem
Our tool output schemas are closed: every object in a listed outputSchema has additionalProperties: false. MCP SDK clients check structuredContent against the outputSchema they cached from tools/list. So when we add an output field, a client still holding the older schema rejects every response from that tool, including writes that succeeded on the server:
MCP error -32602: Structured content does not match the tool's output schema: data/changes must NOT have additional properties, data/current must NOT have additional properties
That is the exact error in feedback MCP-SERVER-GQS (update_issue, opencode 1.19.3, HTTP transport).
Repro (code only)
- I ran the server at
3bb34d3in memory with the same SDK client as opencode 1.19.3 (@modelcontextprotocol/sdk@1.29.0).update_issueoutput validates against today's listed schema, withstatus=resolved,status=ignored,ignoreMode=forever,priorityandassignedToagainst the MSW fixtures. - I then gave the client the schema as it was before feat(mcp): Add priority parameter to update_issue #2155, which is today's schema minus
priority. All five calls failed with the error above. - feat(mcp): Add priority parameter to update_issue #2155 (
d8dc5bf, 2026-11-11) is the only change that added a key to bothchangesandcurrent(update-issue.ts:520and:526). feat(tools): Add outputSchema to update_issue #2002 (2026-11-05) introduced the closed schema.server.ts:406registers the ZodoutputSchemaas-is, and the listed JSON Schema has"additionalProperties": falseonchanges,currentand each{from,to}object.
Why clients keep old schemas
opencode 1.19.3 lists tools once on connect (packages/opencode/src/mcp/catalog.ts:145) and lists again only on tools/list_changed (mcp/index.ts:462). Its SDK patch re-runs initialize on session expiry but does not list tools again. A long-running client therefore keeps its first tool list and output validators across our deploys. Newer opencode (dev, packages/core/src/mcp/client.ts:728-733) skips SDK output validation on purpose. Older versions and other SDK-based clients with long-lived sessions still hit this.
Inference, not verified: the reporting client's cached tools/list came from before #2155 was deployed.
Suggested fix
- Advertise open output schemas, with no
additionalProperties: falseon output objects. Then adding a field is backward compatible, and validation still catches missing or mistyped fields. One option is to post-process the JSON Schema at registration inserver.ts. Another is.loose()on output objects. - Add a
server.all-tools.test.tscheck that no listedoutputSchemacontainsadditionalProperties: false. - Write down in
docs/contributing/tool-responses.mdthat output fields are additive-only.
Reports
- MCP-SERVER-GQS (2026-11-16)
- MCP-SERVER-GQT, same client as GQS
- MCP-SERVER-GRA (2026-11-17), same opencode/HTTP client family,
status=resolvedInNextRelease - MCP-SERVER-GT6 (2026-11-20), a different
nodeHTTP client,get_issue_details:data/event must NOT have additional properties, which fits fix(mcp): Return the event-level stacktrace from issue and event tools #2402 addingevent.stacktrace(details) - MCP-SERVER-GTN (2026-11-22),
claude-codeHTTP client,get_event_stacktrace:data must NOT have additional properties, which fits fix(mcp): Return the event-level stacktrace from issue and event tools #2402 adding root-levelstacktrace(details) - MCP-SERVER-GV6 (2026-11-23),
claude-codeHTTP client withexperimental=1, bothget_issue_details(dataanddata/event) andget_event_stacktrace(data) (details)
Report count: 6 (three tools)
via automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_97a5d97c109364580f93a51a0bcb62cd, automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_4aa65545842f411a52539c78bc8c50bc, automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_1e4fa19455dad79f043ed20cf498acc8, automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_f0acfb4ec2b25b31d71dc3e89d3dca2e, automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_4ddd839c252df8438020cc6f53687318.
--
Activity
linear-code commentedon Nov 16, 2026
MCP-1238
sentry-junior commentedon Nov 17, 2026
Another report: MCP-SERVER-GRA (2026-11-17, feedback event
9df1fdf8b7ee40b181e20b513e7e869a).0.42.0), about a day later.feedback.tool=update_issue,kind=broken,impact=worked_around.MCP -32602: Structured content does not match the tool's output schema: data/changes must NOT have additional properties, data/current must NOT have additional properties, this time onupdate_issue(status='resolvedInNextRelease', ...).set_resolved_in_releaseactivity withget_issue_details/get_issue_activity. Every server-sidetools/call update_issuespan for this client in the last 3 days has statusok, so the rejection is in the client's output validation.resolvedInNextRelease: at50a47ba,changesandcurrentalways carry the same four keys whatever the status (update-issue.ts:514-527, built at:1051-1057,:1113,:1153), so today's listed schema accepts this output. The stale cachedtools/listfrom the original report is still the best explanation, now surviving more than a day of deploys. Inference, not verified:tools/listisn't traced, so I can't see when the client last listed tools.No fix PR or
fix/*branch exists yet, and nothing onmainsince 2026-11-16 changes the output schemas.Report count: 3 (GQS, GQT, GRA; one distinct client)
fix(tools): Find a project by numeric ID in find_projects (#2360)
fix(mcp): Return the event-level stacktrace from issue and event tools (
sentry-junior commentedon Nov 20, 2026
Another report: MCP-SERVER-GT6 (2026-11-20, feedback event
8cd03fe29de4473e9f111ee9fa8de086). This one is a second distinct client and a different tool, so the pattern is not specific to opencode orupdate_issue.app.client.family=node,User-Agent: node, HTTP transport,Mcp-Protocol-Version: 2025-11-25, server0.42.0).feedback.tool=get_issue_details,kind=broken,impact=worked_around.MCP error -32602: structured content does not match output schema: data/event must NOT have additional properties, onget_issue_details(issueId=…, fresh=true). The agent worked around it withget_sentry_resource(resourceType=issue), which renders the same event.f442d28, merged 2026-11-19, on production since at least the7c618d5deploy on 2026-11-20 03:02 UTC) addedstacktracedirectly onevent: schema atpackages/mcp-core/src/tools/support/issue-event-payload.ts:89, always emitted at:508. Ajv reports the extra key at the path of its parent object, anddata/eventis exactly wherestacktracesits. No other top-leveleventkey changed since feat(mcp): Return structured get_issue_details for every event type #2041 (packageVersionsand the rest date from 2026-11-12).7c618d5,buildIssueEventPayload(issue-event-payload.ts:498-523) returns only the keysissueEventSchemadeclares (:67-157). So the rejection comes from a schema the client cached before the fix(mcp): Return the event-level stacktrace from issue and event tools #2402 deploy, not from the current listed schema.get_issue_detailssuccessfully on 2026-11-18 01:26 UTC (before fix(mcp): Return the event-level stacktrace from issue and event tools #2402), which fits a long-lived client that kept its firsttools/list. Inference, not verified:tools/listisn't traced, and the failingget_issue_detailscall itself has no span insentry/mcp-server(sampled out or not recorded), so I can't see its response.No fix PR or branch exists yet for this issue. The suggested fix above (open output schemas plus an all-tools check that no listed
outputSchemahasadditionalProperties: false) would have prevented this report too.Report count: 4 (GQS, GQT, GRA, GT6; two distinct clients, two tools)
sentry-junior commentedon Nov 22, 2026
Another report: MCP-SERVER-GTN (2026-11-22, feedback event
ad1b211e6d7e424b828abad97e10b01e). Third tool (get_event_stacktrace), and the error is at the root of the output this time.claude-code2.1.311 over HTTP, server0.42.0.feedback.tool=get_event_stacktrace,kind=broken,impact=blocked. Selecting non-crashed threads 3, 8 and 11 of a Cocoa AppHang event failed withStructured content does not match the tool's output schema: data must NOT have additional properties.get_issue_detailson the same event worked.tools/call get_event_stacktracespans for this client (2026-11-22 10:31 UTC) have statusok, so the rejection is in the client's output validation.f442d28) added a root-levelstacktracekey toget_event_stacktraceand emits it on every path,nullwhen a thread is selected (packages/mcp-core/src/tools/support/event-stacktrace.ts:61schema,:115,:130,:139). A root extra key is exactly what Ajv reports asdata must NOT have additional properties.fc117c37(in-memory server, SDKClient, Cocoa threads fixture with native frames):thread=3/8/11validate fine against today's listed schema. With the listed schema minusstacktrace(the pre-fix(mcp): Return the event-level stacktrace from issue and event tools #2402 shape) cached in the client, the same call fails with the error above, verbatim.tools/listat 2026-11-21 20:19 UTC, after fix(mcp): Return the event-level stacktrace from issue and event tools #2402 shipped.mcp.session.idis empty on these spans, so I can't tie that list to the failing session. Inference, not verified: the failing session kept atools/listfrom before fix(mcp): Return the event-level stacktrace from issue and event tools #2402.#2450 (open schemas) would make this addition backward compatible for clients that list after it deploys.
Report count: 5 (three distinct clients, three tools)
sentry-junior commentedon Nov 23, 2026
Another report: MCP-SERVER-GV6 (2026-11-23, feedback event
9fbc34f56a5f40bebdd136b2a06ce945). Two tools in one report, from aclaude-codeHTTP client on server0.42.0withexperimental=1.feedback.tool=get_event_stacktrace,kind=broken,impact=worked_around. The reporter says both tools fail on every call, on three Node backend error issues:get_issue_details(issueId=<shortId>):Structured content does not match the tool's output schema: data must NOT have additional properties, data must NOT have additional properties, data/event must NOT have additional propertiesget_event_stacktrace(issueId=<shortId>)with the defaulteventId=latest:data must NOT have additional propertiesget_sentry_resource(resourceType=issue). Server side, that client's two tracedtools/call get_sentry_resourcespans at 2026-11-23 15:29–15:30 UTC have statusok, and so do their Sentry API calls.tools/listexplanation: thedata/eventpath is where fix(mcp): Return the event-level stacktrace from issue and event tools #2402 addedevent.stacktrace, and the root-level error onget_event_stacktraceis where it added rootstacktrace(see GT6 and GTN above). This client's last tracedget_issue_detailssucceeded on 2026-11-18 20:13 UTC, before fix(mcp): Return the event-level stacktrace from issue and event tools #2402 shipped.sentry/mcp-server(mcp.session.idis empty), so I can't see their responses or when the client last listed tools. I also didn't check which root-levelget_issue_detailskeys cause the two rootdataerrors.#2450 (open output schemas) covers this.
Report count: 6 (GQS, GQT, GRA, GT6, GTN, GV6; three tools)