-
Notifications
You must be signed in to change notification settings - Fork 183
Description
This is a tracking issue for implementation of SEP-1613.
Summary
This SEP establishes JSON Schema 2020-12 as the default dialect for embedded schemas within MCP messages (tool inputSchema/outputSchema and elicitation requestedSchema fields). Schemas may explicitly declare alternative dialects via the $schema field. This resolves ambiguity that has caused compatibility issues between implementations, providing clarity on validation requirements and enabling use of modern JSON Schema features including better composition support and validation capabilities.
The Kotlin SDK currently uses JsonObject for schema properties in ToolSchema and ElicitRequestParams.RequestedSchema, providing flexibility to use any JSON Schema version but without explicit version specification or validation. The SDK does not include $schema fields in generated schemas, does not perform JSON Schema validation, and lacks documentation about which JSON Schema version to use. This implementation will require: documentation updates to specify JSON Schema 2020-12 as the default dialect, guidance on including explicit $schema fields when using alternative dialects, updated examples demonstrating 2020-12 compliant schemas and proper use of features like type, properties, and required, consideration of optional JSON Schema validation utilities (or guidance to use external validation libraries), and tests to ensure generated schemas conform to 2020-12 when no $schema is specified. The flexible JsonObject-based approach means minimal code changes are needed, with most work focused on documentation, examples, and developer guidance.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status