Skip to main content
Glama

create-coupon

Create a new coupon with configurable discount type, amount or percentage, usage limits, expiry, and targeting by cart, package, category, or username.

Instructions

Create a new coupon with discount settings, usage limits, and targeting

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>",
      "effective_on": "<effective_on>",
      "discount_type": "<discount_type>"
    },
    "name": "create-coupon"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesCoupon code (e.g. 'SUMMER20')
noteNoInternal note about the coupon
minimumNoMinimum basket value for coupon to apply
packagesNoPackage IDs the coupon applies to (when effective_on is 'package')
usernameNoRestrict coupon to a specific username
categoriesNoCategory IDs the coupon applies to (when effective_on is 'category')
start_dateNoStart date (YYYY-MM-DD format)
basket_typeNoType of basket the coupon applies toboth
expire_dateNoExpiry date (YYYY-MM-DD format)
effective_onYesWhat the coupon applies to
expire_limitNoMaximum number of redemptions
expire_neverNoWhether the coupon never expires
discount_typeYesType of discount
discount_amountNoFixed discount amount (when discount_type is 'value')
redeem_unlimitedNoWhether the coupon can be used unlimited times
discount_percentageNoPercentage discount (when discount_type is 'percentage')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full behavioral burden for a 16-parameter mutation, yet says nothing beyond the fact that it creates. It does not disclose whether the code must be unique or what happens on a duplicate, permission/auth requirements, validation of the start/expire date pairing, or what the 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?

A single front-loaded sentence with no filler, and the core action comes first. It is efficient, though its brevity for a 16-parameter tool means it trades away useful detail rather than trimming waste.

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 16-parameter creation tool with zero annotations and no output schema, one sentence is not enough. Key operational facts such as uniqueness of code, required field interactions, and the shape of the result are left entirely to the schema or to guesswork.

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%, so each of the 16 parameters is already documented with types, enums, defaults, and conditional notes (e.g. discount_amount applies when discount_type is 'value'). The description's mention of discount settings, usage limits, and targeting loosely groups those fields but adds no syntax, constraints, or interdependencies beyond the schema, so the baseline 3 applies.

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 ('Create a new coupon') and enumerates the three capability groups it covers: discount settings, usage limits, and targeting. It is unambiguous against siblings like delete-coupon, get-coupon, and list-coupons purely by verb, but it never explicitly contrasts itself with them or with create-gift-card.

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, no stated prerequisites, and no mention of alternatives or when not to create a coupon. An agent must infer that this is the write-side counterpart to list-coupons/get-coupon from naming alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.