order-cancel
Cancel a Shopify order irreversibly by specifying a reason, with options to refund payment, restock inventory, and notify the customer.
Instructions
Cancel an order with options for refunding, restocking inventory, and customer notification. Cancellation is irreversible.
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": {
"orderId": "<orderId>",
"reason": "<reason>",
"restock": "<restock>"
},
"name": "order-cancel"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | Reason for cancellation | |
| refund | No | Whether to refund the full amount to the original payment method. For partial refunds on specific line items, use refund-create instead. | |
| orderId | Yes | The order GID, e.g. gid://shopify/Order/123 | |
| restock | Yes | Whether to restock inventory | |
| staffNote | No | Internal note (not visible to customer) | |
| notifyCustomer | No | Whether to send cancellation notification to customer. IMPORTANT: Always confirm with the user before enabling — sends a real email/SMS to the customer. |