fix(mcp): do not leak server credentials in 403 'tool not allowed' error

This commit is contained in:
Tai An 2026-06-08 09:08:14 -07:00
parent e182a5e0ba
commit ed48714145

View file

@ -2077,7 +2077,7 @@ if MCP_AVAILABLE:
):
raise HTTPException(
status_code=403,
detail=f"User not allowed to call this tool. Allowed MCP servers: {allowed_mcp_servers}",
detail=f"User not allowed to call this tool. Allowed MCP servers: {[server.name for server in allowed_mcp_servers]}",
)
standard_logging_mcp_tool_call: StandardLoggingMCPToolCall = (