generate_commerce_variants
Generate every combination of a product's current options as variants (max 100).
Existing variants are matched by option combination and keep their id, SKU, price, and stock; missing combinations are added at the product's price.
Args: project_id: The project ID. product_id: The product ID.
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>"
},
"name": "generate_commerce_variants"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product_id | Yes | ||
| project_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |