Skip to main content
Glama

wp_woocommerce_create_coupon

Create WooCommerce coupons with discount rules, including amount, type, expiry, product restrictions, usage limits, and free shipping.

Instructions

Create a new WooCommerce coupon with discount rules.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesCoupon code (e.g. "SUMMER2024")
amountYesDiscount amount (percentage or fixed amount)
expiry_dateNoExpiry date (YYYY-MM-DD)
product_idsNoRestrict to specific product IDs
usage_limitNoMaximum number of times this coupon can be used
discount_typeNo"percent" (default), "fixed_cart", or "fixed_product"
free_shippingNoGrant free shipping (default: false)
individual_useNoCannot be combined with other coupons
maximum_amountNoMaximum cart total allowed
minimum_amountNoMinimum cart total required
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral disclosure burden. It communicates that this is a create/write operation, but it does not mention permissions, duplicate-code behavior, whether the operation persists immediately, or what response/return value the agent should expect. For a mutation tool with no annotation coverage, this is a meaningful gap.

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 a single sentence with no filler or redundancy. It front-loads the action and resource immediately, making the tool's purpose quickly scannable. It earns every word.

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?

Although the schema is rich and covers parameters, there is no output schema and no annotation context. The description does not mention return behavior, required-field expectations beyond the schema, default behaviors, or constraints such as uniqueness of the coupon code. For a 10-parameter create tool, the description alone is not enough for an agent to invoke it with full confidence.

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%, with each parameter already explaining its meaning (e.g., 'discount_type', 'usage_limit', 'expiry_date'). The description adds only the generic phrase 'with discount rules' and no parameter-specific detail beyond the schema. The baseline of 3 applies because the schema handles parameter documentation well.

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 states a specific verb ('Create'), a clear resource ('a new WooCommerce coupon'), and the domain ('discount rules'). This is immediately distinguishable from sibling tools like wp_woocommerce_list_coupons and wp_woocommerce_create_tax_rate, so an agent can identify this as the coupon creation tool.

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 implies usage: it is the tool to call when creating a new WooCommerce coupon. However, it provides no explicit when/when-not guidance or references to alternatives, such as when to use wp_woocommerce_list_coupons instead. Usage context is present only by implication.

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/THE-KIPDEV/wpagent-mcp'

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