Skip to main content
Glama

How many independent bets, and where the risk sits

portfolio_structure
Read-onlyIdempotent

How many independent bets a portfolio's holdings make, 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 recent years. Shares of the risk are Euler contributions and add up to 100%. Typical questions: 'Am I really diversified?'; 'Which of my holdings is behind most of the risk?'; 'Do my four funds move as one?'. Instead: for the companies inside the funds, look_through. For everything at once, measure_portfolio. It does not recommend, predict or calculate tax.

Input Schema

NameRequiredDescriptionDefault
baseNoCurrency code every figure is expressed in: USD, EUR, GBP, CAD… Default USD.
unitsNoWhat the holdings' numbers are: 'money' (amounts in the base currency) or 'weights' (percentages or fractions). Omitted: holdings adding up to 1 or 100 are read as percentages, anything else as money, and the answer says so.
holdingsYesWhat is held: {ticker: number}, 1 to 100 holdings. Weights in any scale (60/20/20 or 0.6/0.2/0.2) or money amounts in the base currency (60000/20000/20000): `units` says which; without it, holdings adding up to 1 or 100 are read as percentages, anything else as money, which makes the falls come out in money. Tickers as the exchange lists them (VOO, VWCE.DE, EQQQ.DE, XAW.TO; 'CASH.USD' for cash). Example: {"VTI": 60, "VXUS": 20, "BND": 20}.

Output 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. Changed2 schema fields changed
    • changedInput schema / properties / holdings / description
      Previous value: -"What is held: {ticker: number}, 1 to 100 holdings. Weights in any scale (60/20/20 or 0.6/0.2/0.2) or money amounts in the base currency (60000/20000/20000): holdings adding up to 1 or 100 are read as percentages, anything else as money, which makes the falls come out in money. Tickers as the exchange lists them (VOO, VWCE.DE, EQQQ.DE, XAW.TO; 'CASH.USD' for cash). Example: {\"VTI\": 60, \"VXUS\": 20, \"BND\": 20}."New value: +"What is held: {ticker: number}, 1 to 100 holdings. Weights in any scale (60/20/20 or 0.6/0.2/0.2) or money amounts in the base currency (60000/20000/20000): `units` says which; without it, holdings adding up to 1 or 100 are read as percentages, anything else as money, which makes the falls come out in money. Tickers as the exchange lists them (VOO, VWCE.DE, EQQQ.DE, XAW.TO; 'CASH.USD' for cash). Example: {\"VTI\": 60, \"VXUS\": 20, \"BND\": 20}."
    • addedInput schema / properties / units
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "money",
      +        "weights"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "What the holdings' numbers are: 'money' (amounts in the base currency) or 'weights' (percentages or fractions). Omitted: holdings adding up to 1 or 100 are read as percentages, anything else as money, and the answer says so.",
      +  "title": "Units"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / base / description
      Previous value: -"Currency every figure is expressed in (USD, EUR, GBP, CAD…). Default USD."New value: +"Currency code every figure is expressed in: USD, EUR, GBP, CAD… Default USD."
    • changedInput schema / properties / holdings / description
      Previous value: -"What 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)."New value: +"What is held: {ticker: number}, 1 to 100 holdings. Weights in any scale (60/20/20 or 0.6/0.2/0.2) or money amounts in the base currency (60000/20000/20000): holdings adding up to 1 or 100 are read as percentages, anything else as money, which makes the falls come out in money. Tickers as the exchange lists them (VOO, VWCE.DE, EQQQ.DE, XAW.TO; 'CASH.USD' for cash). Example: {\"VTI\": 60, \"VXUS\": 20, \"BND\": 20}."
  3. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare read-only, non-open-world, idempotent, and non-destructive behavior. The description adds useful methodological context: risk shares are Euler contributions summing to 100%, and results cover the full record and recent years. It also clarifies boundary limitations, though it does not go into permissions or output details.

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?

The purpose is front-loaded, and the description is organized into purpose, example questions, and alternatives. It is appropriately sized for a nuanced analytical tool, though the opening sentence is dense and slightly long.

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?

With a complete input schema, output schema present, and annotations covering safety behavior, the description provides enough context about what the tool measures, how to interpret risk shares, and when to choose it over siblings. No critical invocation detail is missing.

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 the input schema already documents base, units, and holdings in detail. The description adds only general framing about holdings and price co-movement, not parameter-specific semantics. Baseline 3 is appropriate.

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 states a specific analytical resource: measuring how many independent bets a portfolio's holdings make based on co-movement, and each holding's risk contribution. It clearly distinguishes this from counting tickers and from sibling tools like look_through and measure_portfolio.

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?

It gives explicit example questions that indicate when to use the tool and names alternatives for adjacent tasks: look_through for companies inside funds, measure_portfolio for everything at once. It also states what the tool does not do, including recommendation, prediction, or tax calculation.

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