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
fix(conformance): advertise raw 2020-12 schema in json-schema-2020-12 fixture tool
The json-schema-2020-12 server scenario asserts that $schema, $defs/$anchor,
additionalProperties, composition (allOf/anyOf), and conditional (if/then/else)
keywords are preserved verbatim in tools/list. The fixture registered the tool
with a zod schema that never contained those keywords, so the scenario failed
with 'field was likely stripped'. Register the exact scenario schema as raw
JSON Schema via fromJsonSchema() instead; all 7 checks now pass.
Also note the per-tool outputSchema compile-failure scoping in the SEP-2106
changeset.
Copy file name to clipboardExpand all lines: .changeset/sep-2106-json-schema-2020-12.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,5 +13,9 @@ 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`).
17
-
- New opt-in `resolveExternalSchemaRefs(schema, options)` helper (the SEP's optional external-`$ref` mode): fetches and inlines non-local `$ref`s ahead of time into a self-contained schema. Disabled by default, enforces a host allowlist (and rejects loopback/link-local/private targets otherwise), `https`-only by default, with fetch timeout / response-size / document-count limits, dereference logging, and fail-closed on unresolved references.
16
+
-`Client.listTools()` no longer rejects when a single advertised tool's `outputSchema` fails to compile (e.g. it trips the safety guards above): the failure is scoped to the offending tool. Every other tool stays listable and callable; calling the offending tool throws a
17
+
descriptive error instead of silently skipping output validation.
18
+
- 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
19
+
(`MCP_DEFAULT_SCHEMA_DIALECT`).
20
+
- New opt-in `resolveExternalSchemaRefs(schema, options)` helper (the SEP's optional external-`$ref` mode): fetches and inlines non-local `$ref`s ahead of time into a self-contained schema. Disabled by default, enforces a host allowlist (and rejects loopback/link-local/private
21
+
targets otherwise), `https`-only by default, with fetch timeout / response-size / document-count limits, dereference logging, and fail-closed on unresolved references.
0 commit comments