Skip to main content
Glama

createCoupon

Create a discount coupon in a location. Returns the created coupon. Provide either percentOff (with enabledForCredits) or amountOff, never both; amountOff is in the location currency. A coupon for subscriptionItems requires duration, and durationInMonths when duration is "repeating". Members redeem a coupon through its promocodes: create one with createPromocode. Call getLocations to list locations, or getLocation to fetch one by locationId. Get limitedItems ids from the same location: getResources for bookings, getEvents for eventTickets, getProducts for shopProducts, getPackages for packages, and getPlans for subscriptionItems. An id the location does not have is dropped, so check limitedItems in the result. Never invent UUIDs; only use values from prior tool responses.

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": {
      "coupon": "<coupon>"
    },
    "name": "createCoupon"
  }
}

Input Schema

NameRequiredDescriptionDefault
couponYesCoupon to create.

Output Schema

NameRequiredDescriptionDefault
couponYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, destructiveHint=false, and openWorldHint=false, so the description carries most of the burden and does add real behavior: invalid limitedItems ids are silently dropped, so the caller must re-check limitedItems in the result, and UUIDs must never be invented. It does not mention permission/auth requirements or what happens on validation failure, which keeps it below a 5 for a mutation tool.

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?

The purpose and return are front-loaded, then constraints, then id sourcing, then the safety warning about UUIDs, so each sentence carries distinct information. The enumeration of five sibling lookups is dense and unstyled, which costs a little readability but nothing is redundant.

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

Completeness5/5

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

For a nested-object creation tool with an output schema already documenting the response, the description covers what structured fields cannot: conditional requirements, mutual exclusivity, currency units, id provenance, and the silent-failure behavior to verify afterward. An agent has enough to call this correctly on the first attempt.

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 the baseline is 3, but the description adds cross-field constraints the schema cannot express: percentOff pairs with enabledForCredits, amountOff is exclusive of percentOff and denominated in the location currency, and durationInMonths is required only when duration is "repeating". The only gap is the limitedItems.enabled versus productTypes interplay, which is left implicit.

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?

"Create a discount coupon in a location. Returns the created coupon." gives a specific verb, resource, scope, and return, which cleanly separates it from updateCoupon, deleteCoupon, getCoupon, and createPromocode. An agent can select this tool without opening any sibling schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly routes precondition and follow-up work to named alternatives: createPromocode for redemption codes, getLocations/getLocation for the locationRef, and getResources/getEvents/getProducts/getPackages/getPlans for limited-item ids by product type. The conditional rule ("A coupon for subscriptionItems requires duration") makes it clear when the tool is applicable at all.

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