Skip to main content
Glama

Redeem voucher

redeem_voucher
DestructiveIdempotent

Redeems a voucher code and adds its amount to the account's credit balance. Use it when the user gives a voucher code to apply. A redemption cannot be reversed and uses up one of the voucher's limited redemptions. Each voucher works once per account, so repeating the call adds nothing and returns an error. It fails for an unknown, inactive, expired or used-up code, or when the voucher's currency differs from the account's billing currency.

Input Schema

NameRequiredDescriptionDefault
codeYesVoucher code to redeem

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing irreversibility, the one-per-account limit, the error-on-repeat behavior, and a full set of failure conditions (unknown, inactive, expired, used-up, or currency-mismatched codes). The repeat-call-is-an-error wording sits slightly awkwardly with idempotentHint=true, but it is a nuance of error handling rather than a contradiction of the no-additional-effect guarantee.

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?

Front-loaded with the action and its effect, then usage, then constraints and failure modes. Four sentences, each carrying distinct information, with no restatement of the name or schema.

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?

For a one-parameter mutation with no output schema, the description covers effect, irreversibility, and error cases. The only real omission is what a successful response contains (returned credit amount or new balance), which the agent would otherwise have to discover at runtime.

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% and the single parameter is already documented as "Voucher code to redeem", so the schema does the work. The description adds implicit validity constraints (the code must exist, be active, unexpired, unused, and currency-compatible) but nothing about the code's format or length.

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 (redeems) and resource (voucher code) plus the concrete effect: the amount is added to the account's credit balance. This is unmistakably distinct from every sibling tool, which all deal with customers, invoices, or reporting rather than credit balances.

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 says when to call ("when the user gives a voucher code to apply") and effectively when not to repeat it ("Each voucher works once per account, so repeating the call adds nothing and returns an error"). No alternative sibling could be confused with it, so absence of a named alternative is not a gap.

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