@@ -31,7 +31,7 @@ To get started writing a client, the `McpClientFactory.CreateAsync` method is us
31
31
to a server. Once you have an ` IMcpClient ` , you can interact with it, such as to enumerate all available tools and invoke tools.
32
32
33
33
``` csharp
34
- var clientTransport = new StdioClientTransport (new ()
34
+ var clientTransport = new StdioClientTransport (new StdioClientTransportOptions
35
35
{
36
36
Name = " Everything" ,
37
37
Command = " npx" ,
@@ -163,10 +163,10 @@ using System.Text.Json;
163
163
164
164
McpServerOptions options = new ()
165
165
{
166
- ServerInfo = new () { Name = " MyServer" , Version = " 1.0.0" },
167
- Capabilities = new ()
166
+ ServerInfo = new Implementation () { Name = " MyServer" , Version = " 1.0.0" },
167
+ Capabilities = new ServerCapabilities ()
168
168
{
169
- Tools = new ()
169
+ Tools = new ToolsCapability ()
170
170
{
171
171
ListToolsHandler = (request , cancellationToken ) =>
172
172
Task .FromResult (new ListToolsResult ()
@@ -199,7 +199,7 @@ McpServerOptions options = new()
199
199
{
200
200
if (request .Params .Arguments ? .TryGetValue (" message" , out var message ) is not true )
201
201
{
202
- throw new McpServerException (" Missing required argument 'message'" );
202
+ throw new McpException (" Missing required argument 'message'" );
203
203
}
204
204
205
205
return Task .FromResult (new CallToolResponse ()
@@ -208,7 +208,7 @@ McpServerOptions options = new()
208
208
});
209
209
}
210
210
211
- throw new McpServerException ($" Unknown tool: '{request .Params ? .Name }'" );
211
+ throw new McpException ($" Unknown tool: '{request .Params ? .Name }'" );
212
212
},
213
213
}
214
214
},
0 commit comments