Skip to main content
Glama

Qanvo Stock Screener

Backtest a trading idea

backtest_strategy

Backtest a stock or ETF trading idea in plain English with Qanvo's Strategy Lab: ten years of daily US data (from 2016), buys and sells at the next day's open, trading costs, dividends reinvested, and companies that were later delisted, compared with the S&P 500 (SPY, total return). Examples: "buy large caps when the 2-day RSI drops below 10 while above the 200-day average, sell when RSI goes above 70", "each month hold the 20 cheapest S&P 500 stocks by P/E with positive earnings growth", "hold QQQ only while it's above its 200-day average, otherwise cash".

  • No arguments: lists the starter strategies (free).

  • template: runs a starter strategy by its slug (free).

  • idea: Qanvo writes the rules (a few credits, usually fewer than a screen), runs them and saves the strategy to the user's Lab. Returns the rules as understood, what was assumed or left out, yearly returns against the S&P 500, risk and trade statistics, open positions and recent closed trades, warnings and a link to the full interactive result, where the rules can be edited and re-run for free. Pass on the warnings and the assumptions. Describe results factually as a historical test, not a recommendation.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "backtest_strategy"
  }
}

Input Schema

NameRequiredDescriptionDefault
ideaNoThe trading idea in plain English: what to buy, when to sell, which stocks or ETFs, how often to rebalance.
templateNoSlug of a starter strategy (from calling this tool with no arguments), to run it instead of an idea.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Goes well past the annotations: it discloses credit consumption with an order-of-magnitude comparison ('usually fewer than a screen'), the persistent side effect of saving the strategy to the user's Lab (consistent with readOnlyHint=false and destructiveHint=false), and the requirement to pass on warnings and assumptions. It also enumerates the returned payload in detail, which matters because there is no output schema.

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?

Front-loaded with the core promise and data assumptions, then a tight bulleted breakdown of modes, then the return contract. The three example ideas are the only long passage and they earn their space by showing phrasing the model should imitate. No filler sentences.

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 no output schema and a mutation side effect, the description must carry the return contract itself — and it does, listing rules-as-understood, assumptions, yearly returns vs SPY, risk/trade stats, positions, closed trades, warnings, and a result link. It also covers pricing, persistence, and the edit-and-rerun-for-free follow-up, leaving nothing an agent needs missing.

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?

Schema coverage is 100%, so baseline is 3; the description still adds value by clarifying the two parameters are alternative entry points (no args → list, template → run a listed slug, idea → author new rules) and by characterizing what a well-formed idea must specify. It does not add syntax or format guidance beyond what the schema already says.

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?

Names a specific verb+resource ('Backtest a stock or ETF trading idea') and immediately bounds it with concrete scope: ten years of US daily data from 2016, next-day-open fills, costs, dividends, delisted names, benchmark against SPY. The three examples of valid ideas make the resource unambiguous and clearly separate it from quote/data siblings like market_query.

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?

Explicitly enumerates the three invocation modes and their costs: no arguments lists free starter strategies, template runs a slug free, idea spends credits and saves to the user's Lab. It also states the template slug comes from the no-argument call, which prevents a common misuse. It stops short of naming when-not-to-use or a sibling alternative, so it is not a full 5.

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