Skip to main content
Glama
AmitGurbani

mcp-server-woocommerce

by AmitGurbani

update_coupon

Idempotent

Update a coupon's code, amount, restrictions, or expiry. Modify only the fields you want to change, keeping other settings intact.

Instructions

Update a coupon's code, amount, restrictions, or expiry. Only include fields you want to change. Use fields param to request only needed fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesCoupon ID
codeNoCoupon code
amountNoDiscount amount
fieldsNoComma-separated fields to return in response
product_idsNoProduct IDs this coupon applies to
usage_limitNoTotal usage limit
date_expiresNoExpiry date (ISO 8601)
discount_typeNoDiscount type
free_shippingNoGrants free shipping
individual_useNoCannot be combined with other coupons
maximum_amountNoMaximum order amount
minimum_amountNoMinimum order amount
excluded_product_idsNoProduct IDs excluded from this coupon
usage_limit_per_userNoUsage limit per user
Behavior4/5

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

Annotations already provide idempotentHint=true, and the description adds meaningful context about partial update behavior ('Only include fields you want to change'), which informs the agent that unspecified fields are preserved. It doesn't cover auth or error handling, but the key behavioral trait is disclosed 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 two short sentences with no filler. It front-loads the purpose and immediately provides actionable usage guidance, making every word valuable.

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?

For a 14-parameter update tool with full schema coverage and no output schema, the description effectively conveys update semantics and response control. It omits the requirement for 'id' (though present in schema) but is otherwise complete for typical usage.

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 coverage is 100%, so the baseline is 3. The description lists general fields ('code, amount, restrictions, or expiry') but adds no detail beyond what the schema already documents. The 'fields' parameter is mentioned, but its semantics are clear from the schema description.

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 'Update a coupon's code, amount, restrictions, or expiry' with a specific verb and resource. It distinguishes from siblings like create_coupon, get_coupon, and delete_coupon by explicitly targeting updates to specific coupon 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 clear usage context: 'Only include fields you want to change' signals partial update semantics, and 'Use fields param to request only needed fields' explains response filtering. It doesn't explicitly mention alternatives (e.g., create_coupon for new coupons), but for an update tool the usage is implied by the action.

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

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