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
{{ message }}
Repository navigation
Implement SEP-2106: Tools inputSchema & outputSchema Conform to JSON Schema 2020-12 #2192
packages/core/src/types/spec.types.ts (main) carries doc-comments stating "Defaults to JSON Schema 2020-12 when no explicit $schema is provided" on Tool.inputSchema and Tool.outputSchema. But the type still says type: 'object' at the root for outputSchema and the validator has not been switched to 2020-12 semantics.
No PRs yet referencing SEP-2106 directly.
Outstanding (acceptance criteria, summary)
R-2106-1 (wire): Implementations MUST validate tool inputs/outputs against declared schemas including 2020-12 keywords (e.g. oneOf, anyOf, allOf, not, if/then/else, $ref, $defs, $anchor, prefixItems)
R-2106-2 (sdk): Default dialect 2020-12 when $schema absent — needs the actual validator wired to 2020-12 (numeric exclusiveMinimum, prefixItems honored, etc.)
R-2106-7 (sdk):outputSchema accepts any valid 2020-12 schema — drop the type: 'object' restriction at the root. Tool.outputSchema typings need to be unknown/JSONSchema.
R-2106-8 (sdk):inputSchema keeps type: 'object' at root, but accepts arbitrary 2020-12 keywords alongside (oneOf/etc.)
R-2106-5 (wire): Servers using array or primitivestructuredContent MUST also emit a TextContent block with the serialized JSON (BC fallback)
R-2106-6 (wire):structuredContent widened to any JSON value (object, array, string, number, boolean, null) — CallToolResult.structuredContent should be typed unknown, not {[k:string]:unknown}. (Today main still has structuredContent?: { [key: string]: unknown }.)
R-2106-9 (sdk): SDK MUST NOT automatically dereference $ref to network URIs; only same-document JSON Pointers / $anchor resolved by default
R-2106-10 (sdk): Opt-in external-$ref mode disabled by default; SHOULD enforce host allowlist (reject loopback/link-local/private), timeouts, size limits
Activity
mattzcarey commentedon May 29, 2026
Status — SEP-2106 (Tools inputSchema & outputSchema conform to JSON Schema 2020-12)
Track: C — independent, starts now.
Spec: seps/2106-json-schema-2020-12.md · merged
What's done — partial (cosmetic only)
packages/core/src/types/spec.types.ts(main) carries doc-comments stating "Defaults to JSON Schema 2020-12 when no explicit$schemais provided" onTool.inputSchemaandTool.outputSchema. But the type still saystype: 'object'at the root foroutputSchemaand the validator has not been switched to 2020-12 semantics.Outstanding (acceptance criteria, summary)
oneOf,anyOf,allOf,not,if/then/else,$ref,$defs,$anchor,prefixItems)$schemaabsent — needs the actual validator wired to 2020-12 (numericexclusiveMinimum,prefixItemshonored, etc.)outputSchemaaccepts any valid 2020-12 schema — drop thetype: 'object'restriction at the root.Tool.outputSchematypings need to beunknown/JSONSchema.inputSchemakeepstype: 'object'at root, but accepts arbitrary 2020-12 keywords alongside (oneOf/etc.)structuredContentMUST also emit aTextContentblock with the serialized JSON (BC fallback)structuredContentwidened to any JSON value (object, array, string, number, boolean, null) —CallToolResult.structuredContentshould be typedunknown, not{[k:string]:unknown}. (Today main still hasstructuredContent?: { [key: string]: unknown }.)$refto network URIs; only same-document JSON Pointers /$anchorresolved by default$refmode disabled by default; SHOULD enforce host allowlist (reject loopback/link-local/private), timeouts, size limits$ref→ reject (not silently pass)Suggested validator choice
Ajv2020. The migration:Ajv2020Tool.outputSchemawidening +structuredContent: unknown$refguardCoordination
structuredContentto non-object JSON values is the same line of code inspec.types.ts. Land together to avoid churn.norika1207-lab commentedon Jun 2, 2026
feat(core,server,client): implement SEP-2106 JSON Schema 2020-12 tool…
feat(core,server,client): implement SEP-2106 JSON Schema 2020-12 tool…
feat(core,server,client): implement SEP-2106 JSON Schema 2020-12 tool…
feat(core,server,client): implement SEP-2106 JSON Schema 2020-12 tool…
feat(core,server,client): implement SEP-2106 JSON Schema 2020-12 tool…
feat(core,server,client): implement SEP-2106 JSON Schema 2020-12 tool…