-
Notifications
You must be signed in to change notification settings - Fork 207
feat: add $schema field to ToolSchema per SEP-1613 #696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -39,12 +39,14 @@ public fun CallToolResult.Companion.error(content: String, meta: JsonObject? = n | |||||||||||||||||||||||||||||||||||||
| * if both [title] and [annotations].[title] are not provided. | ||||||||||||||||||||||||||||||||||||||
| * @property inputSchema A JSON Schema object defining the expected parameters for the tool. | ||||||||||||||||||||||||||||||||||||||
| * Must be an object type schema. Defines what arguments the tool accepts. | ||||||||||||||||||||||||||||||||||||||
| * Defaults to the JSON Schema 2020-12 dialect when no explicit `$schema` is provided. | ||||||||||||||||||||||||||||||||||||||
| * @property description A human-readable description of the tool and when to use it. | ||||||||||||||||||||||||||||||||||||||
| * Clients can use this to improve the LLM's understanding of available tools. | ||||||||||||||||||||||||||||||||||||||
| * It can be thought of like a "hint" to the model. | ||||||||||||||||||||||||||||||||||||||
| * @property outputSchema An optional JSON Schema object defining the structure of the tool's output | ||||||||||||||||||||||||||||||||||||||
| * returned in the [structuredContent][CallToolResult.structuredContent] field of a [CallToolResult]. | ||||||||||||||||||||||||||||||||||||||
| * Must be an object type schema if provided. | ||||||||||||||||||||||||||||||||||||||
| * Defaults to the JSON Schema 2020-12 dialect when no explicit `$schema` is provided. | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+42
to
+49
|
||||||||||||||||||||||||||||||||||||||
| * Defaults to the JSON Schema 2020-12 dialect when no explicit `$schema` is provided. | |
| * @property description A human-readable description of the tool and when to use it. | |
| * Clients can use this to improve the LLM's understanding of available tools. | |
| * It can be thought of like a "hint" to the model. | |
| * @property outputSchema An optional JSON Schema object defining the structure of the tool's output | |
| * returned in the [structuredContent][CallToolResult.structuredContent] field of a [CallToolResult]. | |
| * Must be an object type schema if provided. | |
| * Defaults to the JSON Schema 2020-12 dialect when no explicit `$schema` is provided. | |
| * Per MCP/SEP-1613 protocol semantics, consumers should assume the JSON Schema 2020-12 | |
| * dialect when no explicit `$schema` is provided. | |
| * @property description A human-readable description of the tool and when to use it. | |
| * Clients can use this to improve the LLM's understanding of available tools. | |
| * It can be thought of like a "hint" to the model. | |
| * @property outputSchema An optional JSON Schema object defining the structure of the tool's output | |
| * returned in the [structuredContent][CallToolResult.structuredContent] field of a [CallToolResult]. | |
| * Must be an object type schema if provided. | |
| * Per MCP/SEP-1613 protocol semantics, consumers should assume the JSON Schema 2020-12 | |
| * dialect when no explicit `$schema` is provided. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updated API dump indicates a binary-breaking public API change to ToolSchema (new ctor signature, new componentN/copy/getSchema). This conflicts with the PR metadata stating “Breaking Changes: none”. Either adjust the PR’s breaking-change note/versioning guidance, or add compatibility shims (e.g., old constructor overload) to preserve ABI/source compatibility if that’s a requirement.