Skip to content

docs: document v1 ZodObject-vs-raw-shape failure modes - #2845

Open
Parithosh-Varma wants to merge 1 commit into
modelcontextprotocol:mainfrom
Parithosh-Varma:docs/zobject-troubleshooting-2627
Open

Parithosh-Varma wants to merge 1 commit into
modelcontextprotocol:mainfrom
Parithosh-Varma:docs/zobject-troubleshooting-2627

Conversation

@Parithosh-Varma

Copy link
Copy Markdown

Implements both docs suggestions from #2627 (reporter offered either; doing both, 24 lines).

Changes

  • docs/troubleshooting.md: new entry keyed on the searchable crash (MCP error -32603: Cannot read properties of null (reading '_def')), covering the silent empty-schema variant, the version matrix, and the unwrap-to-raw-shape fix with diff.
  • docs/migration/upgrade-to-v2.md: one-paragraph warning under Standard Schema objects that applying the v2 style backwards on v1 crashes (<=1.21) or silently empties the schema (<=1.26).

Validation

  • prettier --check clean on both files; pnpm sync:snippets --check passes (no snippet blocks touched).

Adds the troubleshooting entry and migration-guide warning suggested in modelcontextprotocol#2627: passing z.object() where v1 expects a raw shape crashes tools/list (<=1.21) or silently empties the schema (server.tool(), <=1.26).

Signed-off-by: Parithosh-Varma <demgufever@gmail.com>
@changeset-bot

changeset-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3c4a392

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Parithosh-Varma
Parithosh-Varma requested a review from a team as a code owner September 23, 2026 04:15
@pkg-pr-new

pkg-pr-new Bot commented Sep 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/@modelcontextprotocol/client@2845

@modelcontextprotocol/codemod

npm i https://pkg.pr.new/@modelcontextprotocol/codemod@2845

@modelcontextprotocol/core

npm i https://pkg.pr.new/@modelcontextprotocol/core@2845

@modelcontextprotocol/server

npm i https://pkg.pr.new/@modelcontextprotocol/server@2845

@modelcontextprotocol/server-legacy

npm i https://pkg.pr.new/@modelcontextprotocol/server-legacy@2845

@modelcontextprotocol/express

npm i https://pkg.pr.new/@modelcontextprotocol/express@2845

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/@modelcontextprotocol/fastify@2845

@modelcontextprotocol/hono

npm i https://pkg.pr.new/@modelcontextprotocol/hono@2845

@modelcontextprotocol/node

npm i https://pkg.pr.new/@modelcontextprotocol/node@2845

commit: 3c4a392

@claude claude Bot added the v2 Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes label Sep 23, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant