Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
product_urlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully describes the return format (list of variation objects with specific fields) and edge case behavior (returns empty list for simple products). It does not mention authentication needs or error handling, but the core behavioral traits are well covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with no wasted words. It uses clear section headers (Args, Returns) and front-loads the purpose and usage context. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists and annotations are missing, the description provides a thorough explanation of the return values and their structure. It covers the tool's usage context, input source, and behavior for both variable and simple products, making it complete for this tool's needs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It explains the product_url parameter as 'Full product page URL (from search_products result["url"])', adding significant meaning beyond the schema's basic property definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns available variants for a variable WooCommerce product, with a specific verb ('Return') and resource ('available variants'). It distinguishes itself from sibling tools by indicating it should be called after search_products.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool ('when search_products returns a product and you need to know which size/weight options exist before adding it to the cart'). It also provides context on the input (product_url from search_products result). It lacks explicit when-not or alternatives, but the context is clear and sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Yann-J/tuma250_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server