Skip to main content
Glama

Redstone Markets

Backtest a stock and ETF portfolio

backtest_portfolio
Read-onlyIdempotent

Use this when the user describes a portfolio of US stocks and ETFs with weights (e.g. "60% VTI, 40% BND", "equal parts AAPL, MSFT, NVDA") and wants to know how it would have done or how risky it is: returns over YTD, 1 year and 5 years (rebalanced quarterly), max drawdown, Sharpe, beta vs SPY and the correlation between holdings, charted against SPY. 2 to 20 holdings. Not for live brokerage accounts, trading or allocation advice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
positionsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesWhere to build and save this portfolio on Redstone
asOfYesMarket date (YYYY-MM-DD) of the latest close behind every number
holdingsYes
benchmarkYesSPY, for comparison
portfolioYesBacktest of the weights, rebalanced back to them every quarter
correlationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint, openWorldHint), and the description adds substantial context beyond them: quarterly rebalancing assumption, the specific risk metrics computed (max drawdown, Sharpe, beta vs SPY, holdings correlation), benchmarking against SPY, and the 2–20 holding bound. An agent knows exactly what analysis is performed and under what assumptions.

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 triggering condition is front-loaded and the metric enumeration is dense but each item is informative rather than filler. The one long run-on sentence carrying the metric list is slightly heavy, but nothing is redundant or off-topic.

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?

An output schema exists, so return-value structure need not be spelled out, yet the description still names the headline metrics the agent should expect. Combined with the scoping rules, size bounds and examples, an agent has everything needed to invoke this correctly on the first attempt.

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?

The nested schema already documents ticker and weight semantics, so the description only needs to add marginal value. It does so with concrete format examples ('60% VTI, 40% BND', 'equal parts AAPL, MSFT, NVDA') that illustrate the weight convention, though the '2 to 20 holdings' constraint merely restates minItems/maxItems from the schema.

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 gives a specific verb (backtest) and resource (a weighted US stock/ETF portfolio) and enumerates the exact analytic outputs produced. It is immediately distinguishable from sibling tools like compare_securities, get_security_metrics and screen_securities, which operate on single securities or screens rather than a weighted portfolio.

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?

It states clear triggering conditions ('when the user describes a portfolio ... with weights ... and wants to know how it would have done or how risky it is') and provides explicit exclusions ('Not for live brokerage accounts, trading or allocation advice'). It does not, however, name a sibling alternative for the excluded cases, so the routing guidance stops short of a full when/when-not/alternative triad.

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