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

Method execute_tool

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

Source from the content-addressed store, hash-verified

76 self._fail_tools = fail_tools
77
78 async def execute_tool(self, tool_name, arguments, namespace=None, timeout=None):
79 self.calls.append((tool_name, arguments))
80 if tool_name in self._fail_tools:
81 return FakeToolCallResult(
82 tool_name=tool_name, success=False, error=f"{tool_name} failed"
83 )
84 result = self._results.get(tool_name, "default result")
85 return FakeToolCallResult(tool_name=tool_name, result=result)
86
87
88SAMPLE_PLAN = {

Callers

nothing calls this directly

Calls 2

FakeToolCallResultClass · 0.70
getMethod · 0.45

Tested by

no test coverage detected