MCPcopy Index your code
hub / github.com/shareAI-lab/learn-claude-code / call_tool

Method call_tool

s19_mcp_plugin/code.py:673–680  ·  view source on GitHub ↗
(self, tool_name: str, args: dict)

Source from the content-addressed store, hash-verified

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
683mcp_clients: dict[str, MCPClient] = {}

Callers 1

assemble_tool_poolFunction · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected