Skip to main content
Glama

Intents Route

Explain an Intents error code

explain_error
Read-onlyIdempotent

Explain an Intents API error code and how to handle it. Pass the error.code from any API response or tool error, e.g. INVOICE_NOT_OPEN or LIVE_MODE_LOCKED; the answer is that code's docs page.

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": {
      "code": "<code>"
    },
    "name": "explain_error"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesThe error code, e.g. LIVE_MODE_LOCKED

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover readOnly, idempotent, non-open-world, and non-destructive behavior. The description adds useful context about what comes back (that code's docs page), but omits what happens for an unknown or mistyped code, which matters given the strict pattern in the schema.

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?

Two short sentences, front-loaded with purpose then the call-site instruction and examples. Nothing is redundant or padded.

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?

For a one-parameter, read-only lookup with no output schema, the description covers purpose, input source, and the shape of the answer. The only gap is edge-case behavior for unrecognized codes and whether the result is a URL or doc content.

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

Parameters4/5

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

Schema coverage is already 100%, but the description adds genuine meaning beyond the schema by specifying the value's provenance — the `error.code` field from any API response or tool error — plus two sample codes. This helps the agent know it must extract the code from an error payload rather than inventing a string.

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?

States a specific verb (explain) and resource (an Intents API error code) and clarifies the output form: 'the answer is that code's docs page.' That distinguishes it from generic doc tools like get_doc or search_docs, since the mapping is code-to-docs-page rather than free-text lookup.

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 a clear trigger condition: 'Pass the `error.code` from any API response or tool error,' which tells the agent exactly when this tool applies. It stops short of explicit exclusions or naming an alternative (e.g., use search_docs when you don't have a code), so the guidance is clear but not exhaustive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.