call_tool can execute a FunctionTool by name.
(self)
| 162 | await ts._handle_search({"query": ""}) |
| 163 | |
| 164 | async def test_call_tool_function_tool(self): |
| 165 | """call_tool can execute a FunctionTool by name.""" |
| 166 | ts = ToolProxyToolset( |
| 167 | id="proxy", |
| 168 | tools=[WeatherToolset(), FinanceToolset()], |
| 169 | ) |
| 170 | await ts.setup() |
| 171 | |
| 172 | result = await ts._handle_call( |
| 173 | _mock_ctx(), {"name": "weather_tool", "parameters": {"city": "London"}} |
| 174 | ) |
| 175 | assert "sunny in London" in str(result) |
| 176 | |
| 177 | async def test_call_tool_with_multiple_args(self): |
| 178 | ts = ToolProxyToolset( |
nothing calls this directly
no test coverage detected