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