Skip to content

fix(mcp): List output schemas with open objects - #2450

Open
shayna-ch wants to merge 2 commits into
mainfrom
fix/open-output-schemas
Open

shayna-ch wants to merge 2 commits into
mainfrom
fix/open-output-schemas

Conversation

@shayna-ch

Copy link
Copy Markdown
Member

Zod lists every z.object in an output schema with
additionalProperties: false. SDK clients validate each result against the tools/list they cached at connect, so an output field added in a later deploy fails every call from a client holding the older list, even when the server-side call succeeded (MCP-SERVER-GQS, GRA, GT6).

buildServer now wraps each output schema so its listed JSON Schema drops additionalProperties: false from objects, through a Zod override. Validation on the server still uses the Zod schema, and record value schemas are unchanged.

Refs #2293

Zod lists every z.object in an output schema with
additionalProperties: false. SDK clients validate each result against
the tools/list they cached at connect, so an output field added in a
later deploy fails every call from a client holding the older list,
even when the server-side call succeeded (MCP-SERVER-GQS, GRA, GT6).

buildServer now wraps each output schema so its listed JSON Schema
drops additionalProperties: false from objects, through a Zod
override. Validation on the server still uses the Zod schema, and
record value schemas are unchanged.

Refs #2293

Co-Authored-By: Shayna Chambless <173110007+shayna-ch@users.noreply.github.com>
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Nov 20, 2026 10:13pm UTC
sentry-local Ready Ready Preview Nov 20, 2026 10:13pm UTC

Request Review

Making a field required does not break a client holding an older
tools/list. Making a required field optional or nullable does, and so
does widening a value, such as a new enum member.

Co-Authored-By: Shayna Chambless <173110007+shayna-ch@users.noreply.github.com>

This branch was successfully deployed

2 active deployments
Preview – sentry-local — 5f38beec Deployed Nov 20, 2026 by vercel[bot]
Preview – cli — 5f38beec Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant