Skip to main content
Glama

Rebalance plan

rebalance_plan
Read-only

Given a wallet and target weights (e.g. 50% ETH on Ethereum, 50% USDC on Base), compute the swaps needed from its current holdings, each with a LIVE SwapChan quote (quoteId → build_swap_tx) and a prefilled swapUrl. Unpriced holdings are left alone. Result includes display markdown with chan images: show it to the user. How to combine this with the other tools: swapchan_playbook (workflows: find-money, best-swap, rebalance, revoke-approvals, bridge-stuck, token-safety, recover-old-wallet).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "address": "<address>",
      "targets": "<targets>"
    },
    "name": "rebalance_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
addressYesWallet address (EVM 0x…, Solana, Tron T…) or a name (vitalik.eth, jesse.base.eth, toly.sol)
targetsYes
minTradeUsdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety and external-network behavior are covered. The description adds useful context beyond that: swaps come with live quotes, quoteId is for build_swap_tx, a prefilled swapUrl is included, unpriced holdings are skipped, and the result contains display markdown that should be shown to the user.

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?

Front-loaded with purpose, then behavior, then follow-up routing; every sentence contributes. The list of playbook workflows is long and slightly noisy, but it is useful routing rather than filler.

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?

For a complex planning tool with no output schema, the description covers the key outcome (quotes plus display markdown) and next step (build_swap_tx). It still omits the effect of minTradeUsd and gives only a partial picture of the full result structure beyond the display field.

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 coverage is only 33%, and the description partially compensates: it explains targets via the 50% ETH / 50% USDC example and notes that unpriced holdings are left alone. But minTradeUsd is neither described in the schema nor mentioned in the description, and the weight field's percentage semantics are only implied by the example.

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?

States a specific verb and resource: compute the swaps needed to rebalance a wallet to target weights. It distinguishes itself from build_swap_tx and get_quote by explaining that each planned swap carries a live quote whose quoteId feeds build_swap_tx, and it gives a concrete example of targets.

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?

Clearly routes the agent to swapchan_playbook for workflows including rebalance, and says to show the display markdown to the user. It does not explicitly name when to choose this over get_quote or best_time_to_swap, so the guidance is strong but not exhaustive.

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.