Skip to main content
Glama

Frontman for WordPress

wc_create_coupon

Destructive

Creates a WooCommerce coupon. Mirrors woocommerce-mcp-server method create_coupon using local WordPress authentication; no WooCommerce REST API keys are required.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site_id": "<site_id>",
      "couponData": "<couponData>"
    },
    "name": "wc_create_coupon"
  }
}

Input Schema

NameRequiredDescriptionDefault
site_idYesThe connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID.
couponDataYesCoupon fields to create.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and openWorldHint=true, so the safety profile is covered. The description adds genuinely useful context beyond them: it uses local WordPress authentication and needs no WooCommerce REST API keys, which tells the agent no separate credentials must be configured. It does not disclose duplicate-code behavior, what is destroyed/overwritten, or what a successful call returns.

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 tight, front-loaded sentences with the purpose first and the auth note second; nothing is padded. The reference to the upstream server method `create_coupon` is slightly inward-facing but does confirm behavioral parity, so it still earns its place.

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 destructive, non-idempotent create with a nested, unconstrained payload and no output schema, the definition is only minimally sufficient. It never indicates what the response contains (e.g., the created coupon id) or which coupon fields the nested object expects, which an agent needs to call this correctly.

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 nominally 100% and site_id is well documented in the schema (including 'call list_sites first'), so the baseline of 3 applies. However, couponData is a free-form object with no declared properties and additionalProperties=true, and the description adds no field names (code, amount, discount_type) that would help the agent populate it.

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?

States a specific verb and resource ('Creates a WooCommerce coupon'), which clearly separates it from wc_update_coupon, wc_get_coupon and wc_delete_coupon. It does not explicitly name or contrast a sibling, but the create verb is unambiguous.

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 guidance: nothing about prerequisites (an existing coupon code, a connected site, required capability), when to prefer wc_update_coupon instead, or what to do if the code already exists. The only implied usage comes from the verb 'Creates'.

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.