File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
samples/WeihanLi.Web.Extensions.Samples Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -24,15 +24,15 @@ public class McpServerEndpointConfigureOptions(EndpointDataSource endpointDataSo
2424 public void Configure ( McpServerOptions options )
2525 {
2626 options . Capabilities ??= new ( ) ;
27- options . Capabilities . Tools . ToolCollection ??= new ( ) ;
27+ options . Capabilities . Tools . ToolCollection ??= new ( ) ;
2828
2929 foreach ( var endpoint in endpointDataSource . Endpoints )
3030 {
3131 if ( ! endpoint . Metadata . Any ( m => m is IMcpToolEndpointMetadata ) )
3232 continue ;
33-
33+
3434 Debug . Assert ( endpoint . RequestDelegate is not null ) ;
35-
35+
3636 var tool = McpServerTool . Create ( endpoint . RequestDelegate . Method , typeof ( HttpContext ) , new McpServerToolCreateOptions
3737 {
3838 Services = services
@@ -47,11 +47,11 @@ public static class McpToolExtension
4747 public static IMcpServerBuilder WithEndpointTools ( this IMcpServerBuilder builder )
4848 {
4949 ArgumentNullException . ThrowIfNull ( builder ) ;
50-
50+
5151 builder . Services . TryAddEnumerable ( ServiceDescriptor . Singleton < IConfigureOptions < McpServerOptions > , McpServerEndpointConfigureOptions > ( ) ) ;
5252 return builder ;
5353 }
54-
54+
5555 public static IEndpointConventionBuilder AsMcpTool < TBuilder > ( this TBuilder builder , Action < McpToolEndpointMetadata > ? toolConfigure = null )
5656 where TBuilder : IEndpointConventionBuilder
5757 {
@@ -76,5 +76,5 @@ public static IEndpointConventionBuilder AsMcpTool<TBuilder>(this TBuilder build
7676
7777internal sealed class McpInvocation ( IHttpContextAccessor contextAccessor )
7878{
79-
79+
8080}
You can’t perform that action at this time.
0 commit comments