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)
Report count: 4 (two distinct clients, two tools)
via automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_97a5d97c109364580f93a51a0bcb62cd, automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_4aa65545842f411a52539c78bc8c50bc, automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_1e4fa19455dad79f043ed20cf498acc8.
--
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)