Render cart preview
render_cart_previewShows a cart drawer as shoppers will see it: a PNG of the saved cart with a sample cart inside, plus a link to the same page. After create_cart or update_cart, render the cart, compare the picture with the merchant's screenshot or wishes, and patch what differs with update_cart. Repeat until it matches or after five rounds. The sample cart holds two lines, so a reward bar shows mid-way; view empty shows the empty cart. For an A/B test, version shows version B, C or D.
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": "render_cart_preview"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Cart id from list_carts. Default: the live cart, or the store's only cart. | |
| view | No | cart (default) or empty. | |
| scale | No | Pixel density. Default 2, so the picture is twice the width in pixels. | |
| width | No | Drawer width in px. Default: the cart's own width. | |
| version | No | A/B test version. Default A, the live item. B, C and D change only while the test is a draft. |