MCPcopy Create free account
hub / github.com/IBM/mcp-cli / execute_tool

Method execute_tool

tests/planning/test_executor.py:59–68  ·  view source on GitHub ↗
(self, tool_name, arguments, namespace=None, timeout=None)

Source from the content-addressed store, hash-verified

57 return [FakeToolInfo(n) for n in self._results.keys()] if self._results else []
58
59 async def execute_tool(self, tool_name, arguments, namespace=None, timeout=None):
60 if self._delay > 0:
61 await asyncio.sleep(self._delay)
62 self.calls.append((tool_name, arguments))
63 result = self._results.get(tool_name, "default result")
64 if isinstance(result, Exception):
65 return FakeToolCallResult(
66 tool_name=tool_name, success=False, error=str(result)
67 )
68 return FakeToolCallResult(tool_name=tool_name, result=result)
69
70
71class FailingToolManager(FakeToolManager):

Callers

nothing calls this directly

Calls 2

FakeToolCallResultClass · 0.70
getMethod · 0.45

Tested by

no test coverage detected