Skip to content

Add per-tool enable/disable for MCP servers and agent tools + fetch_page tool#919

Merged
stephanj merged 3 commits intomasterfrom
claude/mcp-tool-control-9Old7
Feb 13, 2026
Merged

Add per-tool enable/disable for MCP servers and agent tools + fetch_page tool#919
stephanj merged 3 commits intomasterfrom
claude/mcp-tool-control-9Old7

Conversation

@stephanj
Copy link
Copy Markdown
Collaborator

@stephanj stephanj commented Feb 13, 2026

Summary

  • Per-tool enable/disable for MCP servers: Each MCP server's tools can now be individually enabled or disabled from the settings UI, giving fine-grained control over which capabilities the LLM can use
  • Per-tool enable/disable for built-in agent tools: Core agent tools (read_file, write_file, edit_file, list_files, search_files, run_command, fetch_page) can be individually toggled in the Agent settings. Disabling unused tools also reduces context window consumption
  • New fetch_page agent tool: Fetches a web page by URL and returns readable text content with HTML/CSS/JS stripped via Jsoup. Useful for reading documentation, API references, and web pages during agentic interactions. Auto-approvable as a read-only tool, truncates at 100K chars
  • Documentation: Updated Agent Mode and MCP Setup pages with new sections and screenshots
AgentModeSetup MCPToolsActivation

Changed Files

Core

  • build.gradle.kts — Added Jsoup dependency
  • FetchPageToolExecutor.java — New tool executor using java.net.http.HttpClient + Jsoup
  • BuiltInToolProvider.java — Register fetch_page tool, updated tool list
  • AgentApprovalProvider.java — Added fetch_page to read-only auto-approve set
  • AgentSettingsComponent.java — Added fetch_page to core tools, per-tool checkboxes
  • FilteredMcpToolProvider.java — New provider that filters disabled MCP tools
  • MCPServer.java — Added disabledTools field
  • MCPToolsManager.java — Per-tool enable/disable UI in tools dialog
  • MCPSettingsComponent.java — Updated settings UI for MCP tool control
  • DevoxxGenieStateService.java — State persistence for disabled tools

Tests

  • BuiltInToolProviderTest.java — Updated tool counts (6→7, 7→8)
  • FetchPageToolExecutorTest.java — 7 tests with MockWebServer

Documentation

  • agent-mode.md — fetch_page in tool tables, per-tool enable/disable section, architecture diagrams
  • mcp_expanded.md — Per-tool enable/disable section with MCPToolsActivation screenshot

Test plan

  • ./gradlew test — all tests pass
  • ./gradlew buildPlugin — plugin builds successfully
  • Manual: verify Agent Settings shows tool checkboxes and disabling a tool removes it from agent
  • Manual: verify MCP tool dialog shows per-tool checkboxes and disabled tools are filtered

🤖 Generated with Claude Code

claude and others added 3 commits February 13, 2026 07:30
…ools

MCP tool control:
- Add disabledTools field (Set<String>) to MCPServer model
- Create FilteredMcpToolProvider that wraps McpToolProvider and excludes
  disabled tools from being sent to the LLM
- Update MCPExecutionService to wrap raw provider with FilteredMcpToolProvider
- Update MCP settings tools dialog with checkboxes per tool, enable/disable all
  buttons, and persist selections on OK
- Update MCPToolsManager popup to show per-tool checkboxes under each server
- Update tools count display to show enabled/total counts
- Support disabledTools in JSON import/export via MCPConfigurationParser

Agent mode tool control:
- Add disabledAgentTools field (List<String>) to DevoxxGenieStateService
- Update BuiltInToolProvider.provideTools() to filter out disabled tools
- Add "Built-in Tools" section in AgentSettingsComponent with checkboxes for
  each core tool (read_file, write_file, edit_file, list_files, search_files,
  run_command)
- Wire up isModified/apply/reset for the new tool checkboxes

https://claude.ai/code/session_01DpQ3ZWvMg4Ksw7xcasS57H
Add a new agent tool that fetches web pages by URL and returns readable
text content with HTML/CSS/JS stripped via Jsoup. This enables the agent
to read documentation, API references, and web pages during agentic
interactions.

- FetchPageToolExecutor using java.net.http.HttpClient + Jsoup parsing
- Registered in BuiltInToolProvider with URL parameter
- Added to READ_ONLY_TOOLS in AgentApprovalProvider for auto-approval
- Added to CORE_AGENT_TOOLS in AgentSettingsComponent for enable/disable
- 100K character truncation to protect LLM context window
- Tests with MockWebServer covering HTML stripping, errors, truncation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… control

- Agent Mode page: add fetch_page to read tools table, document per-tool
  enable/disable section with context window benefit, update architecture
  diagrams and sub-agent tool lists
- MCP page: add per-tool enable/disable section with MCPToolsActivation image,
  explaining how to selectively disable individual MCP server tools
- Update screenshots for agent mode built-in tools

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@stephanj stephanj merged commit 58a19d9 into master Feb 13, 2026
7 checks passed
@stephanj stephanj deleted the claude/mcp-tool-control-9Old7 branch February 13, 2026 08:18
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.

2 participants