Skip to main content
Glama
trhonpavel
by trhonpavel

Cancel order

cancel_order
DestructiveIdempotent

Cancel a Medusa order when it has no active fulfillments. Requires explicit user confirmation because the action is irreversible.

Instructions

CANCELS the order. Irreversible – get explicit confirmation from the user before calling. The order must not have active fulfillments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderYesOrder ID or order number

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is covered. The description adds real value beyond that: irreversibility and the active-fulfillment precondition. It does not describe the failure mode when the precondition is violated or what the caller gets back.

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 short sentences, front-loaded with the operation, then the confirmation requirement, then the precondition. Every clause carries information an agent needs.

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 a single-parameter destructive mutation, the annotations cover the safety profile and the description covers irreversibility, confirmation, and preconditions. Nothing needed to invoke it correctly 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 coverage is 100% and the single 'order' parameter is documented as 'Order ID or order number'. The description adds no syntax or format detail beyond the schema, so the baseline of 3 applies.

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 the order') with no ambiguity, and no sibling tool competes for the cancel operation, so the agent can route to it directly.

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?

Gives an explicit call-time requirement ('get explicit confirmation from the user before calling') and a precondition ('must not have active fulfillments'), which is strong contextual guidance. It stops short of naming alternatives, but none exist among the siblings.

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