11 instantiations of McpServerToolCallContent
Microsoft.Extensions.AI.Abstractions.Tests (8)
Contents\McpServerToolCallContentTests.cs (8)
15McpServerToolCallContent c = new("callId1", "toolName", "serverName"); 30McpServerToolCallContent c = new("callId1", "toolName", "serverName"); 55Assert.Throws<ArgumentException>("callId", () => new McpServerToolCallContent(string.Empty, "name", "serverName")); 56Assert.Throws<ArgumentException>("toolName", () => new McpServerToolCallContent("callId1", string.Empty, "serverName")); 57Assert.Throws<ArgumentException>("serverName", () => new McpServerToolCallContent("callId1", "name", string.Empty)); 59Assert.Throws<ArgumentNullException>("callId", () => new McpServerToolCallContent(null!, "name", "serverName")); 60Assert.Throws<ArgumentNullException>("toolName", () => new McpServerToolCallContent("callId1", null!, "serverName")); 61Assert.Throws<ArgumentNullException>("serverName", () => new McpServerToolCallContent("callId1", "name", null!));
Microsoft.Extensions.AI.OpenAI (3)
OpenAIResponsesChatClient.cs (3)
167message.Contents.Add(new McpServerToolApprovalRequestContent(mtcari.Id, new(mtcari.Id, mtcari.ToolName, mtcari.ServerLabel) 291yield return CreateUpdate(new McpServerToolApprovalRequestContent(mtcari.Id, new(mtcari.Id, mtcari.ToolName, mtcari.ServerLabel) 848contents.Add(new McpServerToolCallContent(mtci.Id, mtci.ToolName, mtci.ServerLabel)
16 references to McpServerToolCallContent
Microsoft.Extensions.AI.Abstractions (3)
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.
Microsoft.Extensions.AI.Abstractions.Tests (2)
Contents\McpServerToolCallContentTests.cs (2)
15McpServerToolCallContent c = new("callId1", "toolName", "serverName"); 30McpServerToolCallContent c = new("callId1", "toolName", "serverName");
Microsoft.Extensions.AI.OpenAI (2)
OpenAIResponsesChatClient.cs (2)
650case McpServerToolCallContent mstcc: 656callContentFromMapping is McpServerToolCallContent associatedCall)
Microsoft.Extensions.AI.OpenAI.Tests (9)
OpenAIResponseClientIntegrationTests.cs (1)
100Assert.NotEmpty(response.Messages.SelectMany(m => m.Contents).OfType<McpServerToolCallContent>());
OpenAIResponseClientTests.cs (8)
1058var firstCall = Assert.IsType<McpServerToolCallContent>(message.Contents[1]); 1071var secondCall = Assert.IsType<McpServerToolCallContent>(message.Contents[3]); 1472var firstCall = Assert.IsType<McpServerToolCallContent>(message.Contents[1]); 1485var secondCall = Assert.IsType<McpServerToolCallContent>(message.Contents[3]);