Skip to main content
Glama
Stochastly

Stochastly MCP

by Stochastly

backtest_graph

Run a strategy graph end to end on your own data: cost-aware backtest, leakage-free splits, overfitting gates, then a verdict, survivor count and run_id.

Instructions

Requires the Stochastly desktop app: this tool runs inside the app, which is not installed on this machine. Install it from https://stochastly.com/pricing, open it and activate a licence.

Run a strategy graph end to end on your data: build the configurations, run a cost-aware backtest with leakage-free splits, apply the overfitting gates and return the verdict, the number of survivors and the run_id. Each finished run is added to the day's session registry, and multiplicity reports how many runs and configurations this session has tried.

Check the plan with compose_graph first. Data comes from data_root or a registered source; nothing is downloaded for you and an unknown source is refused. A plan with custom Python is refused unless the user allowed custom code on this machine. Use background=true for long runs, then backtest_status. Requires an Atelier or Portfolio licence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tfNoBar timeframe, for example "1h".1h
capNoMaximum number of parameter configurations evaluated.
planYesStrategy graph, same shape as in compose_graph; node keys come from node_catalog.
sourceNoRegistered data source name from data_sources; "folder" reads data_root. An existing folder path given here is used as data_root.folder
symbolsNoSymbols to trade; omit for the default universe, which the run names in its note.
data_rootNoFolder holding your own price files.
directionNoTrade direction: "L" (long only), "S" (short only) or "LS" (both).LS
timeout_sNoSeconds to wait for the result (minimum 5); after that, poll backtest_status.
backgroundNoTrue returns a run_id at once; poll backtest_status for the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say it is a non-read-only, non-idempotent, closed-world call; the description goes much further by disclosing the session-registry side effect, the multiplicity counter, data-source refusal rules, custom-code gating, licensing, and timeout/polling behaviour. No contradiction with the annotations.

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?

Front-loaded with the hard install/licence gate, then a dense but well-ordered body covering what it does, side effects, data sources, and async pattern. Every sentence carries information, though the opening environment-specific install paragraph is bulky boilerplate relative to the core instruction.

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 9 parameters, no output schema, and a nested plan object, the description supplies the missing context: named return values, session-registry effects, prerequisite sibling calls, async workflow, and failure conditions. An agent has everything needed to invoke this correctly.

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, but the description adds real meaning: source='folder' sourcing rules, data_root vs registered source, and guidance to use background=true for long runs with timeout_s framed around backtest_status polling. Not a full parameter walkthrough, but above the schema-only baseline.

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 ('Run a strategy graph end to end on your data') and enumerates the concrete stages performed (build configurations, cost-aware backtest with leakage-free splits, overfitting gates). It also names the outputs (verdict, number of survivors, run_id), which distinguishes it clearly from compose_graph (plan validation) and backtest_status (polling).

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?

Explicit prerequisites and routing: 'Check the plan with compose_graph first', 'Use background=true for long runs, then backtest_status', and licence requirements (Atelier or Portfolio). It also states refusal conditions (unknown source, custom Python without permission), so the agent knows when the call will fail before making it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.