Skip to main content
Glama
AmitGurbani

mcp-server-woocommerce

by AmitGurbani

create_coupon

Create discount coupons with unique codes, supporting percent, fixed cart, and fixed product discounts. Set usage limits, expiry, and product restrictions.

Instructions

Create a discount coupon. Code must be unique. Supports percent, fixed cart, and fixed product discount types. Use fields param to request only needed fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesCoupon 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 typepercent
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
Behavior3/5

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

With annotations limited to openWorldHint: false, the description carries the main behavioral disclosure. It adds useful constraints (unique code, supported discount types) but does not cover potential side effects, auth requirements, or error behavior. The create verb implies mutation, but no further safety or irreversible-action context is given.

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?

Three short, purposeful sentences. The first states the action, the second adds a key constraint, and the third gives a performance tip. No filler or redundancy.

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 13-parameter create tool with no output schema, the description is somewhat minimal. It does not explicitly describe the return value (though fields param implies object retrieval) or permissions/error cases. However, the schema covers all parameter semantics, and the openWorldHint provides some closure. It's adequate but leaves gaps.

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

Parameters4/5

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

Schema coverage is 100%, so parameters are already documented. The description adds meaning to 'code' by stating it must be unique, and to 'fields' by advising to request only needed fields. It also reinforces the discount_type enum values. This goes slightly beyond the schema's baseline.

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 opens with 'Create a discount coupon,' a specific verb and resource. It further distinguishes the tool by listing supported discount types (percent, fixed cart, fixed product) and a unique-code constraint, clearly separating it from sibling tools like update_coupon or list_coupons.

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 clearly indicates this is the tool for creating coupons ('Create a discount coupon') and adds practical usage advice ('Use fields param to request only needed fields'). However, it does not explicitly mention alternatives or when not to use it, such as pointing to update_coupon for existing coupons.

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