Skip to main content
Glama
medusa-mcp
by trhonpavel

Cancel fulfillment

cancel_fulfillment
Destructive

Cancel an unshipped fulfillment so its items can be fulfilled again. Provide the order; omit fulfillment_id to target the only unshipped fulfillment.

Instructions

Cancels a fulfillment that has not been shipped yet, so its items can be fulfilled again. Without 'fulfillment_id' it uses the only unshipped fulfillment.

Input Schema

NameRequiredDescriptionDefault
orderYesOrder ID or order number
fulfillment_idNo
notify_customerNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.2/5.0
Behavior4/5

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

With destructiveHint=true, idempotentHint=false and readOnlyHint=false already declared, the description adds real behavioral value: it explains the downstream effect ('so its items can be fulfilled again') and the implicit default resolution when no id is supplied. It does not address non-idempotency or permission requirements, so it stops at a 4.

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 sentences, no waste, and the operational constraint and default resolution are front-loaded where the agent reads them first.

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 output schema, the description covers the important ambiguities (preconditions and id resolution) and annotations carry the safety profile. The unexplained 'notify_customer' flag and the absence of any error/edge-case note (e.g., multiple unshipped fulfillments) keep it from being fully complete.

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 coverage is only 33% - 'order' is documented and 'fulfillment_id' is bare - so the description must compensate, and it does explain the fallback behavior of the optional 'fulfillment_id'. However, 'notify_customer' is left entirely unexplained in both the schema and the description, so the compensation is incomplete.

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 ('Cancels a fulfillment') plus the qualifying scope ('that has not been shipped yet'), which cleanly separates it from sibling tools like cancel_order or create_shipment without needing the schema opened.

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

Usage Guidelines4/5

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

It gives the applicability condition (unshipped fulfillment) and the fallback resolution rule when 'fulfillment_id' is omitted, which is genuine usage guidance. It stops short of naming an alternative tool or explicitly stating the when-not case (e.g., what to do instead for a shipped fulfillment), so it misses the top tier.

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