Skip to main content
Glama
Jacques-Murray

WooCommerce MCP Server

Update WooCommerce Coupon

woocommerce_update_coupon
Idempotent

Update an existing WooCommerce coupon's fields such as code, discount type, amount, expiry date, usage limits, and free shipping. Modify only supplied fields.

Instructions

Update fields on an existing coupon. Only supplied fields are changed.

Args:

  • coupon_id (number, required)

  • Any subset of: code, discount_type, amount, description, date_expires, usage_limit, usage_limit_per_user, free_shipping, minimum_amount, maximum_amount

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

Returns: The updated coupon object.

Examples:

  • Use when: "extend coupon 12's expiry to end of year" -> coupon_id=12, date_expires="2026-12-31"

Error Handling:

  • Returns "Error: Resource not found (404)" if coupon_id doesn't exist.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNo
amountNo
coupon_idYesThe numeric WooCommerce coupon ID to update
descriptionNo
usage_limitNo
date_expiresNoYYYY-MM-DD
discount_typeNo
free_shippingNo
maximum_amountNo
minimum_amountNo
response_formatNoOutput format: 'markdown' for human-readable text or 'json' for machine-readable structured datamarkdown
usage_limit_per_userNo
Behavior4/5

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

Description discloses mutation ('Update'), partial update ('Only supplied fields are changed'), and error handling (404). Annotations already indicate idempotent and non-destructive. The description adds value by specifying behavior beyond annotations.

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?

The description is moderately concise but includes a redundant Args list that largely duplicates the schema. Every sentence adds some value, but the structure could be tighter.

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 tool with 12 parameters and no output schema, the description covers mutation, partial updates, and error handling. However, it omits details about the return value structure and does not address edge cases like invalid field values.

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 only 25% (2 of 12 params have descriptions). The description lists parameter names but adds little semantic detail beyond the schema. The example connects coupon_id and date_expires, but overall does not compensate for low schema coverage.

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 action ('Update fields on an existing coupon') and specifies the resource ('coupon') and scope ('existing'). It distinguishes from sibling tools like create and delete by emphasizing update on an existing entity.

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?

The description provides an example and error handling notes, giving some usage context. However, it lacks explicit guidance on when not to use this tool (e.g., when to use create_coupon instead) or mention of prerequisites.

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