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

Method execute_tool

tests/planning/test_backends.py:55–70  ·  view source on GitHub ↗
(
        self,
        tool_name: str,
        arguments: dict[str, Any],
        namespace: str | None = None,
        timeout: float | None = None,
    )

Source from the content-addressed store, hash-verified

53 self.calls: list[tuple[str, dict, str | None]] = []
54
55 async def execute_tool(
56 self,
57 tool_name: str,
58 arguments: dict[str, Any],
59 namespace: str | None = None,
60 timeout: float | None = None,
61 ) -> FakeToolCallResult:
62 self.calls.append((tool_name, arguments, namespace))
63 if self._raise_exc:
64 raise self._raise_exc
65 return FakeToolCallResult(
66 tool_name=tool_name,
67 success=self._success,
68 result=self._result,
69 error=self._error,
70 )
71
72
73# ── Tests: Basic Execution ───────────────────────────────────────────────────

Callers

nothing calls this directly

Calls 1

FakeToolCallResultClass · 0.70

Tested by

no test coverage detected