Skip to main content
Glama

Final POS – Custom POS Builder

Cancel purchase order

hub_cancel_purchase_order
Destructive

Cancel an order the merchant no longer wants. CONFIRM FIRST, naming the supplier and the PO number — there is no undo, and the order disappears from the list rather than showing as cancelled. REFUSED once any stock has been received against it: that stock is real and the record has to stay. Receive the rest instead, or leave it partially received. Cancelling does NOT tell the supplier anything. If the order was already sent, the merchant still has to contact them — say so.

Input Schema

NameRequiredDescriptionDefault
purchaseOrderIdYesPurchase order id from get_purchase_orders — not a PO number

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?

Goes well beyond the destructiveHint annotation: mandates CONFIRM FIRST, warns there is no undo, notes the order vanishes from the list rather than showing as cancelled, explains the stock-received refusal rule, and clarifies that cancelling does NOT notify the supplier. Rich operational context.

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?

Front-loads the core action, then layers behavioral warnings in short, ordered sentences. The emphasis formatting is dense but every clause (no-undo, refusal rule, supplier non-notification) is load-bearing for a destructive irreversible operation.

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 single-parameter, no-output-schema mutation, the description fully covers the safety profile, the refusal edge case, and the downstream consequence. An agent has everything needed to call it correctly and advise the merchant.

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% and the schema already clarifies the id is 'not a PO number'. The description's mention of 'the PO number' is about the human confirmation step, not the input parameter, so it adds little param-level meaning beyond the schema. Baseline 3 applies.

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 an order') and implicitly distinguishes itself from siblings like hub_receive_purchase_order and hub_send_purchase_order by explaining cancellations relationship to receiving and sending. An agent can tell exactly what this does.

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?

Explicitly names the when ('an order the merchant no longer wants'), the when-not ('REFUSED once any stock has been received'), and the alternatives ('Receive the rest instead, or leave it partially received'). Nothing is left to inference.

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.