Skip to main content
Glama

woo_update_variation

Updates selected fields of an existing WooCommerce product variation without altering unspecified values, enabling targeted changes to price, stock, SKU, or attributes.

Instructions

Update a product variation; only the given fields change

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>",
      "variation_id": "<variation_id>"
    },
    "name": "woo_update_variation"
  }
}

Input Schema

NameRequiredDescriptionDefault
skuNoSKU (must be unique)
siteYesSite id (see list_sites)
attributesNoAttribute map, e.g. {"pa_color": "red", "size": "XL"} (key: attribute taxonomy or custom attribute name; value: term slug or option; "" = any)
product_idYesParent product ID
sale_priceNoSale price as decimal string ("" removes it)
manage_stockNoTrack stock quantity
stock_statusNoStock status
variation_idYesVariation ID
regular_priceNoRegular price as decimal string
stock_quantityNoStock quantity

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv3.14.0
    • addedInput schema / properties / attributes / additionalProperties
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / attributes / description
      Added value: +"Attribute map, e.g. {\"pa_color\": \"red\", \"size\": \"XL\"} (key: attribute taxonomy or custom attribute name; value: term slug or option; \"\" = any)"
    • removedInput schema / properties / attributes / items
      Removed value: -{
      -  "additionalProperties": {
      -    "type": "string"
      -  },
      -  "type": "object"
      -}
    • changedInput schema / properties / attributes / type
      Previous value: -"array"New value: +"object"
    • addedInput schema / properties / manage_stock / description
      Added value: +"Track stock quantity"
    • changedInput schema / properties / product_id / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / regular_price / description
      Added value: +"Regular price as decimal string"
    • addedInput schema / properties / sale_price / description
      Added value: +"Sale price as decimal string (\"\" removes it)"
    • addedInput schema / properties / sku / description
      Added value: +"SKU (must be unique)"
    • addedInput schema / properties / stock_quantity / description
      Added value: +"Stock quantity"
    • changedInput schema / properties / stock_quantity / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / stock_status / description
      Added value: +"Stock status"
    • addedInput schema / properties / stock_status / enum
      Added value: +[
      +  "instock",
      +  "outofstock",
      +  "onbackorder"
      +]
    • changedInput schema / properties / variation_id / type
      Previous value: -"number"New value: +"integer"
  2. Changed2 schema fields changedv3.4.0
    • addedInput schema / properties / site
      Added value: +{
      +  "description": "Site id (see list_sites)",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "product_id",
      -  "variation_id"
      -]New value: +[
      +  "site",
      +  "product_id",
      +  "variation_id"
      +]
  3. First observedv2.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden, and it does disclose the important patch semantics that unspecified fields are left untouched. It omits other mutation-relevant behavior: required permissions, side effects between manage_stock/stock_status/stock_quantity, and whether failures roll back. Useful but incomplete for a write operation.

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?

A single short sentence with the action front-loaded and the partial-update constraint second. No filler, no redundancy.

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

Completeness3/5

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

For a 10-parameter nested mutation with no annotations and no output schema, the description covers the highest-risk semantic (partial update) but says nothing about permissions, return values, or validation failure behavior. The fully documented schema offsets much of the gap, keeping this at an adequate level rather than a strong one.

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

Parameters3/5

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

Schema description coverage is 100%, so every one of the 10 parameters (including the nested attributes map and the enum-constrained stock_status) is already documented in the schema. The description adds no parameter-level detail beyond that, which matches the baseline of 3.

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?

States a specific verb and resource ('Update a product variation'), which is unambiguous and clearly distinct from create/delete siblings by verb alone. It does not, however, explicitly differentiate itself from adjacent update tools such as woo_update_product or woo_bulk_update_stock.

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?

There is no explicit when-to-use/when-not-to-use guidance or prerequisite note. The clause 'only the given fields change' implicitly signals this is the right tool for partial edits rather than full replacement, but the agent must infer that.

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