Skip to main content
Glama

get_wallet_token_balance

Retrieve cryptocurrency token balances for multiple wallet addresses and tokens simultaneously to monitor portfolio holdings across different assets.

Instructions

Get the balance for a list of wallet/token pairs.

Expects a WalletTokenPairsContainer, returns a list of WalletTokenBalance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wallet_token_pairsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool registration and handler for 'get_wallet_token_balance', which proxies the request to the ArmorWalletAPIClient instance.
    @mcp.tool()
    async def get_wallet_token_balance(wallet_token_pairs: WalletTokenPairsContainer) -> List[WalletTokenBalance]:
        """
        Get the balance for a list of wallet/token pairs.
        
        Expects a WalletTokenPairsContainer, returns a list of WalletTokenBalance.
        """
        if not armor_client:
            return [{"error": "Not logged in"}]
        try:
            result: List[WalletTokenBalance] = await armor_client.get_wallet_token_balance(wallet_token_pairs)
            return result
        except Exception as e:
            return [{"error": str(e)}]
  • Core implementation in ArmorWalletAPIClient that serializes the input container and makes the HTTP POST request to the Armor API endpoint '/tokens/wallet-token-balance/'.
    async def get_wallet_token_balance(self, data: WalletTokenPairsContainer) -> List[WalletTokenBalance]:
        """Get balances from a list of wallet and token pairs."""
        # payload = [v.model_dump() for v in data.wallet_token_pairs]
        payload = data.model_dump(exclude_none=True)['wallet_token_pairs']
        return await self._api_call("POST", "tokens/wallet-token-balance/", payload)
  • Pydantic container model for the tool input, holding a list of WalletTokenPairs.
    class WalletTokenPairsContainer(BaseModel):
        wallet_token_pairs: List[WalletTokenPairs]
  • Pydantic model defining each wallet-token pair in the input.
    class WalletTokenPairs(BaseModel):
        wallet: str = Field(description="The name of wallet. To get wallet names use `get_user_wallets_and_groups_list`")
        token: str = Field(description="public address of token. To get the address from a token symbol use `get_token_details`")
  • Pydantic model for the output balance response items.
    class WalletTokenBalance(BaseModel):
        wallet: str = Field(description="name of wallet")
        token: str = Field(description="public address of token")
        balance: float = Field(description="balance of token")
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but lacks critical behavioral details such as whether it's a read-only operation, requires authentication, has rate limits, or handles errors. This is a significant gap for a tool with financial data implications.

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?

The description is appropriately sized with two sentences that directly address purpose and input/output. It's front-loaded with the main function and avoids unnecessary details, though it could be slightly more structured with bullet points or examples for clarity.

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?

Given the tool's complexity (financial balance queries), no annotations, and an output schema exists, the description is minimally adequate. It covers purpose and basic I/O but lacks behavioral context, error handling, and detailed parameter guidance, which are important for safe and effective use.

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 0%, so the description must compensate. It mentions the parameter 'WalletTokenPairsContainer' and its purpose, adding some semantics beyond the bare schema. However, it doesn't explain the structure or format of this container, leaving gaps in understanding how to construct valid input.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('balance for a list of wallet/token pairs'), distinguishing it from siblings like 'get_all_wallets' or 'get_stake_balances'. However, it doesn't explicitly differentiate from similar tools beyond the resource specificity.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context for usage, or compare it to siblings like 'get_all_wallets' or 'get_stake_balances', leaving the agent to infer usage from the purpose alone.

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/emmaThompson07/armor-crypto-mcp'

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