Skip to main content
Glama

Create Coupon

woo_create_coupon

Create a new WooCommerce coupon. Supports percentage, fixed cart, and fixed product discounts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesCoupon code (e.g. "SAVE20", "FREESHIP")
amountYesDiscount amount (percentage or fixed amount)
site_idNoSite ID to target (optional if you have only one connected site)
descriptionNoCoupon description (internal use)
product_idsNoLimit to specific product IDs
usage_limitNoTotal usage limit (null = unlimited)
date_expiresNoExpiry date (ISO 8601, e.g. "2025-12-31")
discount_typeYesType of discount
free_shippingNoIf true, grants free shipping
individual_useNoIf true, cannot be used with other coupons
maximum_amountNoMaximum order amount allowed
minimum_amountNoMinimum order amount required
email_restrictionsNoLimit to specific customer emails
product_categoriesNoLimit to specific category IDs
excluded_product_idsNoExclude specific product IDs
usage_limit_per_userNoUsage limit per customer
excluded_product_categoriesNoExclude specific category IDs

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, openWorldHint=true and destructiveHint=false, so the mutation/write nature is covered. The description adds nothing beyond that: no mention of duplicate-code failure behavior, permission scoping, or side effects. Its second sentence merely restates the discount_type enum already present in the schema.

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

Conciseness4/5

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

Two short, front-loaded sentences with no padding. The second sentence is somewhat redundant with the discount_type enum, which slightly dilutes the value of the length rather than wasting space.

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?

For a 17-parameter mutation tool with no output schema, this is very thin. It never explains how the required trio (code, discount_type, amount) interact, that amount semantics change with discount_type, or which optional fields are commonly paired, leaving the agent to reconstruct behavior from the schema alone.

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% across all 17 parameters, so the schema already documents every field. The description adds no interpretation beyond the schema, which is the baseline 3 under these conditions.

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 specific verb and resource: "Create a new WooCommerce coupon." The word "new" implicitly separates it from woo_update_coupon, woo_get_coupon and woo_list_coupons, but no sibling is named explicitly, so it falls just short of the top band.

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 when-to-use or when-not-to-use guidance, no prerequisites (e.g. that a code must be unique, or that site_id is optional for single-site installs), and no pointer to the update alternative for existin coupons. Usage is only inferable 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources