Skip to main content
Glama

redeem_code

Mark one code as redeemed — exactly once — either by its coupon_token or by the code the customer presented at the point of sale (coupon_code plus sweepstakes_token). coupon_token wins if both are sent. Voided codes are never redeemable. This is reversible: unredeem_code undoes a redemption made by mistake. Requires the Codes & Coupons module enabled on the account — on 403 "module not enabled", do NOT retry; tell the user to contact Sweeppea support.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coupon_codeNoThe code the customer presented — matched exactly and case-sensitively. Requires sweepstakes_token
coupon_tokenNoThe code token (UUID v4). Required unless coupon_code is sent; takes precedence when both are sent
sweepstakes_tokenNoThe sweepstakes token (UUID v4). Required together with coupon_code

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare the mutation/idempotency safety profile. The description adds real behavioral context the annotations can't: the 'exactly once' rule, the 'voided codes are never redeemable' constraint, the reversibility path via unredeem_code, and the module-enabled prerequisite with 403 handling. Consistent with destructiveHint=false and idempotentHint=false.

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?

Front-loaded with the core action, and every clause (precedence, voided rule, reversibility, 403 handling) earns its place. It reads as a dense single paragraph rather than cleanly separated lines, which is the only minor cost.

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?

For a mutation tool with full schema coverage and no output schema, the description supplies everything an agent needs: input precedence, business constraints, reversibility, auth/module requirement, and error-handling policy.

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 schema already documents all three parameters including the precedence rule. The description only restates the coupon_token-wins precedence already in the schema and loosely glosses coupon_code as 'the code the customer presented'; it adds little beyond the structured fields. Baseline 3 applies.

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 ('Mark one code as redeemed') with explicit scope and the two input routes clearly distinguished. Names the inverse sibling (unredeem_code), so an agent can immediately tell it apart from the redemption-canceling tool.

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?

States exactly how to select each path (coupon_token XOR coupon_code+sweepstakes_token), resolves the ambiguity when both are sent, names the alternative for reversing a mistake, and gives explicit when-not-to-retry guidance on 403. Nothing is left to inference.

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