Skip to main content
Glama

WooCommerce: Create product variation

woocommerce_create_product_variation

Create a new variation for a variable product by defining attribute combinations with separate pricing and inventory settings.

Instructions

[UNIFIED] Create a new variation for a variable product. Defines a specific combination of attributes with its own pricing and inventory.

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": {
      "site": "<site>",
      "product_id": "<product_id>",
      "attributes": "<attributes>"
    },
    "name": "woocommerce_create_product_variation"
  }
}

Input Schema

NameRequiredDescriptionDefault
skuNo
siteYes
imageNo
attributesYes
product_idYes
sale_priceNo
descriptionNo
manage_stockNo
stock_statusNoinstock
regular_priceNo
stock_quantityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0
  2. Removedv3.13.1
  3. First observedv3.4.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false and destructiveHint=false, so the safety profile is covered, but the description adds essentially no behavioral context beyond them. It does not say what happens on duplicate attributes, whether stock fields interact (stock_quantity vs manage_stock vs stock_status), what errors occur if the parent is not variable, or anything about authentication or rate limits.

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

Conciseness4/5

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

Two sentences, front-loaded with the action and resource, with no filler or repetition. The second sentence earns its place by clarifying what a variation represents, though it is close to being definitional padding.

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

Completeness2/5

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

This is a mutation tool with 11 parameters at 0% schema coverage and no output schema, which requires a much richer description than two sentences. An agent has no guidance on the attributes array shape, which fields are optional versus meaningful for stock management, or what the call returns, so it is under-specified for the tool's complexity.

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

Parameters2/5

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

Schema description coverage is 0% across 11 parameters, so the description must compensate and largely fails to. "Own pricing and inventory" loosely gestures at regular_price/sale_price/stock_quantity/manage_stock/stock_status, but site, product_id, sku, image, description and the structure of the attributes array are left entirely undocumented.

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

Purpose4/5

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

The description states a specific verb and resource ("Create a new variation for a variable product") and adds a definition of what a variation is (an attribute combination with its own pricing and inventory), which distinguishes it from woocommerce_create_product. It stops short of naming the sibling it is not, but the parent-product scoping makes the distinction inferable.

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

Usage Guidelines3/5

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

Usage is only implied: the phrase "for a variable product" tells the agent the parent must be a variable product, but there is no explicit when-to-use guidance, no direction to woocommerce_update_product_variation for existing variations, and no mention of prerequisites such as the product already existing or attributes needing to be defined.

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

Deploy Server

Other Tools