Skip to main content
Glama

Cancel order (purchasing)

p2p_cancel_po
Destructive

Cancel an order nothing has arrived against and no bill points at. With a reason. Once anything has arrived, the order cannot be cancelled: close the rest short instead. The order stays on the record as cancelled. Effects: order 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": {
      "po_id": "<po_id>",
      "reason": "<reason>"
    },
    "name": "p2p_cancel_po"
  }
}

Input Schema

NameRequiredDescriptionDefault
po_idYesThe order. An existing p2p_po id.
reasonYesWhy it is cancelled.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With destructiveHint=true already indicating a state-changing operation, the description adds valuable behavioral detail: the order remains on record as cancelled rather than being deleted, and cancellation is blocked by receipts or bills. This clarifies the mutation's real effect and constraints 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loads the core condition before stating the alternative and outcome. The final 'Effects: order cancelled' is slightly redundant with the opening, but the overall structure is efficient and easy to scan.

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 destructive two-parameter mutation with no output schema, the description covers preconditions, the blocked case and alternative, and the post-cancel state. An agent has enough context to invoke it correctly and understand the resulting order status.

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 description coverage is 100%, so the two parameters are already documented in the input schema. The description reinforces that a reason is required but does not add syntax, format, or identifier guidance beyond the schema, making the baseline score appropriate.

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?

The description gives a specific verb and resource (cancel an order) plus the exact preconditions: nothing received and no bill attached. It also distinguishes the cancellation case from the close-short alternative, so an agent can identify the intended operation without opening 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?

It explicitly states when cancellation is valid and when it is not: once anything has arrived, the order cannot be cancelled and the rest should be closed short instead. That gives both the selection condition and the alternative path.

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.