get_product_variations
Retrieve available size, weight, or quantity variants for a variable product. Provides variation IDs, attributes, prices, and stock status to use when adding to cart.
Instructions
Return the available variants for a variable WooCommerce product.
Call this when search_products returns a product and you need to know which size/weight options exist before adding it to the cart.
Args: product_url: Full product page URL (from search_products result["url"]).
Returns: list of variation objects, each containing: - variation_id (str): Pass this to add_to_cart. - attributes (dict): Human-readable attributes, e.g. {"quantity": "500g"}. - raw_attributes (dict): WooCommerce attribute keys, e.g. {"attribute_quantity": "500g"}. - price (float | None): Price for this variant. - in_stock (bool): Whether this variant is currently available. Returns an empty list for simple (non-variable) products.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product_url | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |