Skip to main content
Glama

Coupon Write Tool

coupon-write
Destructive

Create or update discount coupons. Requires coupon permission. Creation requires a unique code, type and discounts; percentage discounts must be between 0 and 100 and no discount amount can be negative. Updates replace supplied discount collections and can affect what clients pay.

Input Schema

NameRequiredDescriptionDefault
codeNoCoupon code (max 32, unique). Required for "create", optional for "update".
typeNoDiscount type: "percentage" (amount is 0–100 percent) or "fixed" (amount is a monetary value). Required for "create".
actionYesAction to perform.
durationNoWhether the discount applies for the full subscription duration. Optional.
coupon_idNoCoupon id. Required when updating an existing record.
discountsNoDiscount rules. Required for "create". Each entry has an "amount" and optional "services".
single_useNoAllow each customer to use the coupon only once. Optional.
descriptionNoInternal description of the coupon. Optional.
date_expiresNoExpiry date-time (e.g. "2026-12-31 23:59:59"). Optional; pass null on "update" to clear.
is_cart_totalNoFixed coupons only: take the amount off the eligible cart subtotal once, spread across the eligible items, instead of off every eligible item and quantity. Ignored (forced false) for percentage coupons. Optional.
new_customersNoRestrict the coupon to customers with no prior paid invoices. Optional.
min_cart_amountNoMinimum cart total required to use the coupon. Optional; pass null on "update" to clear.
single_quantityNoApply the discount to a single quantity only. Optional.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag the tool as destructive and open-world, but the description adds valuable context: coupon permission is required, updates replace supplied discount collections, and changes can affect what clients pay. This goes beyond the annotations by clarifying impact and replacement semantics, though it could say more about irreversibility or confirmation.

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 front-loaded with the core purpose, then layers in prerequisites and key validation in a few tight sentences. Every sentence carries useful information, with no filler or redundant restatement of the name.

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?

Given the 13 parameters, 100% schema coverage, and existing annotations, the description covers the critical behavioral points: permissions, creation requirements, validation bounds, and update replacement behavior. It does not detail optional parameters such as duration or min_cart_amount, but the schema handles those adequately.

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 description coverage is 100%, so the schema already documents all 13 parameters. The description still adds meaning by explaining that creation needs a unique code, type, and discounts, that percentage discounts must be 0–100 and non-negative, and that updates replace supplied discount collections.

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 opens with a specific verb and resource: 'Create or update discount coupons.' This clearly distinguishes coupon-write from the sibling coupon-read tool and leaves no ambiguity about the operation's scope.

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

Usage Guidelines4/5

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

It states the two supported actions (create and update) and gives prerequisites like coupon permission. It does not explicitly name coupon-read as the read-only alternative, but the create/update scope makes usage clear enough without exclusions.

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