Skip to main content
Glama

sage_explain_error

Analyze a failed SAGE command to identify error type, root cause, and affected files. Obtain actionable suggestions without running any new commands.

Instructions

Explain why a previous SAGE command failed. Use after a non-zero command exit before editing code or retrying. Input is an optional SAGE run id; when omitted, the most recent failed run is analyzed. Returns a structured object with error_type, summary, root_cause, affected_files, and suggestions. Read-only: does not run commands, edit files, or contact external services.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
command_idNoOptional SAGE run id to analyze. Omit to analyze the most recent failed command.
Behavior5/5

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

With no annotations provided, the description fully carries the burden of behavioral disclosure. It explicitly states 'Read-only: does not run commands, edit files, or contact external services,' which is critical for an AI agent to understand safety. It also describes the return structure and behavior when the parameter is omitted. This is comprehensive and transparent.

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

Conciseness5/5

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

The description is extremely concise with three sentences. The first sentence immediately states the purpose. Every sentence adds necessary information: purpose, usage, return structure, and behavioral constraints. No redundancy or filler.

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?

Given the tool's simplicity (one optional parameter, no output schema, no nested objects), the description fully covers all needed aspects: purpose, when to use, behavior, parameter semantics, and return structure. The agent can reliably select and invoke this tool without ambiguity.

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

Parameters5/5

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

The sole parameter 'command_id' is optional and has 100% schema description coverage. The description adds meaning beyond the schema: 'Omit to analyze the most recent failed command.' This clarifies the default behavior and the nature of the parameter, which is sufficient for correct invocation.

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?

The description clearly states the tool's purpose: to explain why a previous SAGE command failed. It uses a specific verb 'explain' and resource 'why a previous SAGE command failed'. This distinguishes it from siblings like sage_suggest_fix (which suggests fixes) and sage_run_workflow (which runs workflows).

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?

The description provides explicit usage context: 'Use after a non-zero command exit before editing code or retrying.' It also clarifies when not to use by stating it is read-only. However, it does not explicitly mention alternative tools or provide exclusion criteria beyond the read-only nature, which would strengthen the guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PsYcGoD/sage'

If you have feedback or need assistance with the MCP directory API, please join our Discord server