Skip to main content
Glama

RoboTrunk

Cancel a prepared checkout

cancel_checkout
DestructiveIdempotent

Declines a prepared checkout, returning status canceled: it asks the store to cancel that checkout. Use when the person declines, so a refusal is a recorded outcome rather than an inferred one. Not for reversing a payment: RoboTrunk holds no stock and charges nothing. Not for after approval; use get_order. Next: search_catalog for something else, or submit_feedback to say why. Error recovery: not_found (the demo) or CHECKOUT_NOT_FOUND (a store's checkout) means that checkout was never prepared here, so call create_checkout; continuation_not_found or RUN_AUTH_REQUIRED means send checkout_id exactly as an earlier answer returned it and, if you did, the checkout can no longer be read from here, so call create_checkout again; UCP_MERCHANT_BUSY, UCP_MERCHANT_REFUSED or UCP_MERCHANT_UNAVAILABLE means the store did not take the cancel, so try again shortly; on the demo a failed decline record is only a warning and the cancel still stands; any other error, including tool_layer_failure: retry once, then call submit_feedback. For RoboTrunk's test demo checkout (merchant null) it closes the checkout here and records the decline. Full guide: get_tool_guide or /agent/tools.json#cancel_checkout Example call: {"checkout_id":"the checkout_id create_checkout returned","reason":"Above the person's ceiling"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoWhy the checkout was declined, or null. Free text up to 300 characters; do not put personal data here.
checkout_idYesThe `checkout_id` returned by `create_checkout` in this browser.
shopping_session_idNoOptional server-issued shopping session correlation ID. It is not purchase authority.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, idempotentHint=true and openWorldHint=true, yet the description adds substantial context beyond them: that no stock is held and no payment is charged, that retries are safe ('retry once'), that on the demo a failed decline record is only a warning while the cancel still stands, and a full error-code taxonomy (not_found, CHECKOUT_NOT_FOUND, continuation_not_found, UCP_MERCHANT_BUSY, tool_layer_failure) with prescribed recovery per case.

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 correctly: purpose, then usage/exclusions, then recovery, then demo behavior and an example. It is long and the error-recovery block is dense, but nearly every sentence carries actionable routing information 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?

With no output schema, the description still tells the agent the returned status ('canceled'), the demo-vs-real-merchant distinction, idempotent retry behavior, and per-error-code recovery. An agent has everything needed to call it correctly and interpret the outcome.

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 100%, so the baseline is 3, but the description adds real meaning: it clarifies checkout_id must be sent exactly as an earlier answer returned it, that a missing continuation means the checkout can no longer be read, and it demonstrates both checkout_id and reason in a concrete example call.

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 ('Declines a prepared checkout, returning status canceled') and immediately scopes what it does at the store ('asks the store to cancel that checkout'). It is clearly distinguishable from siblings like create_checkout, complete_checkout and get_order, which are named in the text.

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?

Explicit when-to-use ('Use when the person declines, so a refusal is a recorded outcome rather than an inferred one') plus two explicit exclusions with alternatives ('Not for reversing a payment... Not for after approval; use get_order'), and it routes to next steps (search_catalog, submit_feedback). Nothing is left to inference.

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