Skip to main content
Glama
baskcart

W3 Ledger MCP Server

by baskcart

claim_gift_card

Claim a gift card to credit the claimer's DAH balance. Use this tool to process gift cards with ISSUED status by providing the player's public key and card information.

Instructions

Claim a gift card and credit the claimer's DAH balance. Only cards with status ISSUED can be claimed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
player_publickeyYesPublic key of the person claiming the card.
cardInfoYesGift card to claim (must include verification fields).

Implementation Reference

  • The handler logic for 'claim_gift_card' which uses the RolledgeClient to make a POST request to '/claimGift'.
    case 'claim_gift_card': {
        const res = await client.post('/claimGift', args);
        return toResult(res.data, !res.ok);
    }
  • The input schema definition for 'claim_gift_card', defining the required player_publickey and cardInfo object structure.
    {
        name: 'claim_gift_card',
        description:
            'Claim a gift card and credit the claimer\'s DAH balance. ' +
            'Only cards with status ISSUED can be claimed.',
        inputSchema: {
            type: 'object',
            properties: {
                player_publickey: {
                    type: 'string',
                    description: 'Public key of the person claiming the card.',
                },
                cardInfo: {
                    type: 'object',
                    description: 'Gift card to claim (must include verification fields).',
                    properties: {
                        card_id: { type: 'string', description: 'Unique gift card ID.' },
                        card_public_key: {
                            type: 'string',
                            description: 'Card\'s public key for verification.',
                        },
                        digital_signature: {
                            type: 'string',
                            description: 'Card\'s digital signature.',
                        },
                        message: { type: 'string', description: 'Gift card message.' },
                        cardValue: { type: 'number', description: 'Card value.' },
                        selected_merchant: {
                            type: 'string',
                            description: 'Merchant the card is for.',
                        },
                        status: {
                            type: 'string',
                            description: 'Must be ISSUED.',
                            enum: ['ISSUED'],
                        },
                    },
                    required: [
                        'card_id',
                        'card_public_key',
                        'digital_signature',
                        'message',
                        'cardValue',
                        'selected_merchant',
                        'status',
                    ],
                },
            },
            required: ['player_publickey', 'cardInfo'],
        },
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the mutation effect (crediting DAH) and the state precondition (ISSUED status). However, it omits critical behavioral details: whether the operation is idempotent, what error occurs if already claimed, and what final state the card transitions to.

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?

The description consists of two efficient sentences with zero redundancy. It front-loads the primary action and effect, followed by the constraint, making optimal use of limited space.

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

Completeness3/5

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

For a 2-parameter mutation tool with no output schema, the description covers the core action, side effects, and primary constraint. However, it lacks completeness regarding error scenarios, authorization requirements, and the post-claim card state transition, which are important for a destructive/claim-type operation.

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

Parameters4/5

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

With 100% schema coverage, the baseline is 3. The description adds semantic value by explicitly linking 'player_publickey' to the 'claimer' role ('credit the claimer's DAH balance'), clarifying the relationship between the parameter and the action beyond the schema's mechanical description.

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?

The description clearly states the specific action ('Claim a gift card'), the resource type, and the side effect ('credit the claimer's DAH balance'). It distinguishes from siblings like claim_sponsor_card by explicitly referencing 'gift card' vs the sibling's 'sponsor card' naming.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a prerequisite constraint ('Only cards with status ISSUED can be claimed'), which helps determine when the tool is applicable. However, it lacks explicit guidance on when to use this versus claim_sponsor_card, or what to do if the card status is not ISSUED.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/baskcart/w3ledger-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server