获取工具的 Schema Args: name: 工具名称 Returns: 工具 Schema 定义
(self, name: str)
| 174 | return data.get("tools", []) |
| 175 | |
| 176 | async def get_tool_schema(self, name: str) -> Dict[str, Any]: |
| 177 | """ |
| 178 | 获取工具的 Schema |
| 179 | |
| 180 | Args: |
| 181 | name: 工具名称 |
| 182 | |
| 183 | Returns: |
| 184 | 工具 Schema 定义 |
| 185 | """ |
| 186 | session = await self._get_session() |
| 187 | |
| 188 | async with session.get( |
| 189 | f"{self.base_url}/tools/schema", |
| 190 | params={"name": name}, |
| 191 | ) as resp: |
| 192 | return await resp.json() |
| 193 | |
| 194 | async def close(self): |
| 195 | """关闭 HTTP 会话""" |
nothing calls this directly
no test coverage detected