Skip to main content
Glama

Cancel sales order

cancel_sales_order
Destructive

Cancel a sales order. Inventory already shipped is not reversed. Two-step confirm_token: the first call without confirm_token only returns confirmation_required, a summary, and confirm_token. That call does not write, delete, cancel, or send. The second call must repeat the same arguments plus that confirm_token; that is the write. A confirm boolean is ignored. The token expires in 5 minutes and works once.

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": {
      "order_id": "<order_id>"
    },
    "name": "cancel_sales_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
order_idYes
confirm_tokenNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description adds material context the annotations cannot: shipped inventory is not reversed, the first call performs no write/delete/cancel/send, the token expires in 5 minutes and works once, and a confirm boolean is ignored. This is exactly the behavioral disclosure a destructive two-phase tool needs.

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?

Four sentences, each load-bearing: the operation, the inventory caveat, the two-phase contract, and the token rules. The write-vs-preview distinction is front-loaded where an agent needs it before deciding to call.

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?

There is no output schema, and the description compensates by naming what the first call returns (confirmation_required, a summary, confirm_token). For a two-parameter destructive tool, an agent has everything needed to call it correctly on the first attempt.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must carry the parameters. It fully explains confirm_token's lifecycle (obtained from call one, repeated with identical arguments, single-use, 5-minute TTL) and notes confirm is ignored. order_id is only implied by context ('cancel a sales order') rather than described, which is the one gap.

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 a sales order') immediately, and the sibling list contains cancel_purchase_order, cancel_return, and cancel_stock_movement, so the resource noun alone distinguishes it from every cancel alternative. No ambiguity about what operation is performed.

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?

The two-step invocation protocol is spelled out precisely: first call without confirm_token only previews, second call with token performs the write. What's missing is guidance on when to choose this over the destructive alternative delete_sales_order, which is a real sibling in the list and a plausible agent confusion point.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources