File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -313,7 +313,6 @@ export class MCPServer {
313313 }
314314
315315 if ( this . capabilities . resources ) {
316- // No request parameter for ListResources
317316 this . server . setRequestHandler ( ListResourcesRequestSchema , async ( ) => {
318317 return {
319318 resources : Array . from ( this . resourcesMap . values ( ) ) . map (
@@ -380,13 +379,18 @@ export class MCPServer {
380379 }
381380
382381 private async detectCapabilities ( ) : Promise < ServerCapabilities > {
382+ if ( await this . toolLoader . hasTools ( ) ) {
383+ this . capabilities . tools = { } ;
384+ logger . debug ( "Tools capability enabled" ) ;
385+ }
386+
383387 if ( await this . promptLoader . hasPrompts ( ) ) {
384- this . capabilities . prompts = { } ; // Indicate capability exists, but don't claim listChanged
388+ this . capabilities . prompts = { } ;
385389 logger . debug ( "Prompts capability enabled" ) ;
386390 }
387391
388392 if ( await this . resourceLoader . hasResources ( ) ) {
389- this . capabilities . resources = { } ; // Indicate capability exists, but don't claim listChanged/subscribe
393+ this . capabilities . resources = { } ;
390394 logger . debug ( "Resources capability enabled" ) ;
391395 }
392396
You can’t perform that action at this time.
0 commit comments