Get WooCommerce Product Variation
woocommerce_get_product_variationRetrieve complete details of a product variation by providing its parent product ID and variation ID. Get attributes, pricing, stock, and more in markdown or JSON format.
Instructions
Retrieve full details for a single product variation.
Args:
product_id (number, required): parent product ID
variation_id (number, required): variation ID
response_format ('markdown'|'json'): default 'markdown'
Returns: Full variation object including attributes, pricing, and stock.
Error Handling:
Returns "Error: Resource not found (404)" if either ID is wrong or the variation doesn't belong to that product.
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>",
"variation_id": "<variation_id>"
},
"name": "woocommerce_get_product_variation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product_id | Yes | The parent variable product's numeric ID | |
| variation_id | Yes | The variation's numeric ID | |
| response_format | No | Output format: 'markdown' for human-readable text or 'json' for machine-readable structured data | markdown |