Set an item's photos
set_item_photosGive ONE catalog item (a product, room, dish…) its photos: add several, choose the lead photo, and tie photos to an option such as a colour, so the product page shows the blue photos when a shopper picks Blue. Use this for every photo change on an item, never update_collection_item. Name the item by item_id, or collection_type plus its slug or title. To tag photos by colour the item needs those options (variants.axes); an unknown option is refused with the item's options. A visible item's change reaches the public site by collection auto-publish.
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": {
"site_id": "<site_id>",
"photos": "<photos>"
},
"name": "set_item_photos"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item | No | The item's slug, or its exact current title. A title shared by several items is refused with their slugs. | |
| mode | No | "add" (default) keeps the item's photos and adds these; sending a photo the item already has (same URL) updates it, which is how you re-tag or re-order the lead. "replace" makes these the item's whole set. | |
| photos | Yes | ||
| item_id | No | The item's id (from list_collection_items). Preferred. | |
| site_id | Yes | The site the collection belongs to | |
| user_goal | No | Optional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details. | |
| collection_type | No | The collection, when naming the item by `item` instead of `item_id`. |