Skip to main content
Glama

discounts_coupon

Create a coupon code. Money is integer minor units (cents). Calling this changes nothing: it returns a preview of what would change and a confirmation link. Only the merchant, on that page, can make it happen.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesWhat the shopper types at checkout.
kindYes
nameNoWhat the order line calls it. Defaults to the code.
valueYesBasis points for percentage (20% is 2000), minor units (cents) for fixed.
endsAtNoISO 8601. Omit to run until turned off.
startsAtNoISO 8601. Omit to start immediately.
usageLimitNoTotal redemptions across everyone.
minSubtotalNoMinor units. Basket must reach this before the code applies.
freeShippingNoDelivery is free when the code applies.
perCustomerLimitNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations give only the generic readOnly/destructive/idempotent flags; the description adds the genuinely important behavioral fact that nothing is committed until a human merchant confirms on the returned link, plus the confirmation-link return shape. Note the mild tension with readOnlyHint=false ('changes nothing'), but the description is clarifying the two-phase flow rather than flatly contradicting a safety flag, so no contradiction is flagged.

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?

Three tight sentences with the core action stated first and the surprising part (no real change, confirmation link) immediately after. The minor-units sentence is slightly redundant with the schema but earns its place as a money-format warning.

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?

There is no output schema, and the description compensates by explaining what the call returns (a preview of changes and a confirmation link). For a 10-parameter create tool this is largely sufficient, though it says nothing about code-uniqueness or validation failures.

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

Parameters3/5

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

Schema coverage is already 80%, and the one parameter fact the description adds — money in integer minor units (cents) — merely restates what the schema already says for 'value' and 'minSubtotal'. With the schema doing the heavy lifting, the baseline of 3 applies.

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?

The first sentence gives a specific verb and resource ('Create a coupon code'), which is enough to distinguish it from most siblings. It does not, however, contrast itself with the closest sibling, discounts_catalog_sale, leaving the agent to infer which discount mechanism to pick.

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?

The description gives clear operating context: calling it produces only a preview plus a confirmation link, and the merchant must act on that page. That is strong guidance on what invoking the tool achieves. It stops short of naming alternatives (catalog sale, promotions_edit) or exclusions, so it does not reach a 5.

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