Preview order
get_order_previewShow the full order before checkout: re-priced lines, promo or bundle discount (they don't stack — the better one applies), shipping, the address from set_shipping_address, and the grand total in the order currency (local for some destinations, e.g. UZS for Uzbekistan). Call it once the address is set and show the result to the human for confirmation before prepare_order. Read-only and safe to repeat; prices come from the live catalog, not from the cart. ready_to_prepare stays false while the address is missing or a line is unavailable — fix what issues lists (update_cart_item, set_shipping_address) first. An empty cart returns an error.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_order_preview"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| error | No | Present when the cart is empty. | |
| items | No | Re-priced order lines. | |
| total | No | ||
| bundle | No | Bundle price applied instead of the promo code, if any. | |
| issues | No | Lines that became unavailable, if any. | |
| currency | No | ||
| discount | No | ||
| shipping | No | ||
| subtotal | No | ||
| promo_code | No | ||
| ready_to_prepare | No | True when an address is set and all lines are orderable. | |
| shipping_address | No | Address set via set_shipping_address (null if not set). |