Skip to main content
Glama

shopify_order_cancel

Cancel a Shopify order and decide whether to return items to inventory. Choose a reason and optionally notify the customer; cancellation is final.

Instructions

Cancel an order. restock has to be stated: true returns the items to inventory, false leaves stock as it is. Shopify does this in the background and answers with a job, so no errors means accepted rather than finished. Cancelling cannot be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
variablesYesThe order to cancel.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true; the description adds substantial non-obvious behavior: the operation is asynchronous (returns a job, success means queued not completed), the restock choice materially affects inventory, and the action is irreversible. These are exactly the traits an agent needs beyond the annotations.

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 tight sentences with the operation stated first, then the parameter semantics, then the async/irreversibility caveat. No filler and the most important warning (cannot be undone) lands last for emphasis.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive mutation with no annotations covering danger and no output schema, the description covers irreversibility, async job semantics, and inventory effects well. It omits preconditions (which order states allow cancellation) and what the returned job looks like, but nothing essential for correct invocation 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% and every parameter is documented, including the restock consequence and the notifyCustomer default, so the description's restock sentence largely duplicates the schema. Baseline 3 applies because the schema does the heavy lifting, though 'has to be stated' usefully stresses that restock is mandatory.

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 ('Cancel an order') with no ambiguity, and cancellation is intrinsically distinguishable from the sibling tools (orders_list, order_get, order_fulfillment_orders). An agent can identify the operation without opening the schema.

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?

The description clarifies required semantics of `restock` and warns that no errors means 'accepted' not 'finished', which is useful invocation context. However it offers no when-to-use guidance versus alternatives and no prerequisites such as the order state that permits cancellation.

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