From 691ecc685b1a7219032d3bb8182e53339733a8dc Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Mon, 9 Mar 2026 20:53:18 -0700 Subject: [PATCH] fix: enable/disable all operates on full tool set, not just filtered subset --- .../components/mcp_tools/mcp_tool_configuration.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ui/litellm-dashboard/src/components/mcp_tools/mcp_tool_configuration.tsx b/ui/litellm-dashboard/src/components/mcp_tools/mcp_tool_configuration.tsx index 6e21339c8a6..c6bf39828e4 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/mcp_tool_configuration.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/mcp_tool_configuration.tsx @@ -296,24 +296,27 @@ const MCPToolConfiguration: React.FC = ({ }; const handleEnableSuggested = () => { - const suggestedNames = pinnedFiltered.map((t) => t.name); + // Enable ALL suggested tools (not just the currently filtered subset) + const suggestedNames = suggestedTools.map((t) => t.name); const others = allowedTools.filter((n) => !suggestedToolNames.has(n)); onAllowedToolsChange([...others, ...suggestedNames]); }; const handleDisableSuggested = () => { + // Disable ALL suggested tools (not just the currently filtered subset) onAllowedToolsChange(allowedTools.filter((n) => !suggestedToolNames.has(n))); }; const handleEnableRest = () => { - const restNames = restFiltered.map((t) => t.name); + // Enable ALL non-suggested tools (not just the currently filtered subset) + const restNames = tools.filter((t) => !suggestedToolNames.has(t.name)).map((t) => t.name); const current = new Set(allowedTools); onAllowedToolsChange([...allowedTools, ...restNames.filter((n) => !current.has(n))]); }; const handleDisableRest = () => { - const restNameSet = new Set(restFiltered.map((t) => t.name)); - onAllowedToolsChange(allowedTools.filter((n) => !restNameSet.has(n))); + // Disable ALL non-suggested tools (not just the currently filtered subset) + onAllowedToolsChange(allowedTools.filter((n) => suggestedToolNames.has(n))); }; // Don't show anything if required fields aren't filled