Skip to main content
Glama

cancel_order

Idempotent

Buyer refunds an unfulfilled pending order after its 24-hour deadline. Delivered/completed orders cannot be cancelled.

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_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
order_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and idempotentHint=true, and the description adds real state preconditions: the order must be unfulfilled and pending, and the 24-hour window must have elapsed. It does not say whether the refund is immediate or asynchronous, or whether it can fail after the deadline, leaving some operational gaps.

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 short sentences, front-loaded with the eligible action and immediately followed by the exclusion. Nothing redundant or padded.

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 one-parameter mutation with annotations and no output schema, the description covers eligibility and state preconditions well. The remaining gap is the outcome (what a successful cancellation returns or whether a refund amount is produced), which the absence of an output schema makes more noticeable.

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?

With exactly one parameter, there is no alternative function selection to disambiguate; the single parameter, order_id.

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?

States a concrete action on a concrete resource ('Buyer refunds an unfulfilled pending order') and bounds it by order state and a 24-hour deadline. It is slightly muddled by using 'refunds' for a tool named cancel_order, but the intent is unambiguous and no sibling (e.g., deliver_order, dispute_delivery) overlaps.

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?

Clearly says when this applies (unfulfilled, pending, past the 24-hour deadline, buyer-initiated) and when it does not (delivered/completed orders cannot be cancelled). It stops short of naming an alternative for the excluded cases, such as dispute_delivery, so the agent must infer the fallback.

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