Skip to main content
Glama

discounts_coupon

Create a coupon code. Money is integer minor units (cents). Calling this changes nothing: it returns a preview of what would change and a confirmation link. Only the merchant, on that page, can make it happen.

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>",
      "kind": "<kind>",
      "value": "<value>"
    },
    "name": "discounts_coupon"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesWhat the shopper types at checkout.
kindYes
nameNoWhat the order line calls it. Defaults to the code.
valueYesBasis points for percentage (20% is 2000), minor units (cents) for fixed.
endsAtNoISO 8601. Omit to run until turned off.
startsAtNoISO 8601. Omit to start immediately.
usageLimitNoTotal redemptions across everyone.
minSubtotalNoMinor units. Basket must reach this before the code applies.
freeShippingNoDelivery is free when the code applies.
onlyCategoriesNoCategory names: the code takes money off these only.
exceptCategoriesNoCategory names the code never touches (items already reduced, gift sets).
perCustomerLimitNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / exceptCategories
      Added value: +{
      +  "description": "Category names the code never touches (items already reduced, gift sets).",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / onlyCategories
      Added value: +{
      +  "description": "Category names: the code takes money off these only.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, but the description adds the crucial non-obvious behavior: the call creates no coupon, only a preview and a confirmation link that the merchant must act on. There is mild tension with readOnlyHint=false, but the description's explanation (a preview object is produced) resolves it rather than contradicting it. It does not address idempotency or whether repeated calls create multiple pending previews.

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?

Four short sentences, front-loaded with the verb and resource, then the unit convention, then the critical preview caveat. Every sentence carries information, though the money-units sentence partially duplicates schema descriptions.

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 12-parameter creation tool with no output schema, the description covers the essential unknowns: that nothing is actually created, what is returned (preview and confirmation link), and the unit conventions for monetary fields. It stops short of describing preview payload structure or failure cases such as duplicate codes.

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 coverage is 83%, so most parameters are already documented, including the basis-points and cents conventions for value. The description's "Money is integer minor units (cents)" is a useful global restatement but adds no per-parameter meaning, and the one undocumented parameter (perCustomerLimit) is not covered.

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 first sentence names a specific verb and resource ("Create a coupon code"), and the rest of the description makes clear it is a two-phase create rather than an immediate mutation. It does not explicitly distinguish itself from sibling tools such as discounts_coupon_categories, but the purpose is unambiguous on its own.

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 gives clear operating context: invoking it produces only a preview plus a confirmation link, and "Only the merchant, on that page, can make it happen" tells the agent the action cannot be completed through the tool itself. It does not name alternatives or exclusion conditions, which keeps it below a 5.

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.