Skip to main content
Glama
Jacques-Murray

WooCommerce MCP Server

Create WooCommerce Product Variation

woocommerce_create_product_variation

Create a new variation for an existing variable product by specifying attribute combinations like size and color, along with optional pricing and stock details.

Instructions

Create a new variation for an existing variable product. The parent product must already have variation-enabled attributes defined (e.g. Size, Color).

Args:

  • product_id (number, required): parent variable product ID

  • attributes (array, required): [{name, option}] matching the parent's variation attributes

  • sku, regular_price, sale_price, manage_stock, stock_quantity, stock_status (optional)

  • response_format ('markdown'|'json'): default 'markdown'

Returns: The newly created variation object.

Examples:

  • Use when: "add a Large/Blue variation at $30" -> attributes=[{name:"Size",option:"Large"},{name:"Color",option:"Blue"}], regular_price="30.00"

Error Handling:

  • Returns "Error: Bad request (400)" if the attribute name/option doesn't match the parent product's defined attributes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skuNo
attributesYesThe attribute/option combination that defines this variation
product_idYesThe parent variable product's numeric ID
sale_priceNoSale price as numeric string
manage_stockNo
stock_statusNo
regular_priceNoRegular price as numeric string
stock_quantityNo
response_formatNoOutput format: 'markdown' for human-readable text or 'json' for machine-readable structured datamarkdown
Behavior4/5

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

Annotations already indicate write operation and non-idempotency. The description adds the prerequisite about parent attributes and specific error handling for attribute mismatches, which goes beyond the annotations.

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, well-structured with sections for args, returns, examples, and error handling. Every sentence adds value without redundancy.

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

Completeness4/5

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

Given the complexity and lack of output schema, the description covers the main purpose, prerequisites, and error cases. It could mention potential duplicate creation, but overall it is sufficient for agent decision-making.

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?

With 56% schema coverage, the description compensates by listing all optional parameters and providing a clear example of the required 'attributes' array. It explains the structure but could detail more default behaviors.

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 creates a new variation for an existing variable product, using specific verbs and resource. It distinguishes itself from sibling tools like update or delete variations through its verb and prerequisite of parent product attributes.

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 provides a concrete 'Use when' example and clarifies the prerequisite of having variation-enabled attributes. It lacks explicit when-not instructions but the example and context sufficiently guide usage.

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/Jacques-Murray/woocommerce-mcp-server'

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