Skip to main content
Glama

rebalance_portfolio

Rebalance a multi-currency portfolio: given holdings, per-holding (or per-asset-class) target weights, cash and FX rates, return the exact BUY/SELL trades to reach the targets, the per-currency cash movements (flagging foreign-cash overdrafts), and a summary. Planning math only — no transaction costs or taxes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fx_ratesNoValue of 1 unit of each currency in the base currency (base currency itself is 1).
holdingsYesThe portfolio holdings to rebalance.
base_currencyNoBase currency the portfolio is valued in.USD
class_targetsNoOptional per-asset-class goal % (incl. "Cash"). When given, unlocked holdings are retargeted to hit each class goal before computing trades.
available_cashNoCash held per currency, keyed by ISO code.

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses key behaviors: computes exact trades, flags foreign-cash overdrafts, and explicitly states it is planning math only with no transaction costs or taxes. This clarifies limitations and side effects (none destructive), though it doesn't detail edge-case handling.

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 two sentences, front-loaded with the main action and outputs, followed by a concise qualifier. Every phrase earns its place with no redundancy or filler.

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?

Despite no output schema, the description names the three output components (trades, cash movements, summary) and the main behavior. It is complete for a planning tool given a rich input schema, though it does not detail the structure of the returned trades or summary objects.

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 meaning by clarifying that target weights can be per-holding or per-asset-class (class_targets), and that cash and FX rates are inputs, linking parameters to their purpose in the rebalancing workflow.

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 rebalances a multi-currency portfolio, enumerating inputs (holdings, target weights, cash, FX rates) and outputs (BUY/SELL trades, cash movements, summary). The verb 'rebalance' is specific and distinguishes it from sibling tools like retirement calculators or property tax computations.

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 provides clear context on when to use the tool by specifying required inputs and the planning-only scope ('Planning math only — no transaction costs or taxes'). It does not explicitly name alternatives or when-not-to-use scenarios, but the context is sufficient for differentiation from siblings.

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.

TDQS

A3.9/5.0
Disambiguation5/5

Each tool targets a clearly distinct financial calculation or data retrieval purpose. Coast FIRE, FIRE target, Swiss property tax, portfolio returns, wealth projection, and rebalancing have no overlapping responsibilities.

Naming Consistency3/5

All names are snake_case, but the verb prefixes are inconsistent: calculate_, compute_, get_, project_, rebalance_. The use of both 'calculate' and 'compute' for similar actions plus other varied verbs creates a noticeable lack of a single pattern.

Tool Count5/5

Six tools is well-scoped for a financial calculator server. Each tool covers a distinct aspect of retirement and wealth planning without redundancy or bloat.

Completeness4/5

The set covers core retirement planning needs: target calculation, projection, returns data, and rebalancing. The Swiss property tax tool is a specific gap-filler. Missing general tax or simple interest tools, but not critical given the stated focus.

Resources