Link Assets to Product
sirv_link_assets_to_productLink up to 100 library assets to one product, with an optional role: main, gallery, lifestyle, detail or swatch.
Use it to add images to one product. Do not use it to publish to a store: use sirv_push_image_to_shopify. To link the same assets to many products, use sirv_bulk_edit_products with linkAssets.
Inputs: productId and assetIds are required. Without role, the assets get no role.
Returns how many assets it linked.
Credits: free.
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": {
"productId": "<productId>",
"assetIds": "<assetIds>"
},
"name": "sirv_link_assets_to_product"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | The images' role on the product. Leave it out for no role | |
| orgId | No | Workspace id from sirv_list_organizations. Default: the workspace you signed in to | |
| assetIds | Yes | Ids of the library assets to link, 1 to 100 | |
| productId | Yes | Product id, from sirv_list_products |