fix: default CallToolResult content to empty vec on missing field (#752)
This commit is contained in:
parent
66712db808
commit
44dfcf5550
2 changed files with 42 additions and 33 deletions
|
|
@ -388,6 +388,7 @@
|
|||
"content": {
|
||||
"description": "The content returned by the tool (text, images, etc.)",
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/definitions/Annotated"
|
||||
}
|
||||
|
|
@ -402,10 +403,7 @@
|
|||
"structuredContent": {
|
||||
"description": "An optional JSON object that represents the structured result of the tool call"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"content"
|
||||
]
|
||||
}
|
||||
},
|
||||
"CancelTaskResult": {
|
||||
"description": "Response to a `tasks/cancel` request.\n\nPer spec, `CancelTaskResult = allOf[Result, Task]` — same shape as `GetTaskResult`.",
|
||||
|
|
@ -2813,18 +2811,12 @@
|
|||
{
|
||||
"$ref": "#/definitions/ReadResourceResult"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/CallToolResult"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/ListToolsResult"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/CreateElicitationResult"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/EmptyObject"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/CreateTaskResult"
|
||||
},
|
||||
|
|
@ -2838,10 +2830,16 @@
|
|||
"$ref": "#/definitions/CancelTaskResult"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/CustomResult"
|
||||
"$ref": "#/definitions/CallToolResult"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/GetTaskPayloadResult"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/EmptyObject"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/CustomResult"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -388,6 +388,7 @@
|
|||
"content": {
|
||||
"description": "The content returned by the tool (text, images, etc.)",
|
||||
"type": "array",
|
||||
"default": [],
|
||||
"items": {
|
||||
"$ref": "#/definitions/Annotated"
|
||||
}
|
||||
|
|
@ -402,10 +403,7 @@
|
|||
"structuredContent": {
|
||||
"description": "An optional JSON object that represents the structured result of the tool call"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"content"
|
||||
]
|
||||
}
|
||||
},
|
||||
"CancelTaskResult": {
|
||||
"description": "Response to a `tasks/cancel` request.\n\nPer spec, `CancelTaskResult = allOf[Result, Task]` — same shape as `GetTaskResult`.",
|
||||
|
|
@ -2813,18 +2811,12 @@
|
|||
{
|
||||
"$ref": "#/definitions/ReadResourceResult"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/CallToolResult"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/ListToolsResult"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/CreateElicitationResult"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/EmptyObject"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/CreateTaskResult"
|
||||
},
|
||||
|
|
@ -2838,10 +2830,16 @@
|
|||
"$ref": "#/definitions/CancelTaskResult"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/CustomResult"
|
||||
"$ref": "#/definitions/CallToolResult"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/GetTaskPayloadResult"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/EmptyObject"
|
||||
},
|
||||
{
|
||||
"$ref": "#/definitions/CustomResult"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue