typescript-sdk/.changeset/schema-object-type-for-unions.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

359 B

@modelcontextprotocol/core-internal
patch

Ensure standardSchemaToJsonSchema emits type: "object" at the root, fixing discriminated-union tool/prompt schemas that previously produced {oneOf: [...]} without the MCP-required top-level type. Also throws a clear error when given an explicitly non-object schema (e.g. z.string()). Fixes #1643.