Skip to content

Commit b5a0305

Browse files
Merge pull request modelcontextprotocol#42 from modelcontextprotocol/justin/is-error-optional
`CallToolResult.isError` should be optional
2 parents ea386a5 + 2e754bd commit b5a0305

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

schema/schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@
7878
"type": "array"
7979
},
8080
"isError": {
81+
"description": "Whether the tool call ended in an error.\n\nIf not set, this is assumed to be false (the call was successful).",
8182
"type": "boolean"
8283
}
8384
},
8485
"required": [
85-
"content",
86-
"isError"
86+
"content"
8787
],
8888
"type": "object"
8989
},

schema/schema.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,13 @@ export interface ListToolsResult extends PaginatedResult {
612612
*/
613613
export interface CallToolResult extends Result {
614614
content: (TextContent | ImageContent | EmbeddedResource)[];
615-
isError: boolean;
615+
616+
/**
617+
* Whether the tool call ended in an error.
618+
*
619+
* If not set, this is assumed to be false (the call was successful).
620+
*/
621+
isError?: boolean;
616622
}
617623

618624
/**

0 commit comments

Comments
 (0)