Skip to main content
Glama

Cancel an order

cancel_order
Destructive

Cancel an order from a conversation on the Shopify store, as the signed-in teammate. The workspace's approval rules apply: a cancellation above their limits waits for an admin, and the result says whether it ran or waits. Repeated calls are not deduplicated: an order already cancelled is refused, but calling it again while a cancellation waits for approval adds another request.

Input Schema

NameRequiredDescriptionDefault
notifyNoEmail the customer about the cancellation.
reasonNoWhy the order is cancelled.
refundNoRefund the amount paid to the original payment methods.
orderIdYesThe order id, from get_conversation_orders or lookup_orders.
restockNoPut the items back in stock.
staffNoteNoA staff-facing note on the cancellation (at most 255 characters).
conversationIdYesThe Aide conversation id (`cnv_…`), from find_conversation.
requestApprovalNoAsk a teammate to approve it instead of running it now. Without it, the workspace approval rules decide: an action above their limits waits for an admin.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • removedInput schema / properties / notify / enum
      Removed value: -[
      -  "1",
      -  1,
      -  "true",
      -  true,
      -  "on",
      -  "0",
      -  0,
      -  "false",
      -  false
      -]
    • addedInput schema / properties / notify / type
      Added value: +"boolean"
    • addedInput schema / properties / reason / type
      Added value: +"string"
    • removedInput schema / properties / refund / enum
      Removed value: -[
      -  "1",
      -  1,
      -  "true",
      -  true,
      -  "on",
      -  "0",
      -  0,
      -  "false",
      -  false
      -]
    • addedInput schema / properties / refund / type
      Added value: +"boolean"
    • removedInput schema / properties / requestApproval / enum
      Removed value: -[
      -  "1",
      -  1,
      -  "true",
      -  true,
      -  "on",
      -  "0",
      -  0,
      -  "false",
      -  false
      -]
    • addedInput schema / properties / requestApproval / type
      Added value: +"boolean"
    • removedInput schema / properties / restock / enum
      Removed value: -[
      -  "1",
      -  1,
      -  "true",
      -  true,
      -  "on",
      -  "0",
      -  0,
      -  "false",
      -  false
      -]
    • addedInput schema / properties / restock / type
      Added value: +"boolean"
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, but the description adds genuinely non-derivable behavior: the workspace approval rules that may park the call for an admin, the fact that the result reports whether it ran or waits, and the non-deduplication rule (a repeat call while awaiting approval queues another request, while an already-cancelled order is refused). This is exactly the operational context an agent needs before mutating state.

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?

Three sentences, zero filler, and front-loaded: purpose first, then approval behavior, then idempotency semantics. The longer final sentence is dense but every clause carries distinct, actionable information.

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 an eight-parameter destructive mutation with no output schema, the description covers the highest-risk unknowns: approval gating, result meaning, and repeat-call behavior. Remaining parameter semantics (refund, restock, notify) are fully carried by the schema, so nothing critical 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 all eight parameters — including the reason enum and the requestApproval flag — are already documented in the schema. The description only indirectly touches requestApproval via the approval-rules sentence and adds no syntax or format detail beyond it, so the baseline 3 applies.

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?

The description gives a precise verb+resource (cancel an order) plus the scope and actor ('from a conversation', 'as the signed-in teammate'), which is well beyond a restatement of the name. It does not, however, explicitly distinguish itself from the sibling refund_order or approve_order_action, which is the only thing keeping it from a 5.

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

Usage Guidelines3/5

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

Usage is implied by the phrase 'from a conversation on the Shopify store' and the approval-path sentence, but the description never states when to choose this over refund_order, or when cancellation is inappropriate. No explicit alternatives or exclusions are named, leaving routing to the agent's 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.