列出所有可用工具 Returns: 工具名称列表
(self)
| 161 | raise NetworkError(f"Failed to call tool {name} after {self.max_retries} attempts") |
| 162 | |
| 163 | async def list_tools(self) -> list: |
| 164 | """ |
| 165 | 列出所有可用工具 |
| 166 | |
| 167 | Returns: |
| 168 | 工具名称列表 |
| 169 | """ |
| 170 | session = await self._get_session() |
| 171 | |
| 172 | async with session.get(f"{self.base_url}/tools/list") as resp: |
| 173 | data = await resp.json() |
| 174 | return data.get("tools", []) |
| 175 | |
| 176 | async def get_tool_schema(self, name: str) -> Dict[str, Any]: |
| 177 | """ |
nothing calls this directly
no test coverage detected