parent
9f0beec63a
commit
9c597aad90
1 changed files with 533 additions and 37 deletions
|
|
@ -37,8 +37,7 @@ public static partial class McpServerBuilderExtensions
|
|||
/// <param name="toolTypes">Types with marked methods to add as tools to the server.</param>
|
||||
public static IMcpServerBuilder WithTools(this IMcpServerBuilder builder, params Type[] toolTypes)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(toolTypes);
|
||||
if (toolTypes.Length == 0)
|
||||
if (toolTypes is null || toolTypes.Length == 0)
|
||||
throw new ArgumentException("At least one tool type must be provided.", nameof(toolTypes));
|
||||
|
||||
var tools = new List<Tool>();
|
||||
|
|
|
|||
Loading…
Reference in a new issue