mirror of
https://github.com/jmagar/unraid-mcp.git
synced 2026-03-23 12:39:24 -07:00
docs: fix stale references in CLAUDE.md post-consolidation refactor
- 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@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "unraid",
|
"name": "unraid",
|
||||||
"description": "Query and monitor Unraid servers via GraphQL API - array status, disk health, containers, VMs, system monitoring",
|
"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": {
|
"author": {
|
||||||
"name": "jmagar",
|
"name": "jmagar",
|
||||||
"email": "jmagar@users.noreply.github.com"
|
"email": "jmagar@users.noreply.github.com"
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ The server registers a **single consolidated `unraid` tool** with `action` (doma
|
|||||||
- **notifications**: delete, delete_archived
|
- **notifications**: delete, delete_archived
|
||||||
- **rclone**: delete_remote
|
- **rclone**: delete_remote
|
||||||
- **keys**: delete
|
- **keys**: delete
|
||||||
- **storage**: flash_backup
|
- **disk**: flash_backup
|
||||||
- **settings**: configure_ups
|
- **settings**: configure_ups
|
||||||
- **plugins**: remove
|
- **plugins**: remove
|
||||||
|
|
||||||
@@ -152,10 +152,10 @@ The server loads environment variables from multiple locations in order:
|
|||||||
## Critical Gotchas
|
## Critical Gotchas
|
||||||
|
|
||||||
### Mutation Handler Ordering
|
### 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
|
### 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
|
- `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
|
- 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)
|
# stdio smoke-test, no running server needed (good for CI)
|
||||||
./tests/mcporter/test-tools.sh [--parallel] [--timeout-ms N] [--verbose]
|
./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.
|
See `tests/mcporter/README.md` for transport differences and `docs/DESTRUCTIVE_ACTIONS.md` for exact destructive-action test commands.
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ build-backend = "hatchling.build"
|
|||||||
# ============================================================================
|
# ============================================================================
|
||||||
[project]
|
[project]
|
||||||
name = "unraid-mcp"
|
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"
|
description = "MCP Server for Unraid API - provides tools to interact with an Unraid server's GraphQL API"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = {file = "LICENSE"}
|
license = {file = "LICENSE"}
|
||||||
|
|||||||
Reference in New Issue
Block a user