Skip to main content
Glama

Diagnose a failed request

diagnose_last_failure
Read-only

Explains why a Kurlo request failed by returning status, errors, failed tests, unset variables, response differences, and likely-cause hints for the most recent failure or a specified history entry.

Instructions

Explain why a request sent from the Kurlo app failed. Without entry it takes the most recent request that got no response, a 4xx or 5xx status, or failing tests. Returns the status, error, failed tests, the {{variables}} nothing sets, how the response differs from the saved example, and hints for the likely cause. Secrets are masked.

Input Schema

NameRequiredDescriptionDefault
entryNoHistory entry id from list_history. Defaults to the most recent failure.
environmentNoEnvironment to check variables against. Defaults to the one active in the app.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.4.1

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations by enumerating what the result contains (status, error, failed tests, unset variables, diff versus saved example, cause hints) and by disclosing that secrets are masked. For a read-only diagnostic with no output schema, this is the exact behavioral detail an agent needs.

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?

Purpose is front-loaded in the first sentence, followed by default behavior and return contents. The middle sentence is a dense enumeration but every clause carries information; no filler or restated title text.

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?

With no output schema, the description carries the return-value burden and does so thoroughly, including the masking caveat. Both optional parameters have defaults explained, so an agent can call it with zero arguments and predict the output shape.

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 both parameters are already documented. The description adds only one piece of real meaning — that 'failure' spans no-response, 4xx/5xx, or failing tests — which sharpens the default for `entry` but does not explain the `environment` parameter's effect on variable checking.

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?

States a specific verb and resource: 'Explain why a request sent from the Kurlo app failed.' The diagnostic framing is clearly distinct from data-retrieval siblings like get_history_entry or list_history, though it never names an alternative explicitly.

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 clear usage context by defining the default trigger condition — 'the most recent request that got no response, a 4xx or 5xx status, or failing tests' — so an agent knows it can be called with no arguments after a failure. No explicit when-not or named alternative is provided.

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