Close Purchase Order Short
close_purchase_order_shortClose a purchase order short: accept that the units recorded missing on it will never arrive. Moves the order from Pending Receipt Resolution to Closed Short, writes the reason on each short line and sends its delivery receipt on to reconciliation. Nothing is received and no stock moves. First record the shortfall with receive_purchase_order (quantityReceived 0, quantityMissing the units that did not come; over-receipts go there too with confirmOverReceive); once every ordered unit is received or recorded missing, the order is Pending Receipt Resolution and can be closed here. get_purchase_order_receiving shows each line's ordered, received and missing units. Two-step: preview=true, then repeat the identical call with the previewReceipt and a fresh idempotencyKey. Requires Write + purchasing.execute.
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": {
"purchaseOrder": "<purchaseOrder>",
"reason": "<reason>"
},
"name": "close_purchase_order_short"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | Why the missing units will not arrive (e.g. "Vendor discontinued SKU"), up to 500 characters. Recorded on each short line, as the Close Short dialog does. | |
| preview | No | Step 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing changes until the commit call. | |
| purchaseOrder | Yes | Purchase order id (GUID), document number (e.g. PO-2026-10-000118), or the short form people use for an open order: its last digits ("118", "PO 118"). | |
| idempotencyKey | No | Caller-generated idempotency key; required with previewReceipt to commit. | |
| previewReceipt | No | Step 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| effects | No | ||
| preview | No | ||
| nextStep | No | ||
| expiresAt | No | ||
| actionItemId | No | ||
| confirmation | No | ||
| correlationId | No | ||
| purchaseOrder | No | ||
| approvalResult | No | ||
| idempotencyKey | No | ||
| previewReceipt | No | ||
| idempotentReplay | No |