(self, tool_name: str, args: dict)
| 671 | self._handlers = handlers |
| 672 | |
| 673 | def call_tool(self, tool_name: str, args: dict) -> str: |
| 674 | handler = self._handlers.get(tool_name) |
| 675 | if not handler: |
| 676 | return f"MCP error: unknown tool '{tool_name}'" |
| 677 | try: |
| 678 | return handler(**args) |
| 679 | except Exception as e: |
| 680 | return f"MCP error: {e}" |
| 681 | |
| 682 | |
| 683 | mcp_clients: dict[str, MCPClient] = {} |
no test coverage detected