File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -313,7 +313,6 @@ export class MCPServer {
313
313
}
314
314
315
315
if ( this . capabilities . resources ) {
316
- // No request parameter for ListResources
317
316
this . server . setRequestHandler ( ListResourcesRequestSchema , async ( ) => {
318
317
return {
319
318
resources : Array . from ( this . resourcesMap . values ( ) ) . map (
@@ -380,13 +379,18 @@ export class MCPServer {
380
379
}
381
380
382
381
private async detectCapabilities ( ) : Promise < ServerCapabilities > {
382
+ if ( await this . toolLoader . hasTools ( ) ) {
383
+ this . capabilities . tools = { } ;
384
+ logger . debug ( "Tools capability enabled" ) ;
385
+ }
386
+
383
387
if ( await this . promptLoader . hasPrompts ( ) ) {
384
- this . capabilities . prompts = { } ; // Indicate capability exists, but don't claim listChanged
388
+ this . capabilities . prompts = { } ;
385
389
logger . debug ( "Prompts capability enabled" ) ;
386
390
}
387
391
388
392
if ( await this . resourceLoader . hasResources ( ) ) {
389
- this . capabilities . resources = { } ; // Indicate capability exists, but don't claim listChanged/subscribe
393
+ this . capabilities . resources = { } ;
390
394
logger . debug ( "Resources capability enabled" ) ;
391
395
}
392
396
You can’t perform that action at this time.
0 commit comments