Skip to main content
Glama

FILTRIX.net

simulate_strategy

Simulate an intraday trade (entry + exit rule, long or short, on 1..30-minute bars) on each event of a saved run (run_id) or of new filters (saved as a run first). Answers "what if I bought the open and sold at a 2% stop / 5% target on days like this?". The finished job's result has summary (n_trades, win_rate 0..1, profit_factor, avg_pnl and total_pnl in USD per share, avg_holding_min), up to 200 trades with pnl_pct, run_id, and a note when there are no trades or some minute bars could not be loaded. limit_pairs (max 500) events are simulated; minute bars load on demand, so it can take minutes: waits up to wait_seconds (max 50), else returns {job_id, status} to poll with get_job. Uses the plan's simulation quota. Send exactly one of run_id or filters.

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": {
      "strategy": "<strategy>"
    },
    "name": "simulate_strategy"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoWith filters: name of the run saved first.
sideNoTrade direction: long (buy) or short (sell).long
run_idNoSaved run whose events to simulate (from list_runs or save_run). Send this or filters, not both.
filtersNoNew conditions (AND-joined, columns from search_filters): saved as a run first, then simulated. Send this or run_id, not both.
outcomeNoOutcome of the run saved from filters (see get_meta); ignored with run_id.day_close_position
end_dateNoWith filters: last event date, YYYY-MM-DD.
strategyYesEntry and exit rule of the simulated trade.
start_dateNoWith filters: first event date, YYYY-MM-DD.
bar_minutesNoBar size the strategy reads, 1..30 minutes.
limit_pairsNoHow many of the run's events to simulate, 1..500.
wait_secondsNoSeconds to wait for the job to finish (0..50) before returning its job_id to poll with get_job.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations, it discloses that filters are persisted into a new run before simulation (a real side effect behind readOnlyHint=false), that simulation consumes the plan's quota, that minute bars load on demand so the call can take minutes, and exactly what comes back when time runs out. It also flags degraded results (no trades, missing minute bars), which annotations cannot express.

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 operational constraints (one of run_id/filters, timing, quota, polling) are front-loaded and every sentence carries information. The middle sentence enumerating summary fields (n_trades, win_rate, profit_factor, pnl units) is redundant given an output schema exists and could be trimmed.

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?

For an 11-parameter mutating tool with a quota and a job/poll lifecycle, the description covers side effects, latency, timeout behavior, and result shape adequately. The remaining gap is relational: it does not position itself against run_backtest, so an agent must infer that choice rather than read it.

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 coverage is 100%, and the description largely restates schema facts: limit_pairs max 500, wait_seconds max 50, and the run_id/filters exclusivity that both schema fields already state. It adds the useful performance framing that limit_pairs drives on-demand bar loading, but that is the only real increment over the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Simulate an intraday trade ... on each event of a saved run') and explains the underlying question it answers. It makes the intraday entry/exit nature unmistakable, which implicitly separates it from the daily-scale siblings, though it never names run_backtest or screen_events as alternatives.

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 gives a clear rule for the two input modes ('Send exactly one of run_id or filters') and explains the follow-on path when the job does not finish ('returns {job_id, status} to poll with get_job'). It does not cover when to prefer this over run_backtest or screen_events, so the guidance is clear but not comparative.

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