Set product variants
set_product_variantsDefine or replace a product's full variant set, including selections, SKU, price, stock, and volume tiers; omitted variants are deleted.
Instructions
Define a product's variants. Each variant is one combination of values for the model's variantAxes (set those with update_model) and carries its own price, stock, SKU and volume breaks. The call replaces the whole set, so send every variant the product keeps - a variant left out is deleted. Every field but tiers and currencyPrices is written as sent (those two are kept when omitted), so copy sku and stock (onHand) from list_products for each variant you keep; both are required, null for none. Stock already reserved by carts stays with the variant that keeps its selection. Prices are minor units: price and tiers in the default currency, currencyPrices in each additional currency (omitted = kept, like tiers). To change only prices per currency use set_product_currency_prices variants instead - it never touches stock or SKU.
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": {
"recordId": "<recordId>",
"variants": "<variants>"
},
"name": "set_product_variants"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| recordId | Yes | Product record id | |
| variants | Yes | The product's whole variant set, at most 500. It replaces what is stored; [] removes every variant. |