fix: Add support for tools/list method to resolve MCP scanning issue

This commit is contained in:
Barry Yip 2025-05-15 01:53:29 +08:00
parent c1a0164d78
commit 3c902e350b
1 changed files with 6 additions and 0 deletions

View File

@ -161,7 +161,13 @@ export class StreamableHttpTransport implements MCPTransport {
id: req.body.id
});
case 'tools/list':
// New MCP method name format
result = { tools: toolList };
break;
case 'list_tools':
// Legacy method name for backward compatibility
result = { tools: toolList };
break;