Skip to main content
Glama

woo_create_coupon

Create WooCommerce coupons with specific codes, discount types, amounts, expiration dates, usage limits, and product restrictions. Provide site ID and coupon parameters to apply discounts.

Instructions

Create a coupon

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesCoupon code
siteYesSite id (see list_sites)
amountNo0
product_idsNo
usage_limitNo
date_expiresNoExpiry date (YYYY-MM-DD)
discount_typeNofixed_cart
free_shippingNo
individual_useNo
maximum_amountNo
minimum_amountNo
excluded_product_idsNo
usage_limit_per_userNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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: -[
      -  "code"
      -]New value: +[
      +  "site",
      +  "code"
      +]
  2. First observedv2.0.0

TDQS

C2.3/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full behavioral burden. It only implies a write operation via 'Create'; it does not disclose required permissions, duplicate-code handling, side effects, or what happens on invalid input.

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

Conciseness2/5

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

The single sentence is front-loaded and wastes no words, but for a 13-parameter mutation tool it is severely under-specified rather than appropriately concise.

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

Completeness1/5

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

Given high complexity (13 parameters, 2 required, no annotations, no output schema), the description is completely inadequate. It omits usage context, parameter guidance, behavioral traits, and return expectations.

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

Parameters1/5

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

With 13 parameters and only 23% schema description coverage, the description adds no parameter meaning at all. It does not mention required fields (site, code), discount_type enum values, expiry format, or any other parameter semantics needed to invoke the tool correctly.

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?

The description states a clear verb and resource: create a coupon. This distinguishes it from siblings such as woo_list_coupons, woo_get_coupon, woo_update_coupon, and woo_delete_coupon, though it does not explicitly name or compare against them.

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?

There is no guidance on when to use this tool versus alternatives, no prerequisites, and no exclusions. The agent must infer that this is the create path from the name alone.

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