From 7db878b80bfe1c0b052c55ce96d3af35d27529ca Mon Sep 17 00:00:00 2001 From: Jacob Magar Date: Mon, 16 Mar 2026 10:21:58 -0400 Subject: [PATCH] docs: fix stale references in CLAUDE.md post-consolidation refactor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix test patching example: tools.info → tools.unraid (old module deleted) - Fix destructive actions: storage → disk (correct action domain) - Update mutation handler ordering: QUERIES → _*_QUERIES domain dicts - Add test-destructive.sh to scripts section - Bump version 1.0.0 → 1.0.1 Co-authored-by: Claude --- .claude-plugin/plugin.json | 2 +- CLAUDE.md | 9 ++++++--- pyproject.toml | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index b8dcd60..7544193 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "unraid", "description": "Query and monitor Unraid servers via GraphQL API - array status, disk health, containers, VMs, system monitoring", - "version": "1.0.0", + "version": "1.0.1", "author": { "name": "jmagar", "email": "jmagar@users.noreply.github.com" diff --git a/CLAUDE.md b/CLAUDE.md index 3d00c21..b483858 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -119,7 +119,7 @@ The server registers a **single consolidated `unraid` tool** with `action` (doma - **notifications**: delete, delete_archived - **rclone**: delete_remote - **keys**: delete -- **storage**: flash_backup +- **disk**: flash_backup - **settings**: configure_ups - **plugins**: remove @@ -152,10 +152,10 @@ The server loads environment variables from multiple locations in order: ## Critical Gotchas ### Mutation Handler Ordering -**Mutation handlers MUST return before the `QUERIES[action]` lookup.** Mutations are not in the `QUERIES` dict — reaching that line for a mutation action causes a `KeyError`. Always add early-return `if action == "mutation_name": ... return` blocks BEFORE the `QUERIES` lookup. +**Mutation handlers MUST return before the domain query dict lookup.** Mutations are not in the domain `_*_QUERIES` dicts (e.g., `_DOCKER_QUERIES`, `_ARRAY_QUERIES`) — reaching that line for a mutation subaction causes a `KeyError`. Always add early-return `if subaction == "mutation_name": ... return` blocks BEFORE the queries lookup. ### Test Patching -- Patch at the **tool module level**: `unraid_mcp.tools.info.make_graphql_request` (not core) +- Patch at the **tool module level**: `unraid_mcp.tools.unraid.make_graphql_request` (not core) - `conftest.py`'s `mock_graphql_request` patches the core module — wrong for tool-level tests - Use `conftest.py`'s `make_tool_fn()` helper or local `_make_tool()` pattern @@ -186,6 +186,9 @@ uv run pytest -x # Fail fast on first error # stdio smoke-test, no running server needed (good for CI) ./tests/mcporter/test-tools.sh [--parallel] [--timeout-ms N] [--verbose] + +# Destructive action smoke-test (confirms guard blocks without confirm=True) +./tests/mcporter/test-destructive.sh [MCP_URL] ``` See `tests/mcporter/README.md` for transport differences and `docs/DESTRUCTIVE_ACTIONS.md` for exact destructive-action test commands. diff --git a/pyproject.toml b/pyproject.toml index 04ff62c..1d6b93d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ build-backend = "hatchling.build" # ============================================================================ [project] name = "unraid-mcp" -version = "1.0.0" +version = "1.0.1" description = "MCP Server for Unraid API - provides tools to interact with an Unraid server's GraphQL API" readme = "README.md" license = {file = "LICENSE"}