feat(settings): add MCP tools introspection endpoint
This commit is contained in:
12
web/app.py
12
web/app.py
@@ -2806,6 +2806,18 @@ async def api_mcp_env_redeploy():
|
||||
}
|
||||
|
||||
|
||||
@app.get("/api/settings/mcp/tools")
|
||||
async def api_mcp_tools():
|
||||
"""List all MCP tools registered in legal_mcp."""
|
||||
from web.mcp_introspection import list_mcp_tools
|
||||
try:
|
||||
tools = await list_mcp_tools()
|
||||
except Exception as e:
|
||||
logger.exception("mcp_tools_introspection_failed")
|
||||
raise HTTPException(500, f"Tools introspection failed: {e}")
|
||||
return {"tools": tools, "count": len(tools)}
|
||||
|
||||
|
||||
# ── Settings: Tag → Company Mappings ──────────────────────────────
|
||||
|
||||
@app.get("/api/settings/paperclip-companies")
|
||||
|
||||
Reference in New Issue
Block a user