Render bundle preview
render_bundle_previewShows a bundle widget as shoppers will see it on a product page: a PNG of the saved bundle on one of the store's products, plus a link to the same page. After create_bundle or update_bundle, render it, compare the picture with the merchant's screenshot or wishes, and patch what differs with update_bundle. Repeat until it matches or after five rounds. Gifts, bundle items and upsells show the store's real products. Subscription choices show the store's plans, or sample monthly plans when it has none. When copying a screenshot, pass it as reference_image: we render at its real width, show both side by side and measure the size differences. Judge sizes only at that width. For an A/B test, version shows version B, C or D.
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": {
"id": "<id>"
},
"name": "render_bundle_preview"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Bundle id from list_bundles. | |
| scale | No | Pixel density. Default 2. A render with reference_image is always 2. | |
| width | No | Widget width in CSS px for the render. Default 480, or the screenshot's own width when reference_image is set. The screenshot is always measured at its 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. | |
| product_id | No | A product gid or id to show it on. Default: a product the bundle's products filter allows. | |
| reference_image | No | The merchant's screenshot to compare against: an https link, or the image as base64 (PNG, JPEG or WebP, up to 3 MB; send a bigger one as a link). We work out its CSS width, render at that width and return one picture: the screenshot on the left, the render on the right, same width. We also measure both and suggest size changes you can pass to update_bundle. |