Skip to main content
Glama
Shopify MCP Server

Shopify MCP Server

by morsimohsen

cancel_order

Cancel an order with optional refund and restock, and notify the customer to manage order changes and inventory updates.

Instructions

Cancel an order with optional refund and restock

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": {
      "id": "<id>"
    },
    "name": "cancel_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesOrder ID
reasonNoCancellation reason
refundNoIssue refund (default: false)
restockNoRestock items (default: true)
notifyCustomerNoSend cancellation email (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden and mostly fails it: it does not say the action is irreversible, whether an already-fulfilled order can be cancelled, what happens to existing fulfillments, or what permissions are needed. "Optional refund and restock" is the only behavioral hint, and defaults are already in the schema.

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?

A single front-loaded sentence with zero filler, listing the action and its optional modifiers. It is efficient but borders on under-specification for a destructive operation.

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

Completeness2/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 and no output schema, the description should disclose irreversibility, side effects, and failure conditions. Instead it stops at the feature list, leaving the agent to guess at consequences before committing an irreversible action.

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% with clear per-field descriptions and a reason enum, so the schema does the heavy lifting and baseline 3 applies. The description adds nothing beyond restating that refund and restock are optional, and says nothing about how reason values affect downstream refunds.

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?

Names a specific verb and resource ("Cancel an order") plus the two optional side effects (refund, restock), so the operation is immediately identifiable. It never distinguishes itself from adjacent siblings such as cancel_fulfillment, create_refund, or create_return, so an agent cannot tell from the text alone which cancellation path applies.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance, no prerequisites, and no mention of alternatives. Given a sibling named cancel_fulfillment and separate create_refund/create_return tools, the absence of routing guidance is a real gap.

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