Skip to content

Commit a503b30

Browse files
docs: add tool filtering section + refresh counts in README
Surfaces the tool-filtering feature that landed in commits ca8a1c3ba5b22e: - New top-level "Tool Filtering" section explains the six presets, the /arcane:configure slash command with its diff preview, and the env var overrides (ARCANE_TOOL_PRESET etc.) - Top nav gains a "Tool Filtering" link - Built-in Workflow Prompts table: 4 → 5 (adds arcane_configure_tools) - MCP Resources table: 2 → 4 (adds arcane://tools and arcane://tools-config-notice) - New slash-command row for /arcane:configure - Configuration env var table: 4 new rows (ARCANE_TOOL_PRESET / ARCANE_ENABLED_MODULES / ARCANE_ENABLED_TOOLS / ARCANE_DISABLED_TOOLS) + a line noting env vars override the config file and the server hot-reloads ~/.arcane/config.json - Development test count: 79 → 119 - Project Structure: calls out registry.ts, presets.ts, config-watcher.ts, the new commands/ dir, src/__tests__/integration/ and the updated resource / prompt counts Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ba5b22e commit a503b30

1 file changed

Lines changed: 68 additions & 9 deletions

File tree

README.md

Lines changed: 68 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
</p>
1818

1919
<p align="center">
20-
<a href="#-getting-started">Getting Started</a> &bull;
21-
<a href="#-what-can-it-do">What Can It Do</a> &bull;
22-
<a href="#-the-companion-skill">Companion Skill</a> &bull;
23-
<a href="#-all-180-tools">All Tools</a> &bull;
20+
<a href="#getting-started">Getting Started</a> &bull;
21+
<a href="#tool-filtering">Tool Filtering</a> &bull;
22+
<a href="#what-can-it-do">What Can It Do</a> &bull;
23+
<a href="#the-companion-skill">Companion Skill</a> &bull;
24+
<a href="#all-180-tools">All Tools</a> &bull;
2425
<a href="install_arcane_skill-mcp.md">Interactive Installer</a>
2526
</p>
2627

@@ -154,6 +155,42 @@ You need an **Arcane instance** running (see [getarcane.app](https://getarcane.a
154155

155156
---
156157

158+
## Tool Filtering
159+
160+
Exposing all 180 tools to Claude every turn chews through your context window. Pick a **preset** to trim the active tool set — only the tools in that preset appear in `tools/list`:
161+
162+
| Preset | Scope | Tools |
163+
|---|---|---|
164+
| `commonly-used` *(recommended)* | containers, images, projects, volumes, networks | ~52 |
165+
| `read-only` | every `*_list` / `*_get` / `*_inspect` / `*_stats` across all modules | ~60 |
166+
| `minimal` | dashboard + container list / get / counts | 5 |
167+
| `deploy` | projects, gitops, templates, registries, environments, build | ~40 |
168+
| `full` *(default if never configured)* | everything | 180 |
169+
| `custom` | your own module + per-tool picks | variable |
170+
171+
**Configure interactively** in Claude Code:
172+
173+
```
174+
/arcane:configure
175+
```
176+
177+
Walks you through picking a preset (and optional fine-tuning), shows a `+X / −Y` diff against what's currently live, and writes the selection to `~/.arcane/config.json`. The server watches that file — changes apply **live** via `notifications/tools/list_changed`, no reconnect.
178+
179+
**Or set it by env var:**
180+
181+
```bash
182+
ARCANE_TOOL_PRESET=commonly-used
183+
ARCANE_ENABLED_MODULES=container,image,dashboard
184+
ARCANE_ENABLED_TOOLS=arcane_system_get_health
185+
ARCANE_DISABLED_TOOLS=arcane_system_prune
186+
```
187+
188+
Resolution order: **preset → intersect with `modules` → add `enabled` → subtract `disabled`**. Unknown names log a warning and are ignored — never silent failures, never a bricked server.
189+
190+
Non-Claude-Code clients can use the `arcane_configure_tools` MCP prompt for the same flow.
191+
192+
---
193+
157194
## What Can It Do?
158195

159196
### Containers & Compose
@@ -205,21 +242,30 @@ rm -rf /tmp/arcane
205242

206243
## Built-in Workflow Prompts
207244

208-
The server includes four pre-built prompts that guide Claude through common multi-step operations:
245+
The server includes five pre-built prompts that guide Claude through common multi-step operations:
209246

210247
| Prompt | What it does |
211248
|--------|-------------|
212249
| `/deploy-stack` | Walks through creating a project, pulling images, deploying, and verifying all services are healthy |
213250
| `/troubleshoot-container` | Systematic diagnosis: check state, inspect config, review action items, check ports, scan for vulnerabilities |
214251
| `/security-audit` | Full environment scan: check scanner status, get vulnerability summary, review all findings by severity, check for image updates |
215252
| `/cleanup-environment` | Safe cleanup: survey resources, present a plan, get confirmation, then prune images, networks, and volumes in the right order |
253+
| `arcane_configure_tools` | Walks through selecting a tool-filter preset + module / per-tool overrides and writing them to `~/.arcane/config.json` (for clients without slash commands) |
216254

217-
Plus two **MCP Resources** that give Claude background context:
255+
Plus four **MCP Resources** that give Claude background context:
218256

219257
| Resource | What it provides |
220258
|----------|-----------------|
221259
| `arcane://environments` | All available environments with IDs and status — so Claude can pick the right one |
222260
| `arcane://version` | Server configuration details — base URL, default environment, protocol version |
261+
| `arcane://tools` | JSON inventory of every tool (name, module, enabled state) — consumed by `/arcane:configure` to compute the before/after diff |
262+
| `arcane://tools-config-notice` | Flags installs that haven't configured tool filtering yet and points them at `/arcane:configure` |
263+
264+
And a Claude Code slash command:
265+
266+
| Command | What it does |
267+
|---------|-------------|
268+
| `/arcane:configure` | Interactive tool-filter picker — preset, module allowlist, per-tool overrides, with a live diff before writing |
223269

224270
---
225271

@@ -409,10 +455,16 @@ Plus two **MCP Resources** that give Claude background context:
409455
| `ARCANE_DEFAULT_ENVIRONMENT_ID` | Auto-select this environment | - |
410456
| `ARCANE_HTTP_PORT` | Port for HTTP/network mode | `3000` |
411457
| `ARCANE_HTTP_HOST` | Host for HTTP/network mode | `localhost` |
458+
| `ARCANE_TOOL_PRESET` | `commonly-used` / `read-only` / `minimal` / `deploy` / `full` / `custom` — see [Tool Filtering](#tool-filtering) | - |
459+
| `ARCANE_ENABLED_MODULES` | Comma-separated module allowlist | - |
460+
| `ARCANE_ENABLED_TOOLS` | Comma-separated tool names to force-enable | - |
461+
| `ARCANE_DISABLED_TOOLS` | Comma-separated tool names to force-disable | - |
412462
| `LOG_LEVEL` | `debug`, `info`, `warn`, or `error` | `info` |
413463

414464
**Authentication:** API Key is recommended. JWT tokens are automatically refreshed before they expire.
415465

466+
**Tool filter:** anything set via env var overrides the corresponding field in `~/.arcane/config.json`. Unset fields fall through to the file. Change at runtime by editing `~/.arcane/config.json` — the server hot-reloads.
467+
416468
---
417469

418470
## Safety & Destructive Operations
@@ -443,7 +495,7 @@ git clone https://github.com/RandomSynergy17/Arcane-MCP-Server.git
443495
cd Arcane-MCP-Server
444496
npm install
445497
npm run build
446-
npm test # 79 tests
498+
npm test # 119 tests (unit + integration)
447499
npm run dev # stdio mode
448500
npm run dev:tcp # HTTP mode
449501
```
@@ -462,15 +514,22 @@ src/
462514
auth/
463515
auth-manager.ts # JWT auto-refresh + API key auth
464516
tools/ # 25 modules, 180 tools
465-
resources/ # 2 MCP Resources
466-
prompts/ # 4 MCP Prompts
517+
registry.ts # ToolRegistry — captures RegisteredTool handles, applies filter
518+
presets.ts # commonly-used / read-only / minimal / deploy / full / custom
519+
resources/ # 4 MCP Resources
520+
prompts/ # 5 MCP Prompts
467521
types/
468522
arcane-types.ts # Shared interfaces (33 types)
469523
generated/ # Auto-generated from OpenAPI v1.17.0
470524
utils/
471525
tool-helpers.ts # registerTool wrapper with isError handling
526+
config-watcher.ts # debounced fs.watch on ~/.arcane/config.json → hot reload
472527
format.ts # Size formatting + path validation
473528
error-handler.ts # Error classes + formatting
529+
__tests__/
530+
integration/ # End-to-end boot-per-preset + hot-reload cycle tests
531+
commands/
532+
configure.md # /arcane:configure slash command (plugin)
474533
skills/
475534
arcane-mcp-server/
476535
SKILL.md # Companion Claude Code skill

0 commit comments

Comments
 (0)