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

Method execute_tool

tests/tools/test_execution.py:514–528  ·  view source on GitHub ↗
(
        self,
        tool_name: str,
        arguments: dict,
        namespace: str | None = None,
        timeout: float | None = None,
    )

Source from the content-addressed store, hash-verified

512 self.executed_tools: list[str] = []
513
514 async def execute_tool(
515 self,
516 tool_name: str,
517 arguments: dict,
518 namespace: str | None = None,
519 timeout: float | None = None,
520 ) -> ToolCallResult:
521 delay = self.delays.get(tool_name, self.default_delay)
522 await asyncio.sleep(delay)
523 self.executed_tools.append(tool_name)
524 return ToolCallResult(
525 tool_name=tool_name,
526 success=True,
527 result={"output": f"result from {tool_name}"},
528 )
529
530
531@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 2

ToolCallResultClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected