Update cart
update_cartChanges a cart drawer: texts, sections and their order, reward tiers (free shipping, discounts, free gifts), product upsells, order upsells, trust badges, payment icons and look. Send only what changes, named as get_cart returns it. Without an id it changes the live cart. A cart that is off saves at once. The live cart goes in two steps: the first call saves nothing and returns a picture of the change, the list of changes and a confirm_token. Show the merchant, and when they say yes, call again with the same id and confirm_token (you can omit changes, or resend the same changes). Reward tiers change what checkout charges: confirm a new or changed threshold, discount or free gift with the merchant before sending it, and afterwards tell them what the result's rewards.tell_merchant says. Custom HTML blocks stay in the app. When matching a screenshot or another store's cart, ask the merchant first whether to copy its colors or keep the store's own colors, then render_cart_preview the result and patch what differs. For an A/B test, version B, C or D changes that version while the test is a draft, and saves at once.
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": "update_cart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Cart id from list_carts. Default: the live cart, or the store's only cart. | |
| changes | No | Fields to change, named as get_cart returns them. Sections merge into what is there; a section the cart lacks starts from its defaults, so send enabled: true to show it. Write shopper text in the cart's language (get_cart shows it). | |
| version | No | A/B test version. Default A, the live item. B, C and D change only while the test is a draft. | |
| confirm_token | No | For the live cart: the token from the preview, once the merchant said yes. When passed, changes may be omitted. |