(self, tool_name, arguments, namespace=None, timeout=None)
| 69 | return [self.ToolInfo(name=n) for n in self.TOOLS] |
| 70 | |
| 71 | async def execute_tool(self, tool_name, arguments, namespace=None, timeout=None): |
| 72 | await asyncio.sleep(self._delay) # Simulate network latency |
| 73 | self.call_log.append((tool_name, arguments)) |
| 74 | |
| 75 | if tool_name in self._fail_tools: |
| 76 | return FakeToolCallResult( |
| 77 | tool_name=tool_name, |
| 78 | success=False, |
| 79 | error=f"Connection refused: {tool_name} server is down", |
| 80 | ) |
| 81 | |
| 82 | result = self.TOOLS.get(tool_name, f"Result from {tool_name}") |
| 83 | return FakeToolCallResult(tool_name=tool_name, result=result) |
| 84 | |
| 85 | |
| 86 | # ── Demo Plans ────────────────────────────────────────────────────────────── |
nothing calls this directly
no test coverage detected