Skip to main content
Glama

Create discount code

agenta_discounts_create

Create a discount code buyers enter at checkout for money off, or a tracking-only referral code that records who a referral brought in. Returns the code and its id for managing promotions.

Instructions

Create a discount code buyers type at checkout. Creates a code buyers type at checkout to get money off, or a tracking-only code that records who a referral brought in. Returns the code and its id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe code buyers type at checkout
nameNoYour label for it, shown on the buyer’s invoice
planNoLimit it to one plan: the product id. Omit for all plans
businessNoAct for this business you manage (its id). Omit to act as yourself.
amountOffNoFixed amount off the first invoice, e.g. 5.00
expiresAtNoDate the code stops working (YYYY-MM-DD)
percentOffNoPercentage off the first invoice, e.g. 20
maxRedemptionsNoStop the code working after this many subscribers use it

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.3
  2. Removedv0.1.1
  3. Addedv0.1.2

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and openWorldHint=true, so the write-but-not-destructive profile is covered. The description adds useful context: it discloses the two behavioral modes (money-off vs tracking-only) and the return value ("the code and its id"). It omits auth requirements, duplicate-code handling, and idempotency, so it adds moderate value beyond annotations.

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

Conciseness3/5

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

The main purpose is front-loaded, but the first two clauses are near-verbatim repeats ("buyers type at checkout" appears twice), wasting a sentence. The tool would read better with the redundancy removed.

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?

With 8 parameters at 100% schema coverage, no output schema, and simple flat parameters, the description is nearly complete. Explaining the return value (code and id) compensates for the missing output schema, though it could say more about behavior on invalid or duplicate codes.

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 description coverage is 100%, so every parameter is already documented in the schema and the baseline is 3. The description adds no parameter-level detail (no mention of code format, plan scoping, or business acting-on-behalf) beyond what the schema provides.

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?

States a specific verb and resource ("Create a discount code") and distinguishes two functional variants: a money-off code versus a tracking-only referral code. It does not explicitly name or contrast with siblings like agenta_discounts_show or agenta_discounts_archive, but the create intent is unambiguous.

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 usage by describing the two code types an agent might want, but it never states when to choose this tool over alternatives such as discounts_list or discounts_show. No exclusions or prerequisites are given, leaving usage to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.