feat(settings): add MCP tools introspection endpoint

This commit is contained in:
2026-05-04 06:34:19 +00:00
parent 69bdf7b30a
commit 272e49b6b0
2 changed files with 64 additions and 0 deletions

View File

@@ -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")