chore(deps): bump zod to ^4.2.0 across all workspaces
Summary
Below zod 4.2.0, the MCP SDK's ~standard.jsonSchema self-conversion path silently drops .describe() annotations on tool/prompt input schemas whenever MCPJam is acting as an MCP server (mcp/, cli/ MCP-server surfaces). This bumps zod to ^4.2.0 across every workspace so served tool/prompt descriptions stop disappearing on the wire.
- Bumped
zoddependency andoverridesentries (both matter — npm keeps resolving the old range if only one is bumped) in:sdk/package.json(dependencies + overrides)cli/package.jsonmcp/package.jsonmcpjam-inspector/package.json(dependency + overrides)
- Regenerated the root
package-lock.jsonvia a cleannpm install.npm ls zod --allnow resolveszod@4.3.6everywhere in scope (satisfies^4.2.0); the only other zod version present iszod@3.25.76, pulled in transitively by the harness-claude-code/harness-codex canary AI SDK dependency chain — unrelated to this bump and out of scope. examples/**were intentionally left untouched (not npm workspaces).- Added a regression test (
sdk/tests/zod-describe-preservation.test.ts) that registers a tool with az.string().describe("SOME_DESCRIPTION")input on an in-testMcpServer, round-trips it through a realcreateMcpHandler+Client/StreamableHTTPClientTransportconnection, and asserts the description survives onto the wiretools/listinputSchema. - Smoke-checked the three known
z.toJSONSchemacall sites (mcpjam-tool-helpers.ts,model-request-payload.ts,mcp-http-bridge.ts) — these callz.toJSONSchemadirectly rather than going through the SDK's internal~standard.jsonSchemapath, so no code changes were needed there; they compile and behave identically.
Decisions to review
- Reverted an auto-regenerated
mcp/src/generated/McpAppsHtml.bundled.tsdiff. Runningnpm run typecheckregenerates this bundled-HTML artifact as a side effect, and it came out with a large unrelated diff (build-hash/minification drift, not a functional change — this bundle doesn't consume zod). I checked it back out to keep this PR scoped to the zod bump; if the repo wants this regenerated, that should be its own PR. - Left the transitive
zod@3.25.76tree alone. It's pulled in by@ai-sdk/harness-claude-code/@ai-sdk/harness-codexcanary dependencies (their ownai@7.0.0-canary.176/@ai-sdk/provider-utils@5.0.0-canary.48pin zod v3), which is a separate major version and outside this PR's "bump the v4 line to 4.2.0" scope. - Verification hit shared-machine disk exhaustion (ENOSPC) mid-run, not caused by this change —
npm cache clean --forcefreed space and a clean re-run of the full test suite passed (877 files / 9540 tests, 0 failures). Flagging in case the same transient[vitest-worker]: Timeout calling "fetch"symptom shows up in CI on a loaded runner.
Test plan
-
npm run typecheck(root) — exit 0, no new errors (only the pre-existing gitignoredHarnessPageBundle.generated.ts/ unrelated deprecation warnings, noresourceMetadataUrlerrors surfaced in this run) -
npm run test(root) — exit 0 on a clean run: sdk 140/140 test files (2461 passed, 1 skipped, includes the new regression test), inspector 877/879 test files (9540 passed, 6 skipped), cli/mcp/design/chatui/widget all green -
npm run build:inspector— exit 0
🤖 Generated with Claude Code
[!NOTE]
Low Risk
Dependency-only bump with a targeted regression test; no auth or runtime logic changes beyond restored tool schema descriptions on the wire.
Overview
Raises zod to ^4.2.0 (lockfile resolves to 4.3.x) in sdk, cli, mcp, and mcpjam-inspector, including matching overrides where the repo pins the v4 line. Root package-lock.json is regenerated; a changeset marks patch releases for @mcpjam/sdk, @mcpjam/cli, and @mcpjam/inspector.
The bump fixes MCP server tool listing where, below 4.2.0, Zod .describe() text on tool inputSchema fields could be dropped when the MCP SDK converts schemas for tools/list. No application code changes—only dependency alignment plus coverage.
Adds sdk/tests/zod-describe-preservation.test.ts, which registers a tool with a described field, round-trips through createMcpHandler and a real client, and asserts the description appears on the wire inputSchema.
Reviewed by Cursor Bugbot for commit a0dc6fa2d951ab9f3547db61ec539142fb1533c1. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Bumps zod to ^4.2.0 across all workspaces to stop .describe() annotations from being dropped during JSON Schema conversion in MCP server paths. Restores tool/prompt descriptions on the wire.
-
Bug Fixes
- Added
sdk/tests/zod-describe-preservation.test.tsto verify a described input field retains its description through a real server/client round-trip. - Updated the test to call
client.connect(...)insidetrysoclient.close()always runs if the handshake fails.
- Added
-
Dependencies
- Updated
zoddependency andoverridesto^4.2.0insdk,cli,mcp, andmcpjam-inspector. - Regenerated the root
package-lock.json; added.changeset/zod-4-2-bump.mdfor patch releases in@mcpjam/sdk,@mcpjam/cli, and@mcpjam/inspector. - Left
examples/**unchanged; unrelated transitivezod@3.xfrom@ai-sdk/*remains.
- Updated