enh: external tool server custom name/description support

This commit is contained in:
Timothy Jaeryang Baek
2025-05-27 00:10:33 +04:00
parent 20f54616e7
commit a38e44e870
3 changed files with 69 additions and 7 deletions

View File

@@ -51,11 +51,11 @@ async def get_tools(request: Request, user=Depends(get_verified_user)):
**{
"id": f"server:{server['idx']}",
"user_id": f"server:{server['idx']}",
"name": server["openapi"]
"name": server.get("openapi", {})
.get("info", {})
.get("title", "Tool Server"),
"meta": {
"description": server["openapi"]
"description": server.get("openapi", {})
.get("info", {})
.get("description", ""),
},