update_commerce_variant
Update one variant. Sibling variants are untouched.
option_values cannot be changed — delete the variant and add the new combination instead.
Args: project_id: The project ID. product_id: The product ID. variant_id: The variant ID (from list_commerce_variants). sku: New SKU. price_amount: New price in the smallest currency unit. Leave -1 to keep current. compare_at_amount: New struck-through price. Leave -1 to keep current. currency: New ISO currency code. image_url: New variant image URL. weight_grams: New shipping weight in grams. Leave -1 to keep current. inventory_policy: deny or continue. inventory_quantity: New stock level. Leave -1 to keep current.
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": {
"project_id": "<project_id>",
"product_id": "<product_id>",
"variant_id": "<variant_id>"
},
"name": "update_commerce_variant"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | ||
| currency | No | ||
| image_url | No | ||
| product_id | Yes | ||
| project_id | Yes | ||
| variant_id | Yes | ||
| price_amount | No | ||
| weight_grams | No | ||
| inventory_policy | No | ||
| compare_at_amount | No | ||
| inventory_quantity | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |