You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default validator now honors declared 2019-09 and draft-07/06 dialects instead of rejecting them: a schema stamped `"$schema": "http://json-schema.org/draft-07/schema#"` (zod-to-json-schema's default output) validates with draft-07 semantics, and a 2019-09 stamp (zod-to-json-schema's `2019-09`/`openAi` targets) with 2019-09 semantics, on both the Ajv and Cloudflare Workers providers (with known engine differences documented in the migration guide). Schemas with no `$schema` still validate as 2020-12, and unknown dialects still produce the typed error (now listing the supported dialects: 2020-12, 2019-09, draft-07, draft-06).
| relying on default `Ajv` being draft-07 | `new AjvJsonSchemaValidator(new Ajv({ strict: false, validateFormats: true, validateSchema: false, allErrors: true }))` (import `Ajv`, `addFormats`, `AjvJsonSchemaValidator` from `…/validators/ajv`) |
1473
-
| draft-07 idioms via `fromJsonSchema(schema)` | `fromJsonSchema(schema, new AjvJsonSchemaValidator(ajv))` — the `McpServer`/`Client` `jsonSchemaValidator` option does **not** reach `fromJsonSchema`-authored schemas |
1474
-
| `outputSchema` / `inputSchema` with absolute-URI `$ref` | inline under `$defs` and reference with `#/$defs/Name` |
|undeclared draft-07 idioms via `fromJsonSchema(schema)`|`fromJsonSchema(schema, new AjvJsonSchemaValidator(ajv))` — the `McpServer`/`Client``jsonSchemaValidator` option does **not** reach `fromJsonSchema`-authored schemas |
1483
+
|`outputSchema` / `inputSchema` with absolute-URI `$ref`| inline under `$defs` and reference with `#/$defs/Name` |
1475
1484
1476
1485
A tool may now register an `outputSchema` whose root is `type:"array"`, `type:"string"`,
1477
1486
etc.; toward 2025-era clients the codec wraps it in a `{result:…}` envelope, and toward
0 commit comments