Skip to main content
Glama

How many real bets, and who carries the risk

portfolio_structure
Read-onlyIdempotent

How many independent bets a portfolio's holdings add up to, from how their prices moved together rather than how many tickers there are, and each holding's share of the risk beside its share of the money, over the full record and over recent years. Use it for 'am I diversified?' or 'which holding carries the risk?'; measure_portfolio includes this with look-through and crises. Weights or amounts give the same answer here; base sets the currency the prices are compared in (default USD). The window is set by the youngest holding.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseNoCurrency every figure is expressed in (USD, EUR, GBP, CAD…). Default USD.
holdingsYesWhat is held: {ticker: weight or amount}. Weights need not sum to one; amounts in the base currency are also accepted (then the crises are shown in money). 1 to 100 holdings. Tickers as the exchange lists them (VOO, VWCE.DE, XAW.TO; 'CASH.USD' for cash).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoWhere the prices came from and what was missing or repaired.
_fenceYesWhat these figures are and are not: descriptive, no forecast, no advice. Repeat its sense when presenting the result.
recentNoThe same figures over the recent years only.
max_weightNoIts share of the money, 0 to 1.
n_holdingsNoHoldings measured.
effective_betsNoEffective number of independent bets (from correlations, not the ticker count).
max_risk_tickerNoThe holding carrying the largest share of the portfolio's risk.
top_factor_shareNoShare of the movement explained by the single strongest common factor.
max_weight_tickerNoThe largest holding by money.
risk_contributionsNo[ticker, share of risk] pairs.
max_risk_contributionNoThat holding's share of the risk, 0 to 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered. The description adds genuinely useful behavior beyond that: 'the window is set by the youngest holding' and that weights vs amounts yield the same answer here. It does not, however, discuss output granularity or cost/latency for what is clearly a heavy computation.

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 purpose, then usage, then caveats, with no filler sentences. The opening clause ('from how their prices moved together rather than how many tickers there are') is a touch convoluted but earns its place as the key differentiator.

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?

An output schema exists, so return values need no explanation, and parameters are fully documented in the schema. The description covers purpose, usage, sibling routing and the window rule; only deep output-shape or performance expectations are absent, which is acceptable given the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both parameters are already documented (base currency, holdings map with ticker conventions). The description only restates base's role and default, adding the mildly useful note that weights and amounts give the same answer. Baseline 3 is appropriate when the schema does the heavy lifting.

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, non-obvious verb+resource: the effective number of independent bets derived from co-movement rather than ticker count, plus per-holding risk share vs money share. It explicitly distinguishes itself from measure_portfolio, which is named as the superset that also includes look-through and crises.

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 concrete user questions it answers ('am I diversified?', 'which holding carries the risk?') and names the alternative with the condition that selects it (measure_portfolio includes this plus look-through and crises). An agent can route between the two without inspecting schemas.

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