Skip to main content
Glama

unredeem_code

Reverse a redemption made by mistake. Only a redeemed code changes, and the participant assignment is kept — this is the safe way to undo a redeem_code call. To also take the code back from the participant, use unassign_code instead. 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_tokenYesThe code token (UUID v4) of a redeemed code

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnlyHint=false, destructiveHint=false), so the description only needs to add context. It does: exactly what mutates ('Only a redeemed code changes') and what is preserved ('participant assignment is kept'), plus a non-retryable error condition. It does not mention that the operation is non-idempotent, which the annotations flag as a relevant trait.

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?

Four short sentences, each carrying distinct load — purpose, blast radius, sibling routing, error handling — with the identity of the action front-loaded. No filler or repeated annotation content.

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?

No output schema exists, so the description carries return-shape burden, and it does communicate the essential post-state (code un-redeemed, assignment intact). It stops short of describing the response payload, but for a single-parameter reversal with an authoritative annotation profile this is close to complete.

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?

One parameter with 100% schema description coverage, so the schema already tells the agent that coupon_token is the UUID of a redeemed code. The description adds no format, constraint, or sourcing detail beyond that, so baseline 3 is correct.

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 ('Reverse a redemption') and immediately scopes it against siblings by naming redeem_code as the operation being undone and unassign_code as the alternative. An agent can distinguish this from every other code tool without opening a schema.

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?

Explicit when-to-use guidance: use this to undo a mistake when the participant assignment should be kept, use unassign_code when the code should also be taken back. It even covers the failure path (403 module-not-enabled → do not retry, escalate to support), which is unusually 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