Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ModelContextProtocol/Server/AIFunctionMcpServerTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public override async Task<CallToolResponse> InvokeAsync(
return new CallToolResponse()
{
IsError = true,
Content = [new() { Text = e.Message, Type = "text" }],
Content = [new() { Text = $"An error occurred invoking '{request.Params?.Name}'.", Type = "text" }],
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ public async Task Returns_IsError_Content_When_Tool_Fails()
Assert.True(result.IsError);
Assert.NotNull(result.Content);
Assert.NotEmpty(result.Content);
Assert.Contains("Test error", result.Content[0].Text);
Assert.Contains("An error occurred", result.Content[0].Text);
}

[Fact]
Expand Down