diff --git a/ui/litellm-dashboard/src/components/mcp_server_management/MCPToolPermissions.test.tsx b/ui/litellm-dashboard/src/components/mcp_server_management/MCPToolPermissions.test.tsx index f480e296155..d18e1993388 100644 --- a/ui/litellm-dashboard/src/components/mcp_server_management/MCPToolPermissions.test.tsx +++ b/ui/litellm-dashboard/src/components/mcp_server_management/MCPToolPermissions.test.tsx @@ -84,8 +84,9 @@ describe("MCPToolPermissions", () => { // Verify API calls // Note: useMCPServers uses useAuthorized() internally, which returns "123" from global mock expect(networking.fetchMCPServers).toHaveBeenCalledWith("123", undefined); - // listMCPTools uses the accessToken prop directly - expect(networking.listMCPTools).toHaveBeenCalledWith(mockAccessToken, mockServerId); + // listMCPTools uses the accessToken prop directly and requests the full + // catalog (includeDisabledTools) so delete-classified tools stay editable + expect(networking.listMCPTools).toHaveBeenCalledWith(mockAccessToken, mockServerId, undefined, true); }); it("should select all tools when Select All button is clicked", async () => { @@ -221,7 +222,7 @@ describe("MCPToolPermissions", () => { expect(await screen.findByText("Group Server")).toBeInTheDocument(); expect(await screen.findByText("list_issues")).toBeInTheDocument(); expect(screen.getByText("delete_issue")).toBeInTheDocument(); - expect(networking.listMCPTools).toHaveBeenCalledWith(mockAccessToken, groupServer.server_id); + expect(networking.listMCPTools).toHaveBeenCalledWith(mockAccessToken, groupServer.server_id, undefined, true); }); it("shows non-delete tools checked and the delete unchecked in flat view for an unrestricted access-group server", async () => { @@ -712,7 +713,7 @@ describe("MCPToolPermissions", () => { expect(await screen.findByText("github_mcp")).toBeInTheDocument(); expect(await screen.findByText("list_issues")).toBeInTheDocument(); expect(screen.getByText("delete_issue")).toBeInTheDocument(); - expect(networking.listMCPTools).toHaveBeenCalledWith(mockAccessToken, namedServer.server_id); + expect(networking.listMCPTools).toHaveBeenCalledWith(mockAccessToken, namedServer.server_id, undefined, true); }); it("writes an edit back to the name key instead of adding a second id-keyed entry", async () => { diff --git a/ui/litellm-dashboard/src/components/mcp_server_management/MCPToolPermissions.tsx b/ui/litellm-dashboard/src/components/mcp_server_management/MCPToolPermissions.tsx index 5a92ddfc03d..8358f50865e 100644 --- a/ui/litellm-dashboard/src/components/mcp_server_management/MCPToolPermissions.tsx +++ b/ui/litellm-dashboard/src/components/mcp_server_management/MCPToolPermissions.tsx @@ -102,7 +102,7 @@ const MCPToolPermissions: React.FC = ({ setToolErrors((prev) => ({ ...prev, [serverId]: "" })); try { - const response = await listMCPTools(token, serverId); + const response = await listMCPTools(token, serverId, undefined, true); if (response.error) { setToolErrors((prev) => ({ ...prev, [serverId]: response.message || "Failed to fetch tools" }));