Skip to main content
Glama

create_coupon

Idempotent

Create a percentage discount coupon for an app. WRITE, human-gated: a real create requires an elicitation-capable client (e.g. Claude Desktop). The human enters the final code, percent, expiry, visibility, and tier scope in a form; those values OVERRIDE the arguments here, which only pre-fill the form message as a proposal. Clients without elicitation are refused (dry_run still works anywhere). Inserts a coupons row and best-effort-mints the matching Stripe coupon (checkout backfills it on first use if Stripe is unreachable). The code is uppercased and must be unique per app. By default the coupon applies to every paid tier. Set dry_run:true first to preview the exact row without writing. Cannot discount a free-only app. Three house rules are enforced and cannot be argued out of: every coupon expires within 6 months (omitting expires_at means the 6-month term, not a code that never expires); a coupon at 90%+ is created invite_only, so it is redeemable only by addresses added with invite_to_coupon; and a 90%+ coupon is pinned to the second-highest paid recurring tier and may never cover the top tier or a one-time (lifetime) plan. Use list_coupons afterwards to confirm, and list_plans to see an app's tier slugs.

Input Schema

NameRequiredDescriptionDefault
codeYes
app_idYes
listedNo
dry_runNo
max_usesNo
expires_atNo
descriptionNo
applies_to_tiersNo
discount_percentYes
confirm_high_discountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Far exceeds the annotations: it discloses the elicitation/human-in-the-loop gate, that argument values are only a proposal overridden by the human form, the side effects (coupons row + best-effort Stripe mint with checkout backfill), the normalization/unique constraint on code, the free-only-app limitation, and the three non-negotiable house rules (6-month max expiry, 90%+ forced invite_only, 90%+ tier pinning). None of this is recoverable from readOnlyHint/openWorldHint/idempotentHint.

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?

Roughly 200 words but densely packed with non-redundant operational facts, and the most decision-critical items (WRITE, human-gated, dry_run) are front-loaded before the house rules. A few clauses, such as the parenthetical Stripe fallback detail, could be trimmed without losing selection value.

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 10-parameter mutation tool with no output schema, it covers side effects, failure modes, defaults, next-step verification and business constraints well enough to call it correctly. The remaining gap is per-parameter semantics for max_uses/description/listed and confirmation of what confirm_high_discount does versus the automatic house rules.

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 0%, so the description carries the burden and does substantial work: dry_run semantics, expires_at default (omitting means 6 months, not never), applies_to_tiers default (all paid tiers), code uppercasing/uniqueness, and the discount_percent 90%+ consequences. However max_uses, description, listed, app_id and confirm_high_discount are never explained, leaving roughly half the parameters undocumented anywhere.

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?

Opens with a concrete verb+resource ("Create a percentage discount coupon for an app") and immediately flags it as a WRITE, human-gated operation, so the agent knows exactly what kind of effect to expect. It never names the obvious sibling bulk_create_coupon, so differentiation from that tool is left implicit (singular vs. bulk) rather than stated.

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?

Explicitly prescribes the pre-flight ("Set dry_run:true first to preview the exact row without writing"), the post-flight ("Use list_coupons afterwards to confirm"), and where to find tier slugs ("list_plans"). It also states a hard gating condition — clients without elicitation are refused while dry_run still works anywhere — which tells the agent exactly when the call will and will not succeed.

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