We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c750f09 commit 6dec4ddCopy full SHA for 6dec4dd
1 file changed
src/ModelContextProtocol/Server/AIFunctionMcpServerTool.cs
@@ -253,7 +253,8 @@ public override async ValueTask<CallToolResponse> InvokeAsync(
253
{
254
AIContent aiContent => new()
255
256
- Content = [aiContent.ToContent()]
+ Content = [aiContent.ToContent()],
257
+ IsError = aiContent is ErrorContent
258
},
259
260
null => new()
@@ -278,7 +279,8 @@ public override async ValueTask<CallToolResponse> InvokeAsync(
278
279
280
IEnumerable<AIContent> contentItems => new()
281
- Content = [.. contentItems.Select(static item => item.ToContent())]
282
+ Content = [.. contentItems.Select(static item => item.ToContent())],
283
+ IsError = contentItems.Any(item => item is ErrorContent)
284
285
286
IEnumerable<Content> contents => new()
0 commit comments