Skip to main content
Glama

get_user_balance

Check a user's token balance on a route to verify sufficient funds for cross-chain bridging or swapping. Returns holdings on origin and maximum bridgeable amount.

Instructions

Check a user's balance for a specific token on a route. Returns how much of the token the user holds on the origin chain and the maximum amount they can bridge/swap on this route.

Use this before quoting to verify the user has sufficient funds, or to show available balance context. Requires specifying both origin and destination chains since max bridgeable amount depends on the route.

Chain IDs can be numbers (8453) or names ('base', 'ethereum', 'arb', 'bitcoin', 'solana').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userYesWallet address to check balance for.
originChainIdYesOrigin chain ID or name (e.g. 1, 'ethereum').
originCurrencyYesToken address or symbol on the origin chain (e.g. "USDC", "ETH"). For native tokens use: EVM "0x0000000000000000000000000000000000000000", Solana "11111111111111111111111111111111", Bitcoin "bc1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmql8k8", Hyperliquid "0x00000000000000000000000000000000", Lighter "0". For other tokens, use the contract/mint address or look up via get_supported_tokens.
destinationChainIdYesDestination chain ID or name (e.g. 8453, 'base').
destinationCurrencyYesToken address or symbol on the destination chain (e.g. "USDC", "ETH"). For native tokens use: EVM "0x0000000000000000000000000000000000000000", Solana "11111111111111111111111111111111", Bitcoin "bc1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmql8k8", Hyperliquid "0x00000000000000000000000000000000", Lighter "0". For other tokens, use the contract/mint address or look up via get_supported_tokens.
Behavior4/5

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

No annotations are provided, so the description carries full burden. It accurately describes that the tool returns holdings and max bridgeable amount, and that the route dependency requires both chain IDs. However, it does not disclose potential errors, data freshness, or rate limits, which would add completeness.

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 is three concise sentences, front-loaded with the main action, and no extraneous information. Every sentence adds value.

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?

Given the tool has 5 required parameters, no output schema, and no annotations, the description is quite complete. It explains the purpose, when to use, and parameter insights. However, it doesn't describe the return format or any error conditions, leaving a minor gap.

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?

Schema description coverage is 100%, so baseline is 3. The description adds value by explaining that the max bridgeable amount depends on the route and providing examples of chain IDs (numbers or names). This helps clarify the parameters beyond the schema.

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 tool checks a user's balance for a specific token on a route and returns holdings and max bridgeable amount. It uses a specific verb ('Check') and resource ('user's balance'), distinguishing it from related tools like get_token_price or get_bridge_quote.

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 advises using this tool before quoting to verify sufficient funds or provide balance context. It explains that both chains must be specified because the max bridgeable amount depends on the route. While it doesn't explicitly state when not to use it, the guidance is clear and actionable.

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/pedromcunha/relay-mcp'

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