Skip to content

fix: treat empty object as raw shape (matches v1); drop stale changes…

0dafed3
Select commit
Loading
Failed to load commit list.
Closed

feat(compat): restore McpServer.tool()/.prompt()/.resource() variadic overloads #1900

fix: treat empty object as raw shape (matches v1); drop stale changes…
0dafed3
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Apr 16, 2026 in 16m 20s

Code review found 2 potential issues

Found 3 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 2
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit packages/server/src/index.ts:15-16 InferRawShape exported from mcp.ts but not re-exported from index.ts
🟡 Nit packages/server/src/server/mcp.ts:42 Inconsistent zod import path: 'zod' instead of 'zod/v4'

Annotations

Check warning on line 16 in packages/server/src/index.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

InferRawShape exported from mcp.ts but not re-exported from index.ts

nit: This PR adds 4 new exported types in `mcp.ts` (`ZodRawShape`, `InferRawShape`, `LegacyToolCallback`, `LegacyPromptCallback`) but only re-exports 3 of them here — `InferRawShape` is omitted, leaving it half-exported. Either add `InferRawShape` to this list alongside its siblings (it appears in the public `Legacy*Callback` signatures), or drop the `export` keyword from it in `mcp.ts` since it's only referenced in-file.

Check warning on line 42 in packages/server/src/server/mcp.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Inconsistent zod import path: 'zod' instead of 'zod/v4'

nit: This uses `import { z } from 'zod'` (also in `mcp.compat.test.ts:2`), but every other zod import in the repo uses `import * as z from 'zod/v4'` and CLAUDE.md:112 explicitly states "The SDK uses `zod/v4` internally." No runtime impact since the catalog pins zod ^4, but worth aligning both imports with the established convention.