Skip to main content
Glama
clawallex

Clawallex MCP Server

by clawallex

get_wallet

Retrieve wallet details including balance and status to verify sufficient funds before creating or refilling virtual cards for online payments.

Instructions

Get the wallet details for the current API key. Each API key has exactly one wallet — shared across all agents using the same API key. Returns available_balance, frozen_balance, low_balance_threshold, currency (USD), and status. Use this to check if there is sufficient balance before creating cards (Mode A) or refilling (Mode A).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_wallet' tool, which fetches wallet details from the Clawallex API.
    async () => {
      try {
        const result = await client.get<WalletDetail>("/payment/wallets/detail");
        return toolOk(result);
      } catch (err) {
        return toolError(err);
      }
    },
  • Registration of the 'get_wallet' tool using the MCP server instance.
    server.tool(
      "get_wallet",
      [
        "Get the wallet details for the current API key.",
        "Each API key has exactly one wallet — shared across all agents using the same API key.",
        "Returns available_balance, frozen_balance, low_balance_threshold, currency (USD), and status.",
        "Use this to check if there is sufficient balance before creating cards (Mode A) or refilling (Mode A).",
      ].join(" "),
      {},
      async () => {
        try {
          const result = await client.get<WalletDetail>("/payment/wallets/detail");
          return toolOk(result);
        } catch (err) {
          return toolError(err);
        }
      },
    );
  • Type definition for the wallet details object returned by the 'get_wallet' tool.
    interface WalletDetail {
      wallet_id: string;
      wallet_type: number;
      currency: string;
      available_balance: string;
      frozen_balance: string;
      low_balance_threshold: string;
      status: number;
      updated_at: string;
    }
Behavior4/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 critical behavioral traits: the singleton nature ('Each API key has exactly one wallet'), sharing semantics ('shared across all agents'), and compensates for the missing output schema by enumerating return fields (available_balance, frozen_balance, status, etc.). It lacks rate limits or error conditions, but covers the essential behavioral contract.

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 sentences, zero waste: (1) Purpose declaration, (2) Singleton/sharing behavior, (3) Return value specification (compensating for missing output schema), (4) Usage guidelines. Information is front-loaded and every sentence earns its place.

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 simple getter with no output schema, the description is appropriately complete. It enumerates the five specific fields returned, explains the wallet ownership model, and provides usage context. Without annotations or output schema, it successfully compensates to provide sufficient context for correct invocation.

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?

The input schema has 0 parameters (100% coverage of empty set). Per scoring rules, 0 params = baseline 4. The description correctly avoids inventing parameter documentation where none exist, maintaining appropriate silence on inputs.

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 opens with 'Get the wallet details for the current API key' — a specific verb (Get) + resource (wallet details) + scope (current API key). It clearly distinguishes itself from siblings like get_wallet_recharge_addresses (which gets addresses, not balance/status) and get_card_balance (card-level vs wallet-level).

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

Usage Guidelines4/5

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

Provides explicit when-to-use guidance: 'Use this to check if there is sufficient balance before creating cards (Mode A) or refilling (Mode A).' This establishes the prerequisite check pattern relative to sibling operations like create_card_order and refill_card, though it could explicitly name those tools.

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/clawallex/clawallex-mcp'

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