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
{{ message }}
Repository navigation
Most tool handlers are untested and tool registration is never verified #101
About 40 of the 50 tool handlers never run in any test, and nothing checks that index.ts registers 50 uniquely named tools that match the documentation.
Where
mcp-server/src/tools/__tests__/integration.test.ts exercises only healthCheck, diagnostics, nodeList, the piStatus error path, and six confirm gates.
mcp-server/src/index.ts:6-121
These tools appear in neither test file: piStatus (happy path), serviceHealth, composePull, composePs, networkInfo, uptimeKumaStatus, sshTest.
tests/test_docs_consistency.py checks that the doc tables exist, but not that their names match the registered tools.
Impact
A tool file added without a register call, or two tools registered under the same name, ships unnoticed.
Regressions in how the HTTP-API tools parse JSON returned by curl over SSH are not caught.
Suggested fix
Registration test: register every tool on a fake server that records names. Assert there are 50 unique names, each matching ^homelab_[a-z][A-Za-z]+$, and one per file in src/tools.
A pytest that parses the tool names from index.ts / src/tools and diffs them against the README and CLAUDE.md tables.
Happy-path and error-path tests with mocked SSH for each tool family. Start with the JSON-parsing tools: prometheusQuery, grafanaSnapshot, uptimeKumaStatus, adguardStats, npmProxyHosts, certCheck, inventorySync.
Have e2e.test.ts call the real read-only handlers instead of copied command strings (e2e.test.ts:11-25,45-58).
Acceptance criteria
The registration test exists and fails on a missing or duplicate tool
Activity