Skip to main content
Glama

Report what happened at checkout

report_purchase_outcome
DestructiveIdempotent

REQUIRED after every checkout attempt with a card from retrieve_card. Call it right after you try to pay, whether checkout succeeded or failed, before you move on: outcome completed with the order number in message, or not_completed with the merchant's exact error text. Don't skip it because checkout went through. Only the agent that made the request can report on it, and only after retrieve_card drew the card. A not_completed purchase stays in the purchase history, labeled not completed with your message. Your report alone does NOT change any spending total or cap: the purchase keeps counting until the account owner or a team admin confirms in the dashboard that it wasn't charged. Reporting never gives back automatic-spending envelope room: the drawn card can't be revoked, so that room stays used. Report only once you're done trying with the card; if a retry with the same card goes through first, report completed. A purchase reported completed can't be changed to not_completed. Reporting the same outcome again is harmless.

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": {
      "request_id": "<request_id>",
      "outcome": "<outcome>",
      "message": "<message>"
    },
    "name": "report_purchase_outcome"
  }
}

Input Schema

NameRequiredDescriptionDefault
messageYesWhat happened, in a sentence. For not_completed, include the decline or error text the merchant showed (e.g. 'Your card was declined (insufficient funds)'). For completed, an order number if there is one.
outcomeYescompleted: the merchant took the payment. not_completed: checkout didn't go through.
request_idYesThe request_id returned by request_purchase

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / request_id / format
      Added value: +"uuid"
    • addedInput schema / properties / request_id / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only flag non-read-only, destructive and idempotent; the description supplies the substantive consequences: the report does not change spending totals or caps, the purchase stays in history labeled not completed until a human confirms in the dashboard, and envelope room is never returned because the card cannot be revoked. It also discloses irreversibility ('A purchase reported completed can't be changed to not_completed') and safe repetition, which is consistent with idempotentHint=true rather than contradicting it.

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?

Front-loaded with the imperative requirement and ordered roughly by importance: do it, when, don't skip, preconditions, consequences, edge cases. It is long for a 3-parameter tool and has mild redundancy ('REQUIRED after every checkout attempt' vs 'Don't skip it because checkout went through'), but each sentence carries a distinct rule rather than 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?

For a mutation tool with no output schema, the description covers what the agent must know to call it correctly and what the call does and does not affect downstream (spending caps, envelope room, purchase history state). Preconditions, irreversibility and idempotency are all addressed, leaving no material gap.

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 outcome and message semantics are already documented in near-identical wording ('merchant's exact error text', 'order number if there is one'). The description reinforces how the two fields pair at call time but adds no format, length or validation 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 verb and resource ('report what happened at checkout') and ties it to a concrete lifecycle position: after a checkout attempt with a card from retrieve_card. It is clearly separable from request_purchase, retrieve_card, check_status and get_spending_summary because it is the only tool that records the outcome of an already-attempted payment.

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

Usage Guidelines5/5

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

Gives explicit when-to-use ('right after you try to pay, whether checkout succeeded or failed'), explicit when-not-to-skip ('Don't skip it because checkout went through'), and a conditional rule for the retry case ('if a retry with the same card goes through first, report completed'). Preconditions are named: only the agent that made the request, and only after retrieve_card drew the card.

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.