12 instantiations of McpServerToolCallContent
Microsoft.Extensions.AI.Abstractions.Tests (9)
Contents\AIContentTests.cs (2)
75new McpServerToolCallContent("call123", "myTool", "myServer"), 77new McpServerToolApprovalRequestContent("request123", new McpServerToolCallContent("call123", "myTool", "myServer")),
Contents\McpServerToolCallContentTests.cs (6)
15McpServerToolCallContent c = new("callId1", "toolName", null); 29McpServerToolCallContent c = new("callId1", "toolName", "serverName"); 54Assert.Throws<ArgumentException>("callId", () => new McpServerToolCallContent(string.Empty, "name", null)); 55Assert.Throws<ArgumentException>("toolName", () => new McpServerToolCallContent("callId1", string.Empty, null)); 57Assert.Throws<ArgumentNullException>("callId", () => new McpServerToolCallContent(null!, "name", null)); 58Assert.Throws<ArgumentNullException>("toolName", () => new McpServerToolCallContent("callId1", null!, null));
Contents\UserInputRequestContentTests.cs (1)
45new McpServerToolApprovalRequestContent("request123", new McpServerToolCallContent("call123", "myTool", "myServer")),
Microsoft.Extensions.AI.OpenAI (3)
OpenAIResponsesChatClient.cs (3)
210message.Contents.Add(new McpServerToolApprovalRequestContent(mtcari.Id, new(mtcari.Id, mtcari.ToolName, mtcari.ServerLabel) 428yield return CreateUpdate(new McpServerToolApprovalRequestContent(mtcari.Id, new(mtcari.Id, mtcari.ToolName, mtcari.ServerLabel) 1301contents.Add(new McpServerToolCallContent(mtci.Id, mtci.ToolName, mtci.ServerLabel)
22 references to McpServerToolCallContent
Microsoft.Extensions.AI.Abstractions (5)
Contents\McpServerToolApprovalRequestContent.cs (2)
24public McpServerToolApprovalRequestContent(string id, McpServerToolCallContent toolCall) 33public McpServerToolCallContent ToolCall { get; }
Contents\McpServerToolCallContent.cs (1)
22/// Initializes a new instance of the <see cref="McpServerToolCallContent"/> class.
Utilities\AIJsonUtilities.Defaults.cs (2)
56AddAIContentType(options, typeof(McpServerToolCallContent), typeDiscriminatorId: "mcpServerToolCall", checkBuiltIn: false); 130[JsonSerializable(typeof(McpServerToolCallContent))]
Microsoft.Extensions.AI.Abstractions.Tests (2)
Contents\McpServerToolCallContentTests.cs (2)
15McpServerToolCallContent c = new("callId1", "toolName", null); 29McpServerToolCallContent c = new("callId1", "toolName", "serverName");
Microsoft.Extensions.AI.OpenAI (2)
OpenAIResponsesChatClient.cs (2)
1099case McpServerToolCallContent mstcc: 1105callContentFromMapping is McpServerToolCallContent associatedCall)
Microsoft.Extensions.AI.OpenAI.Tests (13)
OpenAIResponseClientIntegrationTests.cs (3)
145Assert.NotEmpty(response.Messages.SelectMany(m => m.Contents).OfType<McpServerToolCallContent>()); 420var toolCall = Assert.Single(response.Messages.SelectMany(m => m.Contents).OfType<McpServerToolCallContent>());
OpenAIResponseClientTests.cs (10)
1433var call = Assert.IsType<McpServerToolCallContent>(message.Contents[0]); 1688var firstCall = Assert.IsType<McpServerToolCallContent>(message.Contents[1]); 1701var secondCall = Assert.IsType<McpServerToolCallContent>(message.Contents[3]); 2101var firstCall = Assert.IsType<McpServerToolCallContent>(message.Contents[1]); 2114var secondCall = Assert.IsType<McpServerToolCallContent>(message.Contents[3]);