Skip to main content
Glama

cancel_order

Destructive

Cancels a finalized order if labels have not been sent yet. Refunds the wallet. This is a DESTRUCTIVE operation - always confirm with the user before cancelling. If labels have already been sent, the cancellation will be rejected. Idempotent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYesOrder ID to cancel

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
statusNo
refundCentsNo
balanceCentsNo

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 mark destructiveHint=true, and the description reinforces this by stating the operation is DESTRUCTIVE and refunds the wallet. It also discloses the rejection condition (labels already sent) and idempotency, both beyond the annotations.

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?

The description is compact, with the core purpose and condition in the first sentence followed by safety-critical caveats. Every sentence adds information: refund, destructive confirmation, rejection condition, idempotency.

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 one-parameter tool with a high-coverage schema and output schema present, the description covers the key behavioral aspects: scope, refund, destruction, rejection, idempotency, and user confirmation. No important gaps are evident.

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?

The single parameter order_id is fully documented in the schema (100% coverage), so the description doesn't need to add param detail. It provides no extra meaning beyond the schema, matching the baseline of 3.

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 'Cancels' with resource 'finalized order' and a condition ('if labels have not been sent yet'), which distinguishes it from order-creation/finalization siblings. The behavior is unambiguous even without reading the schema.

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

Usage Guidelines5/5

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

Description explicitly scopes valid use: only finalized orders, and only before labels are sent; it warns that cancellation is rejected if labels have already been sent. It also instructs to always confirm with the user before cancelling, giving clear operational guidance.

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