Skip to main content
Glama

Redeem a gift code

redeem_gift_code

Redeem a gift code (handed out by a giveaway site or a newsletter) for this account's gift pack, exactly like POST /v1/gift-codes/redeem. One pack per account, only in an account's first days. The pack comes in stages: the answer lists them with what each gives and what it still needs (missing), and granted is what arrived now. Call gift_code_pack later to collect a stage that has come due.

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": {
      "code": "<code>"
    },
    "name": "redeem_gift_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesthe coupon code, e.g. from an invite reward
tokenNothe token your login returned; pass it when a call answered not_logged_in after you logged in

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / token
      Added value: +{
      +  "description": "the token your login returned; pass it when a call answered not_logged_in after you logged in",
      +  "type": "string"
      +}
  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 it is a non-readonly, non-idempotent, non-destructive, closed-world mutation, and the description adds meaningful state behavior: redemption is once-per-account and time-boxed, and the reward arrives in staged installments. It explains the response semantics ('granted is what arrived now', 'missing' is what a stage still needs), which goes beyond the annotations. It does not cover failure modes such as an invalid or already-redeemed code, so it stops short of a 5.

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?

Four tight sentences, front-loaded with the verb and resource, then constraints, then response shape, then the follow-up call. The endpoint analogy is compact and useful for agents that know the API, though it is arguably redundant with the tool name.

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?

Despite an output schema existing, the description still tells the agent what the key return fields mean (stages, granted, missing), which is exactly the context needed to interpret a staged-reward response. Combined with the once-per-account and first-days constraints, nothing essential for correct invocation is missing.

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 description coverage is 100%, so both `code` and `token` are already documented in the schema, and the description adds only a small amount of context about where codes originate. The `token` parameter and the login-retry pattern are not mentioned in the description at all. Baseline 3 is appropriate when the schema carries the parameter burden.

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 ('Redeem a gift code') plus the source of such codes (giveaway site, newsletter), and pins the behavior to a known API endpoint (POST /v1/gift-codes/redeem). It is clearly distinct from the sibling gift_code_pack, which is named as the later collection step rather than the redemption step.

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?

Gives explicit eligibility constraints (one pack per account, only in an account's first days) and routes the agent to the sibling gift_code_pack for the follow-up action ('Call gift_code_pack later to collect a stage that has come due'). The when-to-use and what-to-do-next conditions are both stated rather than inferred.

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