Skip to main content
Glama

Rebalance order list

rebalance_order_list
Read-onlyIdempotent

The dollar and share change per name to move a pasted positions export to target weights, as a list. Weights are a share of investable capital (positions + cash on hand - cash reserve). Each row: current $ and %, target %, dollar change, shares at the last price, direction, and whether exiting it would realize a gain or harvest a loss (from unrealized P&L; holding periods are not in a positions export, so short- vs long-term is not known). A target with no holding and no price is sized in dollars only. Arithmetic only: no order is placed or previewed. Nothing pasted is stored. Example: {"positions_csv": "symbol,quantity,last_price,total_gain\nAAPL,120,229.80,5940\nKO,200,70.10,-210", "target_weights_pct": {"AAPL": 30, "KO": 30, "VTI": 40}, "cash_on_hand": 10000, "prices": {"VTI": 301.55}}.

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": {
      "positions_csv": "<positions_csv>",
      "target_weights_pct": "<target_weights_pct>"
    },
    "name": "rebalance_order_list"
  }
}

Input Schema

NameRequiredDescriptionDefault
pricesNoSymbol -> price, for targets not currently held
cash_on_handNoUninvested cash (default: a cash row in the export, else 0)
cash_reserveNoCash to keep out of the allocation (default 0)
positions_csvYesPositions export as CSV text, header row included
sell_unlistedNoAlso exit held names absent from the targets (default false)
target_weights_pctYesSymbol -> target weight in percent (30 = 30%); 0 is a full exit

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?

Well beyond the readOnly/idempotent/destructive=false annotations, it discloses that nothing is persisted ('Nothing pasted is stored'), that order execution does not occur, and that gain/loss classification derives from unrealized P&L with short- vs long-term deliberately unknown. It also flags the edge case that a target lacking a holding and price is sized in dollars only. These are the operational limits an agent needs before trusting the numbers.

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 the core computation, then constraints, then a concrete example — a sensible order. The single long paragraph packs several parenthetical caveats, but each sentence carries non-redundant information. Slightly dense, not padded.

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?

There is no output schema, and the description compensates by specifying the per-row fields and the direction/gain-loss semantics of the returned list. Combined with the allocation formula and the sizing edge case, an agent has everything needed to call it and interpret the result without further assumptions.

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 the baseline is 3, but the description adds real meaning: weights are 'a share of investable capital (positions + cash on hand - cash reserve),' which defines the otherwise ambiguous denominator across cash_on_hand, cash_reserve, and target_weights_pct. The worked example shows the expected CSV header and price-map shape. sell_unlisted is only covered by the schema, keeping it off a 5.

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 precise verb+resource: compute 'the dollar and share change per name' to move a pasted positions export 'to target weights, as a list.' It goes further and enumerates the output row fields (current $/%, target %, dollar change, shares, direction, gain/loss flag), so an agent knows exactly what artifact it gets. No sibling tool in the list performs rebalancing arithmetic, so it is unmistakable.

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?

States the operating context clearly: it consumes a pasted positions export plus target weights and is 'Arithmetic only: no order is placed or previewed.' That implicitly tells the agent not to expect execution. It stops short of naming an alternative workflow or explicit when-not-to-use conditions, so it is strong context rather than routing guidance.

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.