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
feat(core,server): default to Ajv2020 dialect + close SEP-2106 test gaps
- ajvProvider: use Ajv2020 so the default Node validator honors the 2020-12
dialect (prefixItems etc.); previously new Ajv() ran draft-07 and silently
ignored 2020-12 keywords (R-2106-1/2).
- add MCP_DEFAULT_SCHEMA_DIALECT='2020-12' as the single source of truth;
cfWorker provider defaults through it.
- refactor the server structuredContent text-fallback from in-place mutation to
a pure withStructuredContentTextFallback() so the tools/call path is
side-effect-free.
- tests: Ajv2020 prefixItems regression (both validators); standardSchema
io:'output' branch; spec.types<->schemas field-level mirror; registerTool
compile-time Output typing; falsy structuredContent round-trip (false/""/null);
schema-safety guards surfacing cleanly via fromJsonSchema.
- changeset: note the Ajv2020 default-dialect fix.
Copy file name to clipboardExpand all lines: .changeset/sep-2106-json-schema-2020-12.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,3 +13,4 @@ Implement SEP-2106: tool `inputSchema`/`outputSchema` conform to JSON Schema 202
13
13
-`McpServer.registerTool` type-checks a handler's returned `structuredContent` against the tool's `outputSchema` inferred output.
14
14
- Servers returning array or primitive `structuredContent` automatically also emit a serialized `TextContent` block, so pre-SEP clients can fall back to the text content.
15
15
- Built-in validators refuse to dereference non-same-document `$ref`/`$dynamicRef` (SSRF guard) and reject schemas exceeding depth / subschema-count bounds (composition-DoS guard).
16
+
- The default Node validator now uses `Ajv2020`, so the 2020-12 dialect is honored by default (previously `new Ajv()` ran draft-07 semantics and silently ignored keywords such as `prefixItems`). Both built-in validators now default to the `2020-12` dialect (`MCP_DEFAULT_SCHEMA_DIALECT`).
0 commit comments