Skip to main content
Glama

Why did this store's checkout revenue break?

diagnose_revenue_incident
Read-onlyIdempotent

Answers: what most likely broke this store's checkout or payment path, what argues against each explanation, and how to tell whether a fix actually held. Joins the store's own privacy-safe signals — order status over time, order-status transitions, order-note reason codes, gateway and webhook health, scheduler backlog, checkout page health, recent plugin/theme/core changes — against public release and issue evidence, on one timeline. Every answer reports which signal families this store could and could not report, because a family that cannot be collected is not a family that is fine. Returns up to three ranked hypotheses, each with the observations behind it, independent public sources where they exist, counterevidence, what remains unknown, safe next steps, and a verification plan. Returns abstained and charges nothing when the snapshot is stale, coverage is thin, or the signals do not support any cause — an unsupported guess during an outage is worse than no answer. Free while in beta. Call get_checkout_health_snapshot first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symptomNoWhat the merchant reports. Use "unknown" rather than guessing.
window_secondsNoWindow in seconds. Default 86400 (24h), maximum 604800 (7d).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
windowYes
symptomYes
billableYes
coverageYes
timelineYes
abstainedYes
hypothesesYes
price_microsYes
data_freshnessYes
failure_patternYes
failure_pattern_reasoningYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readonly/idempotent/non-destructive, and the description adds substantial behavioral context beyond them: it returns `abstained` and charges nothing rather than guessing during an outage, it reports which signaal families could not be collected, and it states it is free while in beta. Nothing in the description contradicts the annotations — it is a pure read/diagnostic operation.

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 dense, front-loaded paragraph that opens with the core purpose before moving to signals, output format, and abstention conditions. Every sentence carries operational value, though it is on the longer side and the unknown-cause caveat appears twice (in the output format and in the abstention rationale), so a small trim was possible.

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 complex diagnostic tool with an output schema and rich annotations, the description covers the prerequisite (snapshot first), the output contract (ranked hypotheses with observations, counterevidence, next steps, verification plan), the abstention conditions, and cost behavior. Nothing an agent needs to invoke it correctly or interpret its result is missing.

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 both params are fully documented in the schema (symptom enum with 'Use unknown rather than guessing,' window_seconds min/max/default). The description reinforces the honesty principle behind `symptom` but adds no syntax or format detail beyond the schema, 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?

States a specific diagnostic verb plus resource — 'Answers: what most likely broke this store's checkout or payment path' — and specifies the output shape (up to three ranked hypotheses, counterevidence, verification plan). This clearly distinguishes it from siblings: get_checkout_health_snapshot fetches data, verify_revenue_recovery and check_checkout_change_risk cover verification and risk, while this tool synthesizes a causal diagnosis.

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 explicit workflow sequencing — 'Call get_checkout_health_snapshot first' — and states when the tool should not be used: it abstains when the snapshot is stale, coverage is thin, or signals do not support a cause. It does not, however, explicitly exclude sibling alternatives (e.g., when to prefer verify_revenue_recovery), so the when-not-to-use guidance is partially implied rather than named.

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.

Resources