Skip to main content
Glama

Book portfolio

get_book_portfolio
Read-only

Get a resolved book's portfolio: market-cap-weighted vs SPY ("cap", the default, the portfolio the ledger's verdict grades) or equal-weighted vs RSP ("equal"), with each long pick's weight and graded return, the book return, the benchmark return and its evidence, alpha and verdict. Equal weights always pair with RSP and cap weights with SPY. Per prediction, books serve the two as equal_weight and market_cap_weight; never read a pick's cap_weight as either without checking inference_metadata.weighting. Use this for one book's result, and get_simulation_nav for the running portfolio across books. An ungraded or unknown date is an error.

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": {
      "trading_date": "<trading_date>"
    },
    "name": "get_book_portfolio"
  }
}

Input Schema

NameRequiredDescriptionDefault
weightingNo"cap" for market-cap weights against SPY (the default), or "equal" for equal weights against RSP.cap
trading_dateYesThe book's trading date, as YYYY-MM-DD. list_resolved_batches gives the graded dates.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / trading_date / description
      Added value: +"The book's trading date, as YYYY-MM-DD. list_resolved_batches gives the graded dates."
    • addedInput schema / properties / weighting / description
      Added value: +"\"cap\" for market-cap weights against SPY (the default), or \"equal\" for equal weights against RSP."
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, closed-world), and the description adds real behavior the annotations cannot: the hard invariant that equal weights always pair with RSP and cap weights with SPY, the error on ungraded/unknown dates, and a cross-field hazard warning not to read a pick's cap_weight without checking inference_metadata.weighting. It stops short of describing result shape, but an output schema exists, so that omission is minor.

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 output description, then the pairing invariant, then the sibling routing, then the error condition — a sensible escalation. It is dense and slightly run-on in the middle clause about per-prediction weightings, but every sentence carries a distinct constraint rather than 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?

With only two parameters, full schema documentation, and an output schema covering return values, the description supplies everything an agent needs to call it correctly and interpret the two variants. The one residual gap is the warning about inference_metadata.weighting, which references a field from a different tool without saying where it comes from.

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 meaning beyond the schema: "cap" is identified as the default and as "the portfolio the ledger's verdict grades," which the schema does not say, and it restates the weighting/benchmark pairing as a constraint rather than a formatting choice. The trading_date semantics are left to the schema, which already names list_resolved_batches as the source of graded dates.

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 ("Get a resolved book's portfolio") and immediately enumerates the two variants it returns: market-cap-weighted vs SPY or equal-weighted vs RSP, plus the fields produced (weights, graded return, book/benchmark return, alpha, verdict). It explicitly separates itself from get_simulation_nav, so an agent can pick between them without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit routing rule: "Use this for one book's result, and get_simulation_nav for the running portfolio across books." It also sets the default (cap) and names the failure condition ("An ungraded or unknown date is an error"), leaving no ambiguity about when the call will succeed.

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.