Skip to main content
Glama
Haiku-Trading

Haiku DeFi MCP

Official

haiku_get_balances

Retrieve token balances, USD prices, total portfolio value, and categorized positions (tokens, collateral, debt, vaults) for a wallet address across all supported chains, or specify chain IDs for a faster partial refresh after cross-chain swaps.

Instructions

Get token balances for a wallet address. By default fetches across all supported chains. Pass chainIds for a partial refresh — only the specified chains are queried, which is faster and useful after a swap when you only need updated balances for the source and destination chains. Returns balances, USD prices, total portfolio value, and categorized positions (tokens, collateral, debt, vaults). walletAddress is optional when WALLET_PRIVATE_KEY is set in the environment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletAddressNoWallet address (0x...) or ENS name. Omit to auto-derive from WALLET_PRIVATE_KEY.
chainIdsNoOptional list of chain IDs to fetch balances for. When provided, only those chains are queried (partial refresh). Example: [42161, 8453] to re-fetch only Arbitrum and Base after a cross-chain swap. Common chain IDs: 1 (Ethereum), 42161 (Arbitrum), 8453 (Base), 137 (Polygon), 10 (Optimism), 56 (BNB Chain), 80094 (Berachain). Omit to fetch all chains.
Behavior3/5

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

With no annotations provided, the description must disclose behavioral traits. It explains optional wallet address derivation from environment variable and the partial refresh behavior. However, it doesn't mention rate limits, data freshness, or what happens if the wallet address is invalid. Adequate but not comprehensive.

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 two sentences with a clear structure: first sentence states purpose, second elaborates on parameters and return values. It is front-loaded and efficient, though the list of chain IDs could be trimmed.

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 no output schema, the description explicitly lists return fields (balances, USD prices, portfolio value, categories). It covers the two parameters well. For a simple query tool, this is complete enough. Missing details about error handling or data freshness, but acceptable.

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 coverage is 100%, so baseline is 3. The description adds significant value by explaining the partial refresh use case for chainIds, providing common chain IDs and examples. For walletAddress, it clarifies optionality and auto-derivation. This goes beyond schema descriptions.

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 retrieves token balances for a wallet address. It specifies the default behavior (all chains) and contrasts with a common variant (partial refresh with chainIds). This distinguishes it from siblings like haiku_analyze_portfolio which likely provides deeper analysis rather than raw balances.

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 explains when to use the tool (get balances) and when to use the chainIds parameter (after a swap for faster partial refresh). It doesn't explicitly exclude other scenarios or mention alternatives among siblings, but the context is clear.

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/Haiku-Trading/haiku-mcp-server'

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