Skip to content

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

Merged
BYK merged 2 commits into
mainfrom
fix/open-output-schemas
Nov 27, 2026
Merged

BYK merged 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>
@github-actions

Copy link
Copy Markdown
Contributor

This PR has had no activity for 3 days. It closes in 2 days unless someone pushes, comments, or adds the WIP label.

@github-actions github-actions Bot added the Stale label Nov 26, 2026
@BYK
BYK added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit a8cd99d Nov 27, 2026
35 checks passed
@BYK
BYK deleted the fix/open-output-schemas branch November 27, 2026 22:02

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 Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants