36 references to McpServerToolCallContent
Microsoft.Extensions.AI.Abstractions.Tests (15)
Contents\AIContentTests.cs (3)
79
new
McpServerToolCallContent
("call123", "myTool", "myServer"),
81
new ToolApprovalRequestContent("request123", new
McpServerToolCallContent
("call123", "myTool", "myServer")),
82
new ToolApprovalResponseContent("request123", approved: true, new
McpServerToolCallContent
("call456", "myTool2", "myServer2")),
Contents\InputRequestContentTests.cs (1)
41
new ToolApprovalRequestContent("request456", new
McpServerToolCallContent
("call456", "myTool", "myServer")),
Contents\InputResponseContentTests.cs (1)
40
new ToolApprovalResponseContent("request456", true, new
McpServerToolCallContent
("call456", "myTool", "myServer")),
Contents\McpServerToolCallContentTests.cs (7)
16
McpServerToolCallContent c =
new
("callId1", "toolName", null);
30
McpServerToolCallContent c =
new
("callId1", "toolName", "serverName");
55
Assert.Throws<ArgumentException>("callId", () => new
McpServerToolCallContent
(string.Empty, "name", null));
56
Assert.Throws<ArgumentException>("name", () => new
McpServerToolCallContent
("callId1", string.Empty, null));
58
Assert.Throws<ArgumentNullException>("callId", () => new
McpServerToolCallContent
(null!, "name", null));
59
Assert.Throws<ArgumentNullException>("name", () => new
McpServerToolCallContent
("callId1", null!, null));
65
var content = new
McpServerToolCallContent
("call123", "myTool", "myServer")
Contents\ToolApprovalRequestContentTests.cs (1)
25
new
McpServerToolCallContent
("MCC1", "TestTool", "TestServer") { Arguments = new Dictionary<string, object?> { { "arg1", "value1" } } },
Contents\ToolApprovalResponseContentTests.cs (1)
25
new
McpServerToolCallContent
("MCC1", "TestTool", "TestServer") { Arguments = new Dictionary<string, object?> { { "arg1", "value1" } } },
Contents\ToolCallContentTests.cs (1)
57
new
McpServerToolCallContent
("call2", "myTool", "myServer"),
Microsoft.Extensions.AI.OpenAI (6)
OpenAIRealtimeClientSession.cs (3)
1186
new
McpServerToolCallContent
(callId, mcpItem.ToolName ?? string.Empty, mcpItem.ServerLabel)
1223
var toolCall = new
McpServerToolCallContent
(approvalId, approvalItem.ToolName ?? string.Empty, approvalItem.ServerLabel)
1241
contents.Add(new
McpServerToolCallContent
(toolDef.Name, toolDef.Name, toolListItem.ServerLabel)
OpenAIResponsesChatClient.cs (3)
226
var approvalRequest = new ToolApprovalRequestContent(mtcari.Id, new
McpServerToolCallContent
(mtcari.Id, mtcari.ToolName, mtcari.ServerLabel)
529
var streamApprovalRequest = new ToolApprovalRequestContent(mtcari.Id, new
McpServerToolCallContent
(mtcari.Id, mtcari.ToolName, mtcari.ServerLabel)
1845
contents.Add(new
McpServerToolCallContent
(mtci.Id, mtci.ToolName, mtci.ServerLabel)
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIConversionTests.cs (1)
1489
var mcpToolCall = new
McpServerToolCallContent
("call_123", "get_weather", "weather_server") { Arguments = new Dictionary<string, object?> { ["city"] = "Seattle" } };
Microsoft.Extensions.AI.Tests (14)
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (11)
1744
new ToolApprovalRequestContent("callId2", new
McpServerToolCallContent
("callId2", "McpCall", "myServer"))
1753
new ToolApprovalRequestContent("callId2", new
McpServerToolCallContent
("callId2", "McpCall", "myServer"))
1783
new ToolApprovalRequestContent("callId2", new
McpServerToolCallContent
("callId2", "McpCall", "myServer"))
1788
new ToolApprovalResponseContent("callId2", true, new
McpServerToolCallContent
("callId2", "McpCall", "myServer"))
1797
new ToolApprovalRequestContent("callId2", new
McpServerToolCallContent
("callId2", "McpCall", "myServer"))
1809
new ToolApprovalResponseContent("callId2", true, new
McpServerToolCallContent
("callId2", "McpCall", "myServer"))
1867
new ToolApprovalRequestContent("callId2", new
McpServerToolCallContent
("callId2", "McpCall", "myServer"))
1872
new ToolApprovalResponseContent("callId2", approveMcpCall, new
McpServerToolCallContent
("callId2", "McpCall", "myServer"))
1880
new ToolApprovalRequestContent("callId2", new
McpServerToolCallContent
("callId2", "McpCall", "myServer"))
1894
new ToolApprovalResponseContent("callId2", approveMcpCall, new
McpServerToolCallContent
("callId2", "McpCall", "myServer"))
2094
McpServerToolCallContent mstcc => new
McpServerToolCallContent
(mstcc.CallId, mstcc.Name, mstcc.ServerName)
ChatCompletion\OpenTelemetryChatClientTests.cs (3)
665
new
McpServerToolCallContent
("mcp-call-1", "myTool", "myServer") { Arguments = new Dictionary<string, object?> { ["param1"] = "value1" } },
690
yield return new() { Contents = [new
McpServerToolCallContent
("mcp-call-1", "myTool", "myServer") { Arguments = new Dictionary<string, object?> { ["param1"] = "value1" } }] };
836
var toolCall = new
McpServerToolCallContent
("mcp-call-2", "dangerousTool", "secureServer")