Repository navigation
Turn tool groups on and off at runtime - #15
Conversation
With OBS_MCP_DYNAMIC_TOOLSETS=true every group is registered but only the OBS_MCP_TOOLSETS groups (general by default) start enabled. obs-list-toolsets, obs-enable-toolset, and obs-disable-toolset manage the rest per session; each change sends notifications/tools/list_changed. Read-only mode still applies. The MCPB manifest gets a matching option. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vjn8uBEa4mJshaQU3pFuqX
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e7019f08c2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (enabled) tool.handle.enable(); | ||
| else tool.handle.disable(); |
There was a problem hiding this comment.
Batch tool-list notifications for group updates
When enabling or disabling a group containing multiple tools, this loop invokes an SDK handle once per tool; each enable() or disable() emits notifications/tools/list_changed. A client that responds by calling tools/list will therefore reload the full tool inventory dozens—and potentially up to 168—times for one obs-enable-toolset call. Batch or suppress these per-tool notifications and emit a single list-change notification after the entire update.
Useful? React with 👍 / 👎.
Stacked on #14.
Why: 168 tools is a lot of context for every session. Fixed tool groups (#5) help, but you have to pick them before the session starts. This follows GitHub's MCP server: start small and let the model turn groups on when it needs them.
What
OBS_MCP_DYNAMIC_TOOLSETS=true(opt-in): every group is registered, but only theOBS_MCP_TOOLSETSgroups (defaultgeneral) and theOBS_MCP_TOOLStools start enabled. That's under 30 tools at the start instead of 168.obs-list-toolsetsshows each group, what it covers, and how many of its tools are on.obs-enable-toolset/obs-disable-toolsetswitch groups for the session.enable()/disable(), which sendnotifications/tools/list_changed.Tests
npm run checkpasses: 182 unit, 12 e2e.🤖 Generated with Claude Code
https://claude.ai/code/session_01Vjn8uBEa4mJshaQU3pFuqX