(self, tool_name, arguments, namespace=None, timeout=None)
| 96 | self.executed_args = None |
| 97 | |
| 98 | async def execute_tool(self, tool_name, arguments, namespace=None, timeout=None): |
| 99 | self.executed_tool = tool_name |
| 100 | self.executed_args = arguments |
| 101 | if self.raise_exception: |
| 102 | raise Exception("Simulated execute_tool exception") |
| 103 | |
| 104 | # Return a ToolCallResult object, not a dict |
| 105 | if self.return_result.get("isError"): |
| 106 | return ToolCallResult( |
| 107 | tool_name=tool_name, |
| 108 | success=False, |
| 109 | result=None, |
| 110 | error=self.return_result.get("error", "Simulated error"), |
| 111 | ) |
| 112 | else: |
| 113 | return ToolCallResult( |
| 114 | tool_name=tool_name, |
| 115 | success=True, |
| 116 | result=self.return_result.get("content"), |
| 117 | error=None, |
| 118 | ) |
| 119 | |
| 120 | async def stream_execute_tools( |
| 121 | self, calls, timeout=None, on_tool_start=None, max_concurrency=4 |
nothing calls this directly
no test coverage detected