feat: add ROUTER_IGNORE_TOOL_IDS for tool-level filtering - #14
Closed
effortprogrammer wants to merge 2 commits into
Closed
feat: add ROUTER_IGNORE_TOOL_IDS for tool-level filtering#14effortprogrammer wants to merge 2 commits into
effortprogrammer wants to merge 2 commits into
Conversation
Adds support for blocking specific tools from specific MCP servers without disabling the entire server. Format: ROUTER_IGNORE_TOOL_IDS=serverId:toolName,serverId2:toolName2 Example: ROUTER_IGNORE_TOOL_IDS=grep_app:searchGitHub Also removes reenableOhMyOpencodeMcps postWriteHook that was force-re-enabling built-in MCPs the user had intentionally disabled. Fixes: grep_app searchGitHub routing to unrelated GitHub repos
…onfig.py The Python side had the same bug — force-re-enabling built-in MCPs (context7, grep_app, websearch) that users disabled via oh-my-opencode.
effortprogrammer
force-pushed
the
fix/router-ignore-tool-ids
branch
from
March 5, 2026 14:09
4b8b114 to
a07feb4
Compare
Owner
Author
|
Closing in favor of PR #15 (hybrid search) — rule-based blocklist doesn't scale. Will verify hybrid search properly handles tool disambiguation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
grep_appMCP'ssearchGitHubtool searches all of GitHub instead of the local codebase. The BM25 router picks it up on keywords like "search", "code", "find" — returning results from unrelated repos (actix-web-demo, VictoriaMetrics, etc.).Users could only block the entire server via
ROUTER_IGNORE_IDS=grep_app, losing other useful tools from the same server.Additionally,
reenableOhMyOpencodeMcps()was force-re-enabling built-in MCPs that users had intentionally disabled.Solution
1. New env var:
ROUTER_IGNORE_TOOL_IDSROUTER_IGNORE_TOOL_IDS=serverId:toolName,serverId2:toolName2ROUTER_IGNORE_TOOL_IDS=grep_app:searchGitHub2. Remove
reenableOhMyOpencodeMcpspostWriteHookFiles Changed
router.py— Core filtering insync_from_tool_definitionshub.py— Stores and passesignore_tool_idsthrough the chainopencode_gateway_server.py— Parses env varrouter_mcp_server.py— Parses env var (standalone mode)index.ts— RemovesreenableOhMyOpencodeMcpshook