12 instantiations of HostedMcpServerTool
Microsoft.Extensions.AI.Abstractions.Tests (7)
Tools\HostedMcpServerToolTests.cs (7)
15HostedMcpServerTool tool = new("serverName", "https://localhost/"); 30HostedMcpServerTool tool = new("serverName", "https://localhost/"); 70Assert.Throws<ArgumentException>(() => new HostedMcpServerTool(string.Empty, new Uri("https://localhost/"))); 71Assert.Throws<ArgumentNullException>(() => new HostedMcpServerTool(null!, new Uri("https://localhost/"))); 72Assert.Throws<ArgumentNullException>(() => new HostedMcpServerTool("name", (Uri)null!)); 73Assert.Throws<ArgumentNullException>(() => new HostedMcpServerTool("name", (string)null!)); 74Assert.Throws<UriFormatException>(() => new HostedMcpServerTool("name", string.Empty));
Microsoft.Extensions.AI.OpenAI.Tests (5)
OpenAIResponseClientIntegrationTests.cs (3)
60Tools = [new HostedMcpServerTool("deepwiki", "https://mcp.deepwiki.com/mcp") { ApprovalMode = HostedMcpServerToolApprovalMode.NeverRequire }], 82Tools = [new HostedMcpServerTool("deepwiki", "https://mcp.deepwiki.com/mcp") 122Tools = [new HostedMcpServerTool("deepwiki", "https://mcp.deepwiki.com/mcp")
OpenAIResponseClientTests.cs (2)
1036Tools = [new HostedMcpServerTool("deepwiki", "https://mcp.deepwiki.com/mcp") 1449Tools = [new HostedMcpServerTool("deepwiki", "https://mcp.deepwiki.com/mcp")
6 references to HostedMcpServerTool
Microsoft.Extensions.AI.Abstractions (2)
Tools\HostedMcpServerTool.cs (2)
18/// Initializes a new instance of the <see cref="HostedMcpServerTool"/> class. 30/// Initializes a new instance of the <see cref="HostedMcpServerTool"/> class.
Microsoft.Extensions.AI.Abstractions.Tests (3)
Tools\HostedMcpServerToolTests.cs (3)
15HostedMcpServerTool tool = new("serverName", "https://localhost/"); 30HostedMcpServerTool tool = new("serverName", "https://localhost/"); 34Assert.Equal(nameof(HostedMcpServerTool), tool.Name);
Microsoft.Extensions.AI.OpenAI (1)
OpenAIResponsesChatClient.cs (1)
456case HostedMcpServerTool mcpTool: