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.

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.4/5.0
Behavior4/5

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

Annotations already declare the mutation profile (destructiveHint=true, idempotentHint=false); the description adds the state precondition and the response contents (new total and discount applied). It does not say whether an existing promo is overwritten, which matters for a destructive, non-idempotent call — that is the only real gap.

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?

Three sentences, no waste: purpose first, then the eligibility precondition, then the return value. Every sentence carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, and the description covers the return shape itself (new total, discount applied) along with preconditions and inputs. For a three-parameter mutation, that is sufficient to call it correctly.

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

Parameters2/5

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

Schema coverage is 100%, so the baseline would be 3, but the description contradicts the schema: it says "Requires order code, email, and the promo code" while email is optional and only needed when the customer has no connected Fold account. That error could push an agent to demand an unnecessary parameter. The added promo-code length hint (4–12 alphanumeric) is useful but does not offset the inaccuracy.

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?

Specific verb + resource ("Apply a promo / discount code to an existing order") plus a state scope (DRAFT or SCHEDULED, before pickup). No sibling tool handles promo codes, so no differentiation is needed to disambiguate it from the list.

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 states the eligibility window (only DRAFT or SCHEDULED orders, before pickup) so the agent knows when the call will succeed and when it must not be attempted. No alternative tool exists for this capability, so the guidance is complete.

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