Skip to main content
Glama
N0moreher0
by N0moreher0

Explain an error

project_explain_error
Read-onlyIdempotent

Diagnose command, build, test, or provider failures from error text or log tails and return likely causes with ready-to-send next actions.

Instructions

Diagnose a failure from its error text / log tail: known signatures (errno, TypeScript, Python, git, npm, GitHub, venira codes) → likely cause + ready-to-send next tool calls. Rule-based, offline, instant. Use when: a command, test, build or provider call failed and you want the fastest route to the fix (feed it the stderr tail or the CI log tail). Avoid when: you already know the cause and only need the file contents (use project_read_file / project_read_ranges). Speed: pure local rules, < 1 ms; no network and no model call. Output: explain_error: matched, summary, error_line, language, diagnoses[] {rule_id, title, likely_cause, suggested_fix[], retry_hint?, next_actions[]}, next_actions[]. Batch-safe: yes

Input Schema

NameRequiredDescriptionDefault
languageNoOptional language hint (typescript|python|rust|go|...) when the text does not show a file extension.
log_tailNoTail of the failing output (e.g. project_ci_logs / project_shell_status text).
error_textNoThe error block (stderr, exception, compiler output). One of error_text/log_tail is required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.4

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, closed-world), and the description still adds genuinely new behavior: rule-based rather than model-driven, purely local, <1 ms, no network call, and batch-safe. It also discloses the response shape (matched, summary, diagnoses[], next_actions[]), which matters because no output schema exists.

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 purpose, then labeled lines for when-to-use, when-to-avoid, speed, output and batching. Each line earns its place, though the long inline enumeration of the output object is denser than an agent strictly needs given the description is not the return-value contract.

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

Completeness5/5

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

For a read-only diagnostic with three optional-ish parameters and no output schema, the description supplies everything missing from structured fields: expected output shape, latency/offline guarantees, input sourcing, and the sibling to use instead. Nothing an agent needs to invoke it correctly is absent.

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 description coverage is 100%, so error_text, log_tail and language are already documented, including the "one of error_text/log_tail is required" rule. The description only reinforces where to source the text (stderr tail, CI log tail) without adding syntax or conflict-resolution detail, so the baseline 3 applies.

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?

"Diagnose a failure from its error text / log tail" gives a specific verb plus resource, then enumerates the signature families it recognizes (errno, TypeScript, Python, git, npm, GitHub, venira codes). It is unmistakably distinct from siblings like project_shell_status (which produces the text) or project_read_file (which reads files).

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

Usage Guidelines5/5

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

Explicit "Use when" (a command, test, build or provider call failed) and "Avoid when" (cause already known — use project_read_file / project_read_ranges) sections name the alternative tools directly. The routing decision is fully specified with no inference required.

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