You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ships commands/configure.md — a plugin slash command that walks the
user through preset selection, optional module allowlist, optional
per-tool fine-tuning via AskUserQuestion, then merges the resolved
`tools` block into ~/.arcane/config.json while preserving existing
keys. Registered in .claude-plugin/plugin.json.
Adds a "Step 5: Pick a tool-filter preset" section to
install_arcane_skill-mcp.md so fresh installs don't see the 180-tool
firehose on day one. Surfaces the four new env vars in the
Configuration Reference table.
Updates CLAUDE.md with a "Tool filtering" section pointing at
registry.ts, presets.ts, config-watcher.ts, and the slash command.
Updates CHANGELOG with the full feature rollout under [Unreleased].
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,9 +8,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
## [Unreleased]
9
9
10
10
### Added
11
+
- Tool filtering: six presets (`commonly-used`, `read-only`, `minimal`, `deploy`, `full`, `custom`) trim which of the 180 tools are exposed on `tools/list` to reduce context bloat
12
+
-`ToolRegistry` (`src/tools/registry.ts`) captures every `RegisteredTool` handle and applies preset/module/per-tool resolution at startup and on live config changes
13
+
- Hot reload: `src/utils/config-watcher.ts` debounces `fs.watch` on `~/.arcane/config.json` and calls `registry.diffAndApply()` so clients see `notifications/tools/list_changed` without reconnecting
14
+
-`tools` field on `ArcaneConfig` plus env vars `ARCANE_TOOL_PRESET`, `ARCANE_ENABLED_MODULES`, `ARCANE_ENABLED_TOOLS`, `ARCANE_DISABLED_TOOLS`
15
+
- MCP prompt `arcane_configure_tools` for clients without slash commands
- All 25 tool modules now accept an optional `ToolRegistry` parameter and register through a `moduleRegistrar` helper so handles flow into the registry
25
+
- Backwards-compatible on upgrade: installs without a `tools` key fall back to the `full` preset (no behaviour change)
- Prompts reference real tool names — cross-check if adding/renaming tools
51
51
52
+
### Tool filtering
53
+
54
+
-`src/tools/registry.ts` — `ToolRegistry` captures `RegisteredTool` handles from each module; `applyFilter()` disables tools outside the resolved enabled-set, `diffAndApply()` handles hot reload
- Unconfigured installs fall back to `full` (backwards-compatible); `arcane://tools-config-notice` resource flags the setup until a `tools` key is written
Use this slash command to trim which Arcane MCP tools are exposed to Claude Code. The full server registers 180 tools; surfacing all of them in `tools/list` bloats the context window. This command writes a `tools` block to `~/.arcane/config.json` that selects a preset, module allowlist, and per-tool overrides. The Arcane MCP server picks up changes live when its config watcher is attached.
9
+
10
+
## Workflow
11
+
12
+
1.**Ask the user to pick a preset** with `AskUserQuestion`, single-select:
- Optionally ask if they want per-tool adjustments. If yes, iterate module-by-module (never more than ~10 options per `AskUserQuestion` step) showing each module's tools so they can add/remove individual entries.
24
+
25
+
3.**Build the `tools` block** — only include the fields that are non-empty:
26
+
```json
27
+
{
28
+
"tools": {
29
+
"preset": "<chosen>",
30
+
"modules": ["<optional allowlist>"],
31
+
"enabled": ["<optional additions>"],
32
+
"disabled": ["<optional subtractions>"]
33
+
}
34
+
}
35
+
```
36
+
37
+
4.**Merge into `~/.arcane/config.json`**:
38
+
-`Read` the existing file (tolerate missing — start from `{}`).
- Replace or add the `tools` field with the new block.
41
+
-`Write` back with 2-space indent.
42
+
43
+
5.**Report to the user**:
44
+
- If the server logged `Watching …/config.json for tool-filter changes` at startup (`tail ~/.arcane/logs/*.log` or check the server stderr if available), say: **"Config written — tool list will refresh automatically."**
45
+
- Otherwise: **"Config written — reconnect the Arcane MCP server in your client (`/mcp` in Claude Code) for the filter to take effect."**
46
+
47
+
## Notes
48
+
49
+
- Keep the conversation tight. Do not dump the full 180-tool list — summarise the chosen preset and let the user opt into fine-tuning.
50
+
- Never remove other keys from `~/.arcane/config.json`. A malformed file will brick the server.
51
+
- For Claude Desktop and other MCP clients without slash commands, the same flow is available via the `arcane_configure_tools` prompt — this slash command is a Claude Code shortcut to the same outcome.
-**Skip** — I'll configure later with `/arcane:configure`
115
+
116
+
Write the chosen preset to `~/.arcane/config.json`, merging with any existing content:
117
+
118
+
```bash
119
+
mkdir -p ~/.arcane
120
+
# If file exists: read it, add the "tools" key, write back.
121
+
# If it doesn't: create { "tools": { "preset": "<chosen>" } }
122
+
```
123
+
124
+
The user can change this any time by running `/arcane:configure` in Claude Code or by editing `~/.arcane/config.json` directly — the server watches the file and refreshes live.
0 commit comments