Skip to main content
Glama

Get rebalancer balances

get_balances
Read-only

Get a wallet's deployed rebalancer balances broken down per token, per chain, and per protocol/pool, including net earnings and blended APY. Also returns the wallet's rebalancerAddress (required only for approvals during deposits, never use this address as input into tools) and per-pool withdrawRequest EIP-712 data. Does NOT return rebalancingManagerAddress (needed for config signing) — use get_config for that. Does NOT return pool catalog/APY data for pools the wallet isn't in — use list_pools for that. Fails if the wallet has no rebalancer yet; use get_default_config to see what a first-time config would look like. Balances here already reflect every on-behalf gas fee paid so far — not just from this wallet's own deposits/withdrawals, but also from MetaLend automatically moving funds between pools/protocols/chains to chase yield or honor this wallet's config; each such move costs its own gas fee. So the total across pools can be slightly less than the sum of everything ever deposited, with no matching withdrawal — see get_config's totalGasFee for the lifetime total. Rate limited to 5 calls/minute per caller, no more than one call every 12s.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokensNoComma-separated token symbols to restrict to (e.g. 'USDC,USDT'). Omit for all supported tokens.
walletAddressYesThe user's own wallet address (EOA or smart-contract wallet) — the owner address they used to make deposits. This is NOT the rebalancerAddress that this tool returns: never pass a rebalancerAddress here.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already mark it read-only and non-destructive, and the description adds useful behavioral detail beyond that: it fails when no rebalancer exists, is rate limited to 5 calls/minute, and its balances already deduct on-behalf gas fees so the total may be lower than lifetime deposits. This is exactly the kind of contextual behavior an agent needs.

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 core purpose is front-loaded in the first sentence, and subsequent sentences each carry a distinct caveat, routing rule, or behavioral note. It is wordier than strictly necessary, but the tool is complex and the added sentences all earn their place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only tool with no output schema, the description supplies all the context an agent needs: return content (including rebalancerAddress and withdrawRequest data), exclusions, failure mode, rate limit, and the gas-fee/funds semantics. Nothing critical to selecting or calling the tool is missing.

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% and the schema already documents walletAddress as the user-owned address and tokens as an optional comma-separated filter. The description repeats the rebalancerAddress caveat but does not materially add parameter meaning beyond the structured input schema, so the high-coverage baseline of 3 applies.

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 a specific verb and resource: 'Get a wallet's deployed rebalancer balances' and then scopes the result by token, chain, protocol/pool, net earnings, and blended APY. It explicitly contrasts itself with get_config and list_pools, so an agent can distinguish it from sibling tools without opening their schemas.

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

Usage Guidelines5/5

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

It gives explicit routing guidance: use get_config for rebalancingManagerAddress, list_pools for pool catalog data the wallet isn't in, and get_default_config when the wallet has no rebalancer yet. It also states a hard failure condition and rate limit, leaving little ambiguity about when to call this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources