Create sample tools for testing.
()
| 59 | |
| 60 | @pytest.fixture |
| 61 | def sample_tools() -> list[ToolInfo]: |
| 62 | """Create sample tools for testing.""" |
| 63 | return [ |
| 64 | ToolInfo( |
| 65 | name="calculator", |
| 66 | namespace="math", |
| 67 | description="Performs mathematical calculations", |
| 68 | parameters={ |
| 69 | "type": "object", |
| 70 | "properties": { |
| 71 | "expression": {"type": "string", "description": "Math expression"}, |
| 72 | }, |
| 73 | "required": ["expression"], |
| 74 | }, |
| 75 | ), |
| 76 | ToolInfo( |
| 77 | name="weather", |
| 78 | namespace="api", |
| 79 | description="Gets current weather for a location", |
| 80 | parameters={ |
| 81 | "type": "object", |
| 82 | "properties": { |
| 83 | "city": {"type": "string", "description": "City name"}, |
| 84 | }, |
| 85 | "required": ["city"], |
| 86 | }, |
| 87 | ), |
| 88 | ToolInfo( |
| 89 | name="search", |
| 90 | namespace="web", |
| 91 | description="Searches the web for information", |
| 92 | parameters={ |
| 93 | "type": "object", |
| 94 | "properties": { |
| 95 | "query": {"type": "string", "description": "Search query"}, |
| 96 | }, |
| 97 | "required": ["query"], |
| 98 | }, |
| 99 | ), |
| 100 | ] |
| 101 | |
| 102 | |
| 103 | @pytest.fixture |