From 2e754bd55bbf346fabf86cc073a846b3eb965f94 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Thu, 7 Nov 2024 13:35:39 +0000 Subject: [PATCH] `CallToolResult.isError` should be optional --- schema/schema.json | 4 ++-- schema/schema.ts | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/schema/schema.json b/schema/schema.json index 4cbcc6cdb..771f4c4a3 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -78,12 +78,12 @@ "type": "array" }, "isError": { + "description": "Whether the tool call ended in an error.\n\nIf not set, this is assumed to be false (the call was successful).", "type": "boolean" } }, "required": [ - "content", - "isError" + "content" ], "type": "object" }, diff --git a/schema/schema.ts b/schema/schema.ts index 0db275659..4c67b956b 100644 --- a/schema/schema.ts +++ b/schema/schema.ts @@ -612,7 +612,13 @@ export interface ListToolsResult extends PaginatedResult { */ export interface CallToolResult extends Result { content: (TextContent | ImageContent | EmbeddedResource)[]; - isError: boolean; + + /** + * Whether the tool call ended in an error. + * + * If not set, this is assumed to be false (the call was successful). + */ + isError?: boolean; } /**