woo_create_variation
Create a product variation for a variable WooCommerce product using an attribute map plus optional SKU, pricing, and stock settings.
Instructions
Create a variation of a variable product. Note: wp-pilot-pro 1.1.0 declares attributes as a list and rejects this map with 400 until the plugin declares it as an object
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": "<site>",
"product_id": "<product_id>",
"attributes": "<attributes>"
},
"name": "woo_create_variation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | SKU (must be unique) | |
| site | Yes | Site id (see list_sites) | |
| attributes | Yes | Attribute map, e.g. {"pa_color": "red", "size": "XL"} (key: attribute taxonomy or custom attribute name; value: term slug or option; "" = any) | |
| product_id | Yes | Parent product ID | |
| sale_price | No | Sale price as decimal string | |
| manage_stock | No | Track stock quantity (default false) | |
| stock_status | No | Stock status (default instock) | |
| regular_price | No | Regular price as decimal string | |
| stock_quantity | No | Stock quantity |