Skip to main content
Glama
cleaninstall-node

cleaninstall-node

Explain an install/runtime error

explain_error
Read-onlyIdempotent

Explains Node.js and Deno install/build errors in project context, returns likely meaning and related findings, and outlines a minimal fix plan before deleting node_modules or lockfiles.

Instructions

Explain an error message (Cannot find module, NODE_MODULE_VERSION, ERESOLVE, EBADENGINE, ERR_REQUIRE_ESM, missing rollup/esbuild/sharp binaries, command not found, lockfile out of sync, ...) in the context of this project, combined with a diagnose. Returns what it means, related findings, and the smallest fix plan with a plan_id. Read-only. Call this before deleting node_modules or lockfiles.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "error": "<error>"
    },
    "name": "explain_error"
  }
}

Input Schema

NameRequiredDescriptionDefault
dirNoProject root containing package.json. Defaults to the server's working directory.
errorYesThe error output, as printed (stack traces welcome).
nativeNoAlso load native addons (slower).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, so safety is covered; the description adds the return composition (interpretation, findings, fix plan with plan_id) and the workflow warning about not deleting node_modules/lockfiles first. It restates 'Read-only', which earns nothing beyond the annotation, and says nothing about cost or behavior when an error isn't matched.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the verb and resource, then the return shape, then the warning — a sensible ordering. The parenthetical error list is long but functional; only minor trimming (e.g. the ellipsis after a long enumeration) would tighten it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description correctly compensates by naming the returned pieces including plan_id. Combined with 100% schema coverage and read-only annotations, an agent has what it needs, though failure behavior for unrecognized errors is unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so dir, error, and native are already documented, and the description adds no detail on those (e.g. how dir interacts with the server's working directory, or when native matters). The enumerated error classes do add meaning about what the required `error` argument should contain, which lifts it modestly above the baseline rather than above 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb (Explain) plus resource (an error message) with an enumerated set of recognized error classes (Cannot find module, ERESOLVE, EBADENGINE, missing native binaries, etc.), and it states the output shape: meaning, related findings, and a smallest fix plan with a plan_id. The phrase 'combined with a diagnose' distinguishes it from the diagnose sibling, so an agent can route between them without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit, actionable ordering constraint: 'Call this before deleting node_modules or lockfiles' — a real when-to-use directive tied to a destructive alternative. It also signals the relationship to diagnose, but never states when diagnose alone is the better call or what to do if the error is unrecognized, so it stops short of full when/when-not routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools