Skip to main content
Glama

finance_rebalance

Read-only

Portfolio rebalancing trades — Calculates the trades that bring a portfolio back to target weights: per-position current weight, drift in percentage points, BUY/SELL/HOLD, trade dollars (and shares when you give SYM:shares@price), new weights, turnover and leftover cash. Modes: full (sell overweights, buy underweights) or cash_only (invest new cash into underweights, or take a withdrawal from overweights, without other sales). Params: holdings= SYM:value;SYM:value or SYM:shares@price, targets= SYM:percent;... (required, scaled to 100% if needed); optional cash= (+deposit / -withdrawal), band= drift threshold in points (no trades if every position is inside it), min_trade= dollars, mode=full|cash_only, fractional=false for whole shares. Offline. Price: $0.002 USDC (Base, via x402).

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": {
      "holdings": "<holdings>",
      "targets": "<targets>"
    },
    "name": "finance_rebalance"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetsYesVTI:50;BND:30;VXUS:20
holdingsYesVTI:60000;BND:25000;VXUS:15000

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, so the safety profile is covered; the description goes further by listing the returned fields, the 'no trades if every position is inside the band' behavior, target normalization ('scaled to 100% if needed'), and the metered cost ($0.002 USDC on Base via x402). One soft tension: it says 'Offline' while openWorldHint=true, which an agent may read as conflicting about whether external data is fetched.

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 outputs, then modes, then params, then cost — a sensible information hierarchy with no filler sentences. It is a dense run-on that packs a lot into two sentences, costing some scannability but nothing is genuinely wasted.

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?

With no output schema, the description correctly spells out the return fields and includes cost and offline-operation notes, so an agent knows what it gets back. The only gap is the drift between the parameters described in prose and the two properties actually in the schema, which leaves ambiguity about how to set mode/band/min_trade.

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%, but the schema descriptions are only bare examples (VTI:60000;...), so the description carries the real semantics: SYM:value vs SYM:shares@price notation, semicolon-separated lists, percent targets requiring no summing, signed cash for deposit vs withdrawal, and band/min_trade units. It loses a point because it documents optional parameters (cash, band, min_trade, mode, fractional) that do not appear in the input schema, which could mislead an agent into passing them.

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?

Opens with a specific verb+resource ('Calculates the trades that bring a portfolio back to target weights') and enumerates the concrete outputs (drift, BUY/SELL/HOLD, trade dollars, new weights, turnover, leftover cash). This is unmistakably distinct from the sibling calculators (dcf, apr, fire, bond), none of which are portfolio-weight tools.

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?

It explains the two operating modes and the condition that selects each: 'full (sell overweights, buy underweights)' vs 'cash_only (invest new cash into underweights, or take a withdrawal from overweights, without other sales)', plus band= and min_trade= as trade-suppression controls. There is no explicit when-not guidance or named alternative tool, but there are no close siblings to route away from, so the practical guidance is clear.

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