Skip to main content
Glama

Final POS – Custom POS Builder

Edit purchase order

hub_update_purchase_order
Destructive

Rewrite an order that has not been sent yet. ONLY works while it is suggested or draft — a sent or received order is refused, because the supplier already has it. This REPLACES the whole order: the lines and charges you pass become the order, and anything you leave out is dropped. Read it with get_purchase_order first and send the full set back. This is also how a suggestion is ACCEPTED: editing a suggested order turns it into a draft and gives it its PO number. To accept one unchanged, pass its existing lines back verbatim.

Input Schema

NameRequiredDescriptionDefault
linesYesThe complete new set of lines
notesNo
discountNoFlat discount on the whole order, e.g. "25.00". Not with discountPercent
dutyFeesNoDuty / customs charged on the order
outletIdYesOutlet id the goods will be received into
customFeesNoAny other named charge on the order, e.g. "Handling"
supplierIdYesSupplier id — normally the order’s current supplier
shippingFeeNoShipping charged on the order, e.g. "18.00"
expectedDateNo
discountPercentNoDiscount as a percentage of the items subtotal
purchaseOrderIdYesPurchase order id from get_purchase_orders — not a PO number

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare destructiveHint=true, but the description goes well beyond that: it explains the replacement semantics ('anything you leave out is dropped'), the status transition (suggested → draft plus PO number assignment), and the reason for refusal. This is exactly the context an agent needs to avoid data loss.

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?

Five tight sentences, each carrying a distinct fact (scope, precondition, replacement semantics, prerequisite read, accept flow). The most important constraint is front-loaded in sentence two.

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 mutation with no output schema, the description covers preconditions, data-loss semantics, and the secondary accept workflow. Nothing an agent needs in order to invoke it safely is missing.

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?

Schema coverage is 82%, so the schema already carries most parameter documentation. The description adds the crucial mental model for the `lines`/charges parameters — that the passed set becomes the whole order and omissions are dropped — which shapes how an agent must populate them, though it adds no per-field syntax detail.

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+resource ('Rewrite an order') and immediately scopes it to orders that have not been sent. It distinguishes itself from sibling operations like hub_create_purchase_order, hub_send_purchase_order, and hub_receive_purchase_order by naming the exact statuses it accepts.

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?

Explicit when (status `suggested` or `draft`), when-not (sent/received orders are refused), and the prerequisite workflow ('Read it with get_purchase_order first and send the full set back'). It also documents the non-obvious accept-a-suggestion path and how to accept unchanged.

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.