Merge pull request #216 from modelcontextprotocol/antonp/toolinfo-id-optional
fix: make toolInfo.id optional per spec
This commit is contained in:
commit
c475dc3c17
3 changed files with 7 additions and 5 deletions
6
src/generated/schema.json
generated
6
src/generated/schema.json
generated
|
|
@ -248,7 +248,7 @@
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["id", "tool"],
|
"required": ["tool"],
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
"theme": {
|
"theme": {
|
||||||
|
|
@ -919,7 +919,7 @@
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["id", "tool"],
|
"required": ["tool"],
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
"theme": {
|
"theme": {
|
||||||
|
|
@ -2127,7 +2127,7 @@
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["id", "tool"],
|
"required": ["tool"],
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
"theme": {
|
"theme": {
|
||||||
|
|
|
||||||
4
src/generated/schema.ts
generated
4
src/generated/schema.ts
generated
|
|
@ -539,7 +539,9 @@ export const McpUiHostContextSchema = z
|
||||||
toolInfo: z
|
toolInfo: z
|
||||||
.object({
|
.object({
|
||||||
/** @description JSON-RPC id of the tools/call request. */
|
/** @description JSON-RPC id of the tools/call request. */
|
||||||
id: RequestIdSchema.describe("JSON-RPC id of the tools/call request."),
|
id: RequestIdSchema.optional().describe(
|
||||||
|
"JSON-RPC id of the tools/call request.",
|
||||||
|
),
|
||||||
/** @description Tool definition including name, inputSchema, etc. */
|
/** @description Tool definition including name, inputSchema, etc. */
|
||||||
tool: ToolSchema.describe(
|
tool: ToolSchema.describe(
|
||||||
"Tool definition including name, inputSchema, etc.",
|
"Tool definition including name, inputSchema, etc.",
|
||||||
|
|
|
||||||
|
|
@ -313,7 +313,7 @@ export interface McpUiHostContext {
|
||||||
/** @description Metadata of the tool call that instantiated this App. */
|
/** @description Metadata of the tool call that instantiated this App. */
|
||||||
toolInfo?: {
|
toolInfo?: {
|
||||||
/** @description JSON-RPC id of the tools/call request. */
|
/** @description JSON-RPC id of the tools/call request. */
|
||||||
id: RequestId;
|
id?: RequestId;
|
||||||
/** @description Tool definition including name, inputSchema, etc. */
|
/** @description Tool definition including name, inputSchema, etc. */
|
||||||
tool: Tool;
|
tool: Tool;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue