Skip to main content
Glama

Cancel an order before funding

cancel_order

Cancel an unfunded order and notify the shopper. Refused once funding starts; use dispute or refund tools instead.

Instructions

Cancel an order that is not funded yet (requested, quoted or accepted) and tell the shopper (best effort). Refused once funding has started — then use open_dispute, accept_refund_offer or refund_after_timelock. Nothing is paid or refunded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoreason sent to the shopper (default "cancelled by user")
order_idYesorder id (32 hex characters) from request_quote or list_orders

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare it is not read-only and not destructive; the description adds genuinely new behavior: the state-machine precondition, the refusal boundary, a best-effort shopper notification side effect, and the guarantee that no money moves. It stops short of stating idempotency or permission requirements, so 4 rather than 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense sentences with no filler, front-loading the eligibility constraint and the failure/alternative path. Every clause carries information an agent needs.

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 2-parameter mutation with no output schema, the description supplies the precondition, the refusal case, the fallback tools, and the absence of financial side effects. Nothing needed to call it correctly 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 order_id (32-hex format, source tools) and reason (max length, default) are already fully documented. The description's only added signal is the implied 'best effort' delivery of the reason to the shopper, which is marginal; 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 (cancel) and resource (order) and narrows the scope to unfunded orders, enumerating the eligible states (requested, quoted, accepted). An agent can immediately tell this apart from fund_order, refund_after_timelock, or open_dispute without opening any schema.

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?

Explicitly gives the use condition (order not funded yet), the exclusion (refused once funding has started), and names three concrete alternative tools for the funded case. This is a complete routing rule.

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