Skip to main content
Glama

update_coupon

Destructive

Update an existing coupon in your Checkout Page account.

Only the fields you supply are changed; omitted fields are left as-is. Send null for maxRedemptions or redeemBy to remove that limit. pageIds and ticketTypeIds are replaced wholesale rather than merged - send the full list you want, or an empty array to clear it.

What cannot be changed: the discount itself. code, amountOff, percentOff, currency, duration, and durationInMonths are fixed once a coupon exists, because they are mirrored into Stripe. To change a discount, soft delete this coupon (deleted: true) and create a replacement with create_coupon.

Coupons created before 2025-10-04 cannot be updated at all — their redemption limits are synced with Stripe and the API returns a 400 saying so.

Ticket types are scoped through pages, so any ticketTypeIds must belong to the pageIds sent in the same request — or, when pageIds is omitted, to the pages already on the coupon.

This tool modifies live data. Every change applies to live checkouts at once. There is no undo, because the previous values are not kept. Setting deleted: true stops the coupon working at checkout immediately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNoInternal name for the coupon.
deletedNoSet true to soft delete the coupon. It stops working at checkout but its data and redemption history are retained.
pageIdsNoThe pages this coupon can be used on. Replaces the existing list. An empty array clears it, making the coupon valid everywhere.
couponIdYesThe ID of the coupon to update. Use `list_coupons` first if you need to discover the coupon ID by code or label.
redeemByNoThe ISO datetime that this coupon must be used before. Send `null` to remove the expiry.
ticketTypeIdsNoThe ticket types this coupon can be used with. Replaces the existing list; an empty array clears it. Every ID must belong to a page in `pageIds` — or, when `pageIds` is omitted, to the pages already on the coupon.
maxRedemptionsNoThe total number of times this coupon can be redeemed across all customers. Doesn't limit a single customer from redeeming multiple times. Send `null` to remove the limit.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

With annotations already declaring destructiveHint=true and readOnlyHint=false, the description goes further by disclosing live-data impact, no undo because previous values are not kept, immediate effect of deleted:true, partial-update semantics, immutable fields, and the 400 error for old coupons. This is rich behavioral context beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but tightly structured with bold headings for unchangeable fields, replacement behavior, and live-data impact. Every sentence carries operational weight, and the most important constraints are front-loaded after the opening sentence.

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 destructive mutation tool with seven parameters, one required field, and an output schema, this description covers invocation semantics, constraints, alternatives, failure modes, and safety implications. Nothing an agent needs to call it correctly appears missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description adds cross-field meaning that the schema does not: omitted fields remain unchanged, null removes limits, pageIds and ticketTypeIds are replaced wholesale, and ticketTypeIds must belong to the same pageIds or existing coupon pages. It also lists exactly which fields cannot be changed.

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 states a specific verb and resource: updating an existing coupon in the Checkout Page account. It distinguishes this tool from create_coupon by naming the alternative for discount changes, and from list_coupons indirectly through the couponId discovery note in the schema. An agent can immediately tell this is the mutation path for existing coupons.

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 gives explicit when-to-use guidance: partial updates, null for removing limits, wholesale replacement for pageIds and ticketTypeIds, and soft deletion for stopping redemption. It also names the alternative workflow for changing immutable discount fields via create_coupon. The 2025-10-04 cutoff explains when this tool cannot be used 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