Skip to main content
Glama

WooCommerce: Update coupon

woocommerce_update_coupon
Destructive

Update an existing WooCommerce coupon to change discount amount, restrictions, usage limits, or expiration date.

Instructions

[UNIFIED] Update an existing WooCommerce coupon. Can update discount amount, restrictions, and expiration.

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>",
      "coupon_id": "<coupon_id>"
    },
    "name": "woocommerce_update_coupon"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNo
siteYes
amountNo
coupon_idYes
descriptionNo
product_idsNo
usage_limitNo
date_expiresNo
discount_typeNo
free_shippingNo
individual_useNo
maximum_amountNo
minimum_amountNo
excluded_product_idsNo
usage_limit_per_userNo
limit_usage_to_x_itemsNo

Schema Changelog

Changes observed during successful MCP inspections.

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

TDQS

C2.7/5.0
Behavior2/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=false, so the safety profile is covered. Beyond that the description adds almost nothing: with 16 optional fields all defaulting to null, the critical question of whether an omitted/null field means 'leave unchanged' or 'clear the value' is unaddressed, as is whether code changes are allowed while a coupon is in use.

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

Conciseness3/5

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

Two short sentences, front-loaded and free of filler, so nothing is wasted. However the brevity is achieved by omission rather than compression — the text is too thin for a 16-parameter mutation to be actionable.

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?

Under-specified for a destructive 16-parameter write operation with 0% schema documentation and no output schema. An agent knows what the tool is for but not how its parameters behave or what the update semantics are, leaving a substantial gap.

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 16 parameters, so the description must carry the burden. It only gestures at three broad areas (amount, restrictions, expiration) and explains none of the actual parameters — no format for date_expires, no meaning of discount_type or free_shipping, no note that site and coupon_id are required.

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 an existing WooCommerce coupon') and names the categories of fields it can change (discount amount, restrictions, expiration). It is clearly distinguishable from create/delete coupon by naming, but the description itself never explicitly contrasts with those siblings.

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

Usage Guidelines2/5

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

No guidance on when to use this versus woocommerce_create_coupon or woocommerce_delete_coupon, and no mention of the preconditions for editing (e.g. coupon must already exist, needs coupon_id). The agent must infer the entire use case from the tool name.

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