Skip to main content
Glama

Close or cancel an order

purchasing_close_order
Destructive

Close an order that was sent: stop waiting for the rest (what came in stays, and can still be billed). Or cancel it (cancel: true) while nothing came in and it has no bills; a cancelled draft never had a number. Closed and cancelled orders are final. Costs $0.01 per call; nothing if it fails.

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": "<order>"
    },
    "name": "purchasing_close_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderYesThe order_id, or the order's number like "PO-0007".
cancelNo
reasonNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true, idempotentHint=false) the description discloses what actually happens on close ('what came in stays, and can still be billed'), that both outcomes are irreversible ('Closed and cancelled orders are final'), and the billing cost with its failure policy. That is exactly the added context annotations cannot express, and it is consistent with destructiveHint=true.

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?

The two operating modes are front-loaded before the details, and the closing cost sentence is short and earns its place. Some clauses are densely packed ('what came in stays, and can still be billed'), but nothing is filler.

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, non-idempotent mutation with no output schema, the description covers the effects, finality and cost an agent needs before calling. The remaining gap is the undocumented 'reason' parameter and no hint about what the call returns or how failure manifests beyond 'nothing if it fails'.

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% (only 'order' is documented), so the description must carry the load. It fully explains the meaning and precondition of the 'cancel' flag, which the schema leaves as a bare boolean default, but it never mentions the 'reason' parameter or its purpose. Partial compensation for a low-coverage schema, hence 3.

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?

The description names both operations precisely — close a sent order (stop waiting for remaining items) versus cancel (cancel: true) — and separates the two by an explicit precondition, so an agent can distinguish them without opening the schema. It does not, however, point at the neighbouring purchasing_send_order / purchasing_update_order / purchasing_receive tools that an agent might confuse with this one.

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?

Usage conditions are stated concretely: close applies to an order that was sent; cancel applies 'while nothing came in and it has no bills'. That is real when-to-use guidance for both branches. What is missing is any reference to alternative sibling tools (e.g. for changing line items or receiving goods) or a statement of when neither branch applies.

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