Mock weather tool for testing.
| 8 | |
| 9 | |
| 10 | class MockWeatherTool(Tool): |
| 11 | """Mock weather tool for testing.""" |
| 12 | |
| 13 | @property |
| 14 | def name(self) -> str: |
| 15 | return "get_weather" |
| 16 | |
| 17 | @property |
| 18 | def description(self) -> str: |
| 19 | return "Get weather information" |
| 20 | |
| 21 | @property |
| 22 | def parameters(self) -> dict[str, Any]: |
| 23 | return { |
| 24 | "type": "object", |
| 25 | "properties": { |
| 26 | "location": { |
| 27 | "type": "string", |
| 28 | "description": "Location name", |
| 29 | }, |
| 30 | }, |
| 31 | "required": ["location"], |
| 32 | } |
| 33 | |
| 34 | async def execute(self, **kwargs) -> ToolResult: |
| 35 | return ToolResult(success=True, content="Weather data") |
| 36 | |
| 37 | |
| 38 | class MockCalculatorTool(Tool): |
no outgoing calls