Skip to main content
Glama

Store Manager for WooCommerce

AddSynapse: draft a coupon

plan_coupon

AddSynapse: Prepare a DRAFT that creates a coupon (when the code does not exist yet) or changes the given fields of an existing one: percent or fixed amount, expiry date, usage limits, minimum spend, product/category restrictions. Changes nothing by itself. A preview card with the draft and an Approve button appears in the chat; nothing changes on the site until the user presses Approve there (or on the AddSynapse Changes page when the card has no Approve button). Undo deletes a coupon it created or restores the previous fields. For safety, a coupon above 50% off, a fixed discount above 50, free shipping without a usage limit, or a coupon with neither a usage limit nor an expiry date is approved only in the site's wp-admin (the card links there), never in the chat — so suggest an expiry date or a usage limit.

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": {
      "code": "<code>"
    },
    "name": "plan_coupon"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes
siteNoWhich connected site: its address or site_id from addsynapse_list_sites. Omit when the account has only one site.
amountNo
categoriesNocategory names or ids the coupon is limited to
descriptionNo
product_idsNo
usage_limitNo
date_expiresNoYYYY-MM-DD (last valid day) or null = never
discount_typeNo
free_shippingNo
individual_useNo
maximum_amountNo
minimum_amountNo
excluded_categoriesNo
excluded_product_idsNo
usage_limit_per_userNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false, destructiveHint=false, idempotentHint=false; the description goes far beyond by explaining that nothing is written to the site until an approval, where approval happens (preview card, Approve button, or the Changes page when no button exists), and that Undo either deletes a created coupon or restores prior fields. It also discloses an unusual guardrail — high-discount/free-shipping/no-limit coupons can only be approved in wp-admin, never in chat — which an agent could not infer from any structured field.

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?

Purpose and the draft/approve contract are front-loaded, and the long safety sentence carries genuinely non-obvious information rather than filler. It is dense and slightly overpacked in the final clause, but no sentence is redundant.

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

Completeness4/5

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

For a 16-parameter mutation with no output schema, the definition covers the lifecycle (draft → approval → undo), the site-vs-chat approval split, and the safety thresholds that will block a request. The remaining gap is what the agent gets back from the call and how the code parameter is used for create-vs-update, but the operational picture is otherwise complete.

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?

With only 19% schema coverage across 16 parameters, the description does useful mapping work: 'percent or fixed amount' (discount_type/amount), 'expiry date' (date_expires), 'usage limits' (usage_limit, usage_limit_per_user), 'minimum spend' (minimum_amount), and product/category restrictions including the free-shipping condition. However it leaves several parameters unexplained — site selection, maximum_amount, individual_use, description — and the required 'code' parameter is only alluded to obliquely, so it does not fully compensate for the coverage gap.

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 a specific verb and resource — 'Prepare a DRAFT that creates a coupon ... or changes the given fields of an existing one' — and enumerates the editable fields (percent/fixed amount, expiry, usage limits, minimum spend, restrictions). An agent can distinguish this from the read-only sibling get_coupon without opening either schema.

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?

It gives a clear selection rule between create and update ('when the code does not exist yet' vs. an existing one) and adds a concrete steering hint for the safety path ('suggest an expiry date or a usage limit'). It never explicitly names get_coupon as the read alternative, so the routing guidance is strong but not complete.

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