Skip to content

Commit 3df8fa4

Browse files
committed
Cannot be null
1 parent aa0e673 commit 3df8fa4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ModelContextProtocol/Client/McpClientTool.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public sealed class McpClientTool : AIFunction
1313
private readonly string _name;
1414
private readonly string _description;
1515

16-
internal McpClientTool(IMcpClient client, Tool tool, JsonSerializerOptions serializerOptions,string? name = null, string? description = null)
16+
internal McpClientTool(IMcpClient client, Tool tool, JsonSerializerOptions serializerOptions, string? name = null, string? description = null)
1717
{
1818
_client = client;
1919
ProtocolTool = tool;
@@ -31,7 +31,6 @@ internal McpClientTool(IMcpClient client, Tool tool, JsonSerializerOptions seria
3131
/// <returns>Copy of this McpClientTool with the provided name</returns>
3232
public McpClientTool WithName(string name)
3333
{
34-
Throw.IfNull(name);
3534
return new McpClientTool(_client, ProtocolTool, JsonSerializerOptions, name, _description);
3635
}
3736

0 commit comments

Comments
 (0)