Skip to main content
Glama

Backtest a StockCharts scan

backtest_stockcharts_scan
Idempotent

Backtests a StockCharts.com scan on point-in-time US stocks since 2000, delisted names included: each rebalance (weekly by default) holds the stocks that pass the scan, equally weighted up to top_n, 10 bps costs. Optional symbols (e.g. a ChartList) restricts the universe. Returns the translation plus the same stats, benchmark and equity curve as run_backtest. Costs one backtest.

Input Schema

NameRequiredDescriptionDefault
endNo
scanYesStockCharts scan text.
as_ofNoPoint-in-time cutoff (YYYY-MM-DD). Nothing dated after this is returned, preventing look-ahead bias. Defaults to today (UTC).
startYes
top_nNoMax names held (default 50).
symbolsNoOptional universe, e.g. a ChartList.
rebalanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint false, idempotent, non-destructive), it discloses real behavioral detail: weekly default rebalance, equal weighting up to top_n, 10 bps costs, point-in-time delisted-inclusive universe, and a metered cost of one backtest. It does not say what happens with invalid scan syntax or whether a failed run still consumes the credit.

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?

One dense, front-loaded paragraph that leads with the verb and universe, then mechanics, then return shape. Efficient, though the run-on semicolon-free phrasing makes the methodology clauses slightly harder to parse than necessary.

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?

No output schema exists, and the description compensates by naming what comes back: the translation plus the same stats, benchmark and equity curve as run_backtest, which lets an agent plan downstream use. Missing only date-range semantics and failure behavior for malformed scan text.

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?

With 57% schema coverage, the description adds meaning for symbols (optional universe restriction, e.g. a ChartList), rebalance (weekly default) and top_n (cap). However start/end have no schema descriptions and get no explanation here either, and as_of is only handled by 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?

States a specific verb and resource (backtest a StockCharts.com scan) plus scope: point-in-time US stocks since 2000 with delisted names included. It also implicitly separates itself from translate_stockcharts_scan (this returns the translation AND results) and from run_backtest (same stats/benchmark/equity curve, but driven by a scan).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: you use it when you have StockCharts scan text and want portfolio results. The 'Costs one backtest' note gives a useful budget signal, but there is no explicit 'use translate_stockcharts_scan first to validate syntax' or any when-not guidance against run_backtest or compare_runs.

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.