typescript-sdk/.changeset/register-rawshape-compat.md
Konstantin Konstantinov 0fb8406d83
v2: codemod iterations, canonical zod schema exports from sdk-shared (#2354)
Co-authored-by: Felix Weinberger <fweinberger@anthropic.com>
2026-06-25 19:42:44 +01:00

539 B

@modelcontextprotocol/core-internal @modelcontextprotocol/server
patch patch

registerTool/registerPrompt accept a raw Zod shape ({ field: z.string() }) for inputSchema/outputSchema/argsSchema in addition to a wrapped Standard Schema. Raw shapes are auto-wrapped with z.object(). The raw-shape overloads are @deprecated; prefer wrapping with z.object().

Also widens the completable() constraint from StandardSchemaWithJSON to StandardSchemaV1 so v1's completable(z.string(), fn) continues to work.