Skip to main content
Glama

The record, month by month

return_history
Read-onlyIdempotent

What one portfolio returned over its record: growth per year before and after inflation, best and worst months and years, every 12-month stretch, returns by month and year, and weight drift between rebalances. Typical questions: 'How did this portfolio do over the years?'; 'What was its worst year?'; 'Returns after inflation, please.'. Instead: for crises only, past_crises. For money put in every month, monthly_plan. Past record, not a forecast. 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
cagrNoGrowth per year over the record.
dataNoWhere the prices came from and what was missing or repaired.
gridNoMonthly returns: one row per year, null where the record has no month.
driftNoPer holding: target weight and how far it drifted between rebalances.
statsNobest_month, worst_month, best_year, worst_year, pct_positive, n_months, var95, cvar95, real_cagr (after inflation).
yearsNoCalendar years.
_fenceYesWhat these figures are and are not: descriptive, no forecast, no advice. Repeat its sense when presenting the result.
monthsNoMonth names, aligned with each row of `grid`.
yearlyNoReturn per calendar year, aligned with `years`.
distributionNoHistogram of monthly returns: centers, counts.
rolling_statsNoAny 12 months in a row: min, max, percentiles, share negative.

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.7/5.0
Behavior5/5

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

The annotations already establish read-only, idempotent, non-destructive, and closed-world behavior, while the description adds meaningful boundaries beyond that: it does not forecast, recommend, predict, or calculate tax. It also discloses that inflation-adjusted returns and rebalance weight drift are included, which helps the agent understand the scope of analysis.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is front-loaded with the core purpose, then lists outputs, typical questions, alternatives, and limitations. Every clause is informative and there is no redundant restatement of the title or schema.

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?

Given rich annotations, full schema description coverage, and an output schema, the description is complete enough for correct selection and invocation. It covers purpose, alternatives, output scope, and explicit non-goals.

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%, and the input schema already explains base, units, and the holdings object in detail, including currency codes, money-vs-weight inference, ticker formatting, and examples. The description adds no parameter-specific guidance beyond that, so the 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 verb and resource ('what one portfolio returned over its record') and enumerates the concrete outputs: annual growth before/after inflation, best/worst months and years, rolling 12-month stretches, calendar returns, and rebalance drift. It also distinguishes itself from sibling tools by explicitly naming past_crises and monthly_plan as alternatives.

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 typical user questions that select this tool, and explicitly routes two adjacent use cases to alternatives: crises-only analysis to past_crises and recurring contributions to monthly_plan. It also clarifies the tool is for past performance, not forecasting.

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