Skip to main content
Glama

Set promo code

set_promo_code
Destructive

Make a promo code (code + percentOff 1-99, or amountOff in cents) or turn one off or on (promoCodeId + active). Works on the booking card and Stripe's page; tax is worked out on the price after the code.

Input Schema

NameRequiredDescriptionDefault
codeNoNew code: 3-32 letters, digits, dashes.
activeNoWith promoCodeId: false turns it off.
siteIdYesSite id.
currencyNoWith amountOff. Default usd.
amountOffNoCents off, in currency.
expiresAtNoISO date the code ends.
percentOffNoWhole percent, 1-99.
promoCodeIdNoExisting code id (promo_...) to turn off or on.
maxRedemptionsNoMost uses. Omit for no limit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and openWorldHint=true. The description earns credit for naming the external system ('Stripe's page') and the pricing semantics ('tax is worked out on the price after the code'), which annotations cannot express. However it never explains what deactivation destroys (existing redemptions? active checkouts?), why the call is non-idempotent, or what permissions are required — gaps that matter for a destructive write.

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?

Two dense sentences with the primary operation and its parameter pairings front-loaded, followed by the side-effect note. No filler and nothing repeated from the schema verbatim.

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 9-parameter destructive mutation with no output schema, the description covers the operation modes, the cross-system side effect, and pricing behavior, with annotations carrying the safety profile and the schema carrying parameter detail. It leaves out error behavior (e.g. code already exists) and what a successful call returns, which keeps it from being fully complete.

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. The description goes beyond the schema by describing the mutual grouping of parameters — percentOff/amountOff pair with a new code, promoCodeId pairs with active — which the flat schema does not convey. It stops short of explaining defaults or interactions for currency, expiresAt, and maxRedemptions.

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?

States a specific verb and resource ('Make a promo code') and immediately enumerates the two supported operation modes: create (code + percentOff/amountOff) and toggle (promoCodeId + active). This makes it trivially distinguishable from the read-only sibling list_promo_codes 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 Guidelines3/5

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

The description implies which parameter combinations select each mode, which is genuine usage guidance, but it never states when to use this tool versus list_promo_codes to find an id first, nor any prerequisites (e.g. Stripe connection, plan tier). Usage is inferable rather than explicit.

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