create_variation
Create a variation for a variable product by setting attributes, price, stock, and more. The parent product must be type 'variable' with matching attributes.
Instructions
Create a variation for a variable product. Parent product must have type='variable' with matching attributes. Use batch_update_variations for multiple at once.
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": {
"product_id": "<product_id>",
"attributes": "<attributes>"
},
"name": "create_variation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | SKU | |
| image | No | Variation image | |
| fields | No | Comma-separated fields to return in response | |
| status | No | Variation status | publish |
| weight | No | Weight | |
| attributes | Yes | Attribute values defining this variation | |
| product_id | Yes | Parent product ID | |
| sale_price | No | Sale price | |
| description | No | Variation description | |
| manage_stock | No | Enable stock management | |
| stock_status | No | Stock status | |
| regular_price | No | Regular price (MRP) | |
| stock_quantity | No | Stock quantity |