@@ -166,24 +166,24 @@ public static class MyPrompts
166166More control is also available , with fine - grained control over configuring the server and how it should handle client requests . For example :
167167
168168```csharp
169- using ModelContextProtocol . Protocol . Transport ;
170- using ModelContextProtocol .Protocol . Types ;
169+ using ModelContextProtocol ;
170+ using ModelContextProtocol .Protocol ;
171171using ModelContextProtocol .Server ;
172172using System .Text .Json ;
173173
174174McpServerOptions options = new ()
175175{
176- ServerInfo = new Implementation () { Name = " MyServer" , Version = " 1.0.0" },
177- Capabilities = new ServerCapabilities ()
176+ ServerInfo = new Implementation { Name = " MyServer" , Version = " 1.0.0" },
177+ Capabilities = new ServerCapabilities
178178 {
179- Tools = new ToolsCapability ()
179+ Tools = new ToolsCapability
180180 {
181181 ListToolsHandler = (request , cancellationToken ) =>
182- ValueTask .FromResult (new ListToolsResult ()
182+ ValueTask .FromResult (new ListToolsResult
183183 {
184184 Tools =
185185 [
186- new Tool ()
186+ new Tool
187187 {
188188 Name = " echo" ,
189189 Description = " Echoes the input back to the client." ,
@@ -212,9 +212,9 @@ McpServerOptions options = new()
212212 throw new McpException (" Missing required argument 'message'" );
213213 }
214214
215- return ValueTask .FromResult (new CallToolResponse ()
215+ return ValueTask .FromResult (new CallToolResult
216216 {
217- Content = [new Content () { Text = $" Echo: {message }" , Type = " text" }]
217+ Content = [new TextContentBlock { Text = $" Echo: {message }" , Type = " text" }]
218218 });
219219 }
220220
0 commit comments