Skip to main content
Glama

Rebalance plan

rebalance_plan
Read-onlyIdempotent

Build a tax-aware rebalancing trade list that brings holdings back to the target model or custom allocation, optionally investing new cash. Sells come from tax-advantaged accounts first, then taxable lots with losses, then the smallest gains; proceeds stay in the account that raised them. Returns each trade (account, symbol, dollars, estimated shares, estimated realized gain and tax), totals, the allocation after the trades, wash-sale and concentration warnings, and notes. Takes the same holdings, prices and target inputs as portfolio_review; missing prices are fetched from live quotes. Trades are estimates for advisor review, not orders.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
bandNoRebalancing band in percentage points (default 5): an asset class further than this from target is out of band.
forceNoRebalance to target even when every class is within the band (default false).
modelNoTarget model portfolio: conservative (20% stocks), moderately_conservative (40% stocks), moderate (60% stocks), growth (75% stocks), aggressive (90% stocks). Default moderate. risk_profile_score maps a client to one.
pricesNoLatest price per share by symbol, e.g. {"VTI": 301.25}. CASH and money-market funds are priced at $1. Symbols without a price here are fetched from live quotes.
targetNoCustom target allocation in percent, totalling 100. Use instead of model.
newCashNoNew money to invest, in dollars (default 0).
holdingsNoHoldings as objects, instead of holdingsCsv. Up to 300 rows; one row per lot gives the best tax estimates.
minTradeNoSmallest trade in dollars (default 100).
taxRatesNoCapital-gains rates in percent used to estimate tax (default 24 short-term, 15 long-term).
holdingsCsvNoHoldings as CSV text in the LunaTerminal import format: a header row with at least symbol and shares; the full header is account,account_type,symbol,shares,cost_basis,asset_class,acquired. cost_basis is the row's total dollars, acquired is YYYY-MM-DD. Example: account,account_type,symbol,shares,cost_basis,asset_class,acquired Joint brokerage,taxable,VTI,120,24000,,2021-03-15 Joint brokerage,taxable,AAPL,150,18000,,2019-06-01 Joint brokerage,taxable,CASH,8000,8000,, Up to 300 rows and 128 KB. Send this or holdings, not both.
newCashAccountNoAccount name that receives the new cash (default: the first taxable account).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / holdingsCsv / description
      Previous value: -"Holdings as CSV text in the afa import format: a header row with at least symbol and shares; the full header is account,account_type,symbol,shares,cost_basis,asset_class,acquired. cost_basis is the row's total dollars, acquired is YYYY-MM-DD. Example:\naccount,account_type,symbol,shares,cost_basis,asset_class,acquired\nJoint brokerage,taxable,VTI,120,24000,,2021-03-15\nJoint brokerage,taxable,AAPL,150,18000,,2019-06-01\nJoint brokerage,taxable,CASH,8000,8000,,\nUp to 300 rows and 128 KB. Send this or holdings, not both."New value: +"Holdings as CSV text in the LunaTerminal import format: a header row with at least symbol and shares; the full header is account,account_type,symbol,shares,cost_basis,asset_class,acquired. cost_basis is the row's total dollars, acquired is YYYY-MM-DD. Example:\naccount,account_type,symbol,shares,cost_basis,asset_class,acquired\nJoint brokerage,taxable,VTI,120,24000,,2021-03-15\nJoint brokerage,taxable,AAPL,150,18000,,2019-06-01\nJoint brokerage,taxable,CASH,8000,8000,,\nUp to 300 rows and 128 KB. Send this or holdings, not both."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent and non-destructive, yet the description still adds substantive behavior: the sell ordering (tax-advantaged first, then losses, then smallest gains), that proceeds stay in the originating account, that missing prices are pulled from live quotes, that wash-sale and concentration warnings are emitted, and that outputs are estimates rather than orders. This is exactly the mutation-adjacent context an agent needs beyond the safety hints.

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?

Purpose is front-loaded in the first clause, followed by the algorithm, then the return payload, then the caveat — a sensible ordering. The return-value sentence is long, but it substitutes for the absent output schema, so the density is justified rather than wasteful.

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?

With 11 optional parameters, nested objects, and no output schema, the description carries real burden and does so: it enumerates returned fields, states the estimation caveat, and cross-references the sibling whose inputs it reuses. Nothing an agent needs in order to call it correctly is missing.

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 the baseline is 3; the description earns above that by pinning down input equivalence with portfolio_review ("same holdings, prices and target inputs"), clarifying that holdingsCsv and holdings are alternative representations, and reinforcing that unpriced symbols fall back to live quotes. It stops short of explaining band, minTrade, or taxRates semantics, which the schema already handles.

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 artifact: "Build a tax-aware rebalancing trade list that brings holdings back to the target model or custom allocation." It also names the sibling relationship implicitly by distinguishing trade generation from the review inputs it shares, so an agent can tell it apart from portfolio_review.

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 opening sentence plus "optionally investing new cash" makes it clear this tool is for producing executable-style trade lists rather than analysis, and the closing sentence frames it as pre-trade advisor review rather than order entry. It does not explicitly say "use portfolio_review instead when you only want analysis," so the alternative is implied rather than stated.

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