Refund selected order lines
The agent gathers the affected lines, amounts, and reasons progressively, then presents one exact summary before creating the refund.
Help me refund order <ORDER_ID>. Show the refundable lines, let me choose the
affected items and amount for each, invite an optional reason and detail per
line, and require an overall reason. Give me one exact summary before creating
anything.
The agent calls get_refund_options and leads a short conversation:
- It shows numbered line items with original, reserved or refunded, and remaining refundable amounts in familiar major currency units.
- You select one or more affected lines.
- For each selected line, you specify a decimal major-unit amount such as
25.00. The agent may offer the full remaining amount, but never assumes it or asks you to calculate minor units. - You can add a supported reason and detail for each line. A
customline reason requires detail. - You provide the required overall refund reason. An overall
customreason also requires detail. create_refundrefreshes the snapshot and presents the exact per-line amounts, total, reasons, and consequence for confirmation.
Sample response
Refund ready for confirmation
The preview shows exactly which paid lines will be affected before the refund is created.
- Order
- ord_example_1042
- Refund total
- GHS 75.00
- Overall reason
- Item returned
Selected order lines
| Line | Original paid | Already reserved or refunded | This refund |
|---|---|---|---|
| Utility tote × 1 | GHS 50.00 | GHS 0.00 | GHS 50.00 |
| Event pass × 1 | GHS 100.00 | GHS 25.00 | GHS 25.00 |
Nothing has been refunded yet. Creating the refund requires confirmation and begins an asynchronous process.
Illustrative values. The exact presentation depends on the MCP client.
Refund creation is asynchronous. A returned pending or processing refund means work has started, not that money has reached the customer. The agent uses get_refund to reconcile and says the refund completed only at succeeded.
A still-pending refund can be passed to cancel_refund, which has its own exact confirmation.