Skip to main content
Glama

Apply promo code

apply_promo_code
Destructive

Apply a promo / discount code to an existing order. Promo codes can only be applied to orders still in DRAFT or SCHEDULED state — before pickup. Requires order code, email, and the promo code (typically 4–12 alphanumeric, e.g. "WELCOME10" or "REF-AB12"). Returns the new total and the discount applied.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "orderCode": "<orderCode>",
      "promoCode": "<promoCode>"
    },
    "name": "apply_promo_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
emailNoEmail used when scheduling. Not needed when the customer has connected their Fold account.
orderCodeYesOrder code (FHL-XXXXXX or FOLD-XXXXX).
promoCodeYesPromo code (case-insensitive), e.g. "WELCOME10".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / email / description
      Previous value: -"Email used at booking. Not needed when the customer has connected their Fold account."New value: +"Email used when scheduling. Not needed when the customer has connected their Fold account."
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already carry the risk profile (destructiveHint=true, idempotentHint=false, openWorldHint=false), so the description's job is to add context, which it does: the DRAFT/SCHEDULED precondition, the fact that the order must already exist, and the shape of the response (new total plus discount). It doesn't explain what happens on an invalid or expired code, which would round this out.

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, front-loaded with the action and then the eligibility gate, with no filler. The parenthetical format examples are the only slightly expendable content, though they do add real 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?

There is no output schema, so the description correctly compensates by naming the return values (new total, discount applied), and it covers the eligibility precondition and the required inputs. The one gap is failure behavior for an invalid or already-applied code, plus the email requiredness slip.

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 100%, so the baseline is 3, and the description does add promo-code format guidance (4-12 alphanumeric, examples like "WELCOME10"). However it says "Requires order code, email, and the promo code," while the schema marks only orderCode and promoCode as required and explicitly documents email as optional for connected-account customers — a small requiredness inconsistency that misleads rather than clarifies.

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 ("Apply a promo / discount code to an existing order") and immediately scopes it to a state. No sibling tool overlaps with promo-code application, and an agent can tell this is a post-booking mutation on an existing order rather than a new booking or a lookup.

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?

Gives a clear eligibility rule: codes only apply to orders in DRAFT or SCHEDULED state, before pickup, which effectively tells the agent when not to call it (post-pickup or completed orders). It does not name an alternative tool for those rejected cases, but no sibling offers a comparable capability.

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