Skip to main content
Glama

get_token_balance

Check ERC-20 or SPL token balances for wallets across EVM and Solana chains, returning both raw and human-readable amounts.

Instructions

Get the ERC-20 or SPL token balance for a wallet on a specific chain. Returns the raw balance and human-readable balance. Use get_chains to find stablecoin addresses for each chain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wallet_idYesWallet ID to check
tokenYesToken address (0x-prefixed ERC-20 contract for EVM, Base58 mint for Solana)
chain_idYesChain ID to check on
decimalsNoToken decimals (6 for USDC, 18 for most tokens)
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses the return format (raw and human-readable balance) which is valuable behavioral information. However, it doesn't mention error conditions, rate limits, authentication requirements, or whether this is a read-only operation (though 'Get' implies it).

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?

Two sentences that are front-loaded with the core purpose. The first sentence covers what the tool does and returns, the second provides practical guidance. Zero wasted words or redundancy.

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 read operation with no annotations and no output schema, the description provides adequate context about what it returns. However, it could benefit from mentioning that this is a read-only operation and clarifying error scenarios or limitations.

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%, providing good parameter documentation. The description adds minimal value beyond the schema - it mentions ERC-20/SPL tokens and references get_chains for addresses, but doesn't explain parameter relationships or provide additional semantic context.

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 ('Get'), resource ('ERC-20 or SPL token balance'), and target ('for a wallet on a specific chain'). It distinguishes from siblings like get_balance (likely native token) and get_token_info (metadata rather than balance).

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?

The description provides clear context for when to use this tool (to get token balances) and mentions get_chains as a related tool for finding token addresses. However, it doesn't explicitly state when NOT to use it or provide alternatives for similar operations.

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/hifriendbot/agentwallet-mcp'

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