Skip to content

feat: add select/deselect all tools option for MCP server endpoints#5266

Merged
saifsmailbox98 merged 9 commits intomainfrom
devin/1769369211-mcp-select-all-tools
Jan 25, 2026
Merged

feat: add select/deselect all tools option for MCP server endpoints#5266
saifsmailbox98 merged 9 commits intomainfrom
devin/1769369211-mcp-select-all-tools

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Jan 25, 2026

Context

When enabling/disabling tools on an MCP server in Agent Sentinel, users currently have to toggle tools one by one, which is tedious when dealing with servers that have many tools. This PR adds a select/deselect all toggle in the header of the tool list for each connected server.

The toggle:

  • Shows checked state when all (filtered) tools are enabled
  • Shows unchecked state when some or no tools are enabled
  • Uses the existing bulk update API for efficient updates
  • Respects the search filter (only toggles visible/filtered tools)
  • Respects permissions and shows disabled state when user cannot edit

Updates since last revision

Based on PR feedback:

  • Changed from Checkbox to Switch component for the toggle
  • Moved toggle to a separate row above the header with bg-mineshaft-700 background
  • Updated toggle label to "Enable all tools" (tooltip shows context-aware "Enable/Disable all tools")
  • Removed success notification when toggling all tools (error notification retained)
  • Reverted backend auto-enable feature (toggle is convenient enough for users)

Screenshots

N/A - No local testing was performed. UI changes should be verified.

Steps to verify the change

  1. Navigate to Agent Sentinel > MCP Endpoints
  2. Select an endpoint that has connected MCP servers with tools
  3. Expand a server's tool list
  4. Verify the Switch toggle appears in a row above the header with "Enable all tools" label
  5. Test clicking the toggle to enable/disable all tools
  6. Test with a search filter active to verify it only toggles filtered tools

Human review checklist

  • Verify the Switch component renders correctly in the new row layout
  • Test bulk enable/disable with multiple tools
  • Confirm search filter correctly limits which tools are toggled
  • Check that permissions are respected (disabled state when user cannot edit)
  • Verify tooltip shows "Enable all tools" / "Disable all tools" on hover

Type

  • Fix
  • Feature
  • Improvement
  • Breaking
  • Docs
  • Chore

Checklist


Link to Devin run: https://app.devin.ai/sessions/b2b483a48ae9421b8823fa568d9e6bc2
Requested by: Tony (@dangtony98)

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@maidul98
Copy link
Collaborator

maidul98 commented Jan 25, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 25, 2026

Greptile Overview

Greptile Summary

This PR adds a select/deselect all checkbox to the MCP endpoint tool selection UI, enabling users to efficiently toggle multiple tools at once. The implementation:

  • Uses the existing useBulkUpdateEndpointTools API for efficient batch updates
  • Properly calculates checked, unchecked, and indeterminate states based on filtered tools
  • Respects user permissions and shows disabled state when editing is not allowed
  • Respects search filters (only toggles visible/filtered tools)
  • Provides clear tooltips for user guidance
  • Includes proper error handling with user-friendly notifications

The code follows established patterns in the codebase and integrates cleanly with existing functionality.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The implementation is well-structured, uses existing tested APIs, properly handles permissions and edge cases, and follows established patterns. No security concerns or breaking changes identified.
  • No files require special attention

Important Files Changed

Filename Overview
frontend/src/pages/ai/MCPEndpointDetailPage/components/MCPEndpointToolSelectionSection.tsx Adds select/deselect all checkbox for MCP endpoint tools. Clean implementation using existing bulk update API with proper permission handling and filtered tool support.

Co-Authored-By: Tony <dangtony98@gmail.com>
@saifsmailbox98
Copy link
Contributor

Can you make sure that all tools are enabled by default when a new MCP server is added to an MCP endpoint?

…ools by default

Co-Authored-By: Tony <dangtony98@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

I've addressed all the feedback:

  1. Switch instead of Checkbox: Changed to use a Switch component and moved it to a separate row above the header so it doesn't interfere with the "Tool Name / Enabled" header row.

  2. Removed notification: Removed the success notification when toggling all tools (kept only the error notification).

  3. Enable all tools by default: Added logic in the backend's updateMcpEndpoint function to automatically enable all tools when a new MCP server is added to an endpoint. This only affects newly added servers - existing servers keep their current tool configurations.

Co-Authored-By: Tony <dangtony98@gmail.com>
@saifsmailbox98
Copy link
Contributor

Maybe for the enable/disable all toggle instead of the long text we can just show ALL on the left of the toggle, no need to change the text as the switch is toggled.

Co-Authored-By: Tony <dangtony98@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

Done! Changed the toggle text to just "All" - simpler and cleaner. The tooltip still shows "Enable all tools" / "Disable all tools" for clarity on hover.

@saifsmailbox98
Copy link
Contributor

I had asked you to enable all tools by default when an MCP server is added. You can revert those changes as it's not needed anymore, the switch/toggle is convenient enough for users to enable/disable all tools by themselves.

@devin-ai-integration
Copy link
Contributor Author

Done! Reverted the backend changes for auto-enabling all tools when a new MCP server is added. The toggle is indeed convenient enough for users to enable/disable all tools themselves.

saifsmailbox98
saifsmailbox98 previously approved these changes Jan 25, 2026
devin-ai-integration bot and others added 2 commits January 25, 2026 21:35
Co-Authored-By: Tony <dangtony98@gmail.com>
@saifsmailbox98
Copy link
Contributor

Works great!

image

@saifsmailbox98 saifsmailbox98 merged commit f626334 into main Jan 25, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants