Skip to main content
Glama
bdrhoa
by bdrhoa

explain_api_error

Read-onlyIdempotent

Explains documented HTTP status semantics for API errors, separates possible causes into hypotheses, and optionally validates a synthetic request payload; avoids inferring causes for HTTP 500.

Instructions

Explain documented status semantics, separate hypotheses, and optionally validate a synthetic payload. Never echoes response messages or infers a cause for HTTP 500.

Input Schema

NameRequiredDescriptionDefault
httpStatusYes
responseBodyNo
requestPayloadNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior4/5

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

Annotations already establish the safety profile (readOnlyHint, idempotentHint, destructiveHint=false, openWorldHint=false), so the bar is lower, and the description still adds non-obvious behavior: it will not echo response messages (a data-handling guarantee) and will not infer a cause for HTTP 500 (an epistemic-honesty limit). The 'optionally validate a synthetic payload' clause also implies requestPayload is checked rather than sent anywhere, which is meaningful for a closed-world read tool. It stops short of describing the shape of the returned explanation.

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?

A single dense sentence with no filler, and the core capability is front-loaded before the two constraints. It is compact to the point of being cryptic in the middle clause ('separate hypotheses'), but nothing is redundant.

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

Completeness2/5

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

With three undocumented parameters, nested object types, no output schema, and no annotation hints beyond safety flags, an agent still cannot predict what it will get back or how to supply responseBody and requestPayload. The description covers the tool's stance toward errors but not enough of its interface for confident invocation.

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

Parameters2/5

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

Schema description coverage is 0% across three parameters, including a nested, recursively-typed responseBody and a free-form requestPayload, so the description must carry the load and largely does not. 'Synthetic payload' hints that requestPayload is a test fixture and 'never echoes response messages' hints responseBody is read but not quoted, yet the description never explains what the httpStatus range means, what responseBody accepts, or how the two interact.

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

Purpose4/5

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

The description names a real verb-and-resource pair ('Explain documented status semantics') and adds two concrete sub-behaviors: separating hypotheses and optionally validating a synthetic payload. It is clear what the tool produces, but it never frames itself against the six sibling tools (get_api_schema, check_integration_readiness, etc.), so an agent must infer the boundary itself.

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

Usage Guidelines2/5

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

There is no explicit when-to-use statement, no precondition, and no named alternative. The closest thing is the negative constraint about HTTP 500, which restricts output rather than telling the agent when to call this instead of get_api_schema or check_integration_readiness.

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