Skip to main content
Glama

Backtest supplied holdings

backtest_holdings
Read-onlyIdempotent

Backtest supplied holdings using historical prices and FX. Compare the chosen rebalancing rule with buy-and-hold on identical deposits and dates. Returns ending values, drawdowns and recovery. For a named crisis use stress_test_holdings. Needs complete history and no sign-in. Trading costs and personal taxes excluded.

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": {
      "portfolio": "<portfolio>",
      "startDate": "<startDate>",
      "endDate": "<endDate>",
      "initialValue": "<initialValue>"
    },
    "name": "backtest_holdings"
  }
}

Input Schema

NameRequiredDescriptionDefault
endDateYesRequested last day, 30 to 3660 days after start.
portfolioYesSupplied ISIN and cash holdings.
startDateYesRequested first day.
rebalancingNoTarget-weight reset frequency.none
initialValueYesHypothetical opening deposit in baseCurrency.
monthlyContributionNoDeposit at opening and each monthly anniversary on the next available session.

Output Schema

NameRequiredDescriptionDefault
linksYes
analysisYes
capabilityYes
computedAtYes
assumptionsYes
limitationsYes
baseCurrencyYes
modelVersionYes
seriesSamplingYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so safety is covered. The description still adds real value beyond them: exclusion of trading costs and personal taxes, the requirement for complete price history, and no sign-in — the last two materially affect whether a call can succeed or how results should be interpreted.

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?

Five short, front-loaded sentences with the core action first, then the comparison, the output, the alternative tool, and constraints. Nothing is redundant, though the fragment style ('Returns ending values, drawdowns and recovery.') trades prose flow for density.

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 an output schema present and 100% parameter coverage, the description only needs to convey intent, routing and caveats — all of which it does. The one soft spot is that the 'no sign-in' and 'complete history' constraints are stated tersely without saying what happens when history is insufficient (e.g. error vs truncated backtest).

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 all six parameters including the portfolio anyOf variants, rebalancing enum, monthlyContribution and date ranges are already documented. The description only gestures at parameters indirectly via 'identical deposits and dates' and 'the chosen rebalancing rule', adding no syntax or format detail beyond the schema. Baseline 3 applies.

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 ('Backtest supplied holdings using historical prices and FX') and adds the core comparison (rebalancing rule vs buy-and-hold on identical deposits and dates). It explicitly names the sibling it is not, stress_test_holdings, so an agent can distinguish the two without inspecting schemas.

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?

Gives an explicit routing rule ('For a named crisis use stress_test_holdings') and a prerequisite ('Needs complete history and no sign-in'). It does not address other plausible alternatives such as analyze_holdings or preview_rebalance, so the when-to-use picture is clear but not exhaustive.

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.