Skip to main content
Glama
janorium-mcp

janorium-mcp

Official

Launch backtests

backtest_run

Launches persisted backtests of a saved strategy across symbols, timeframes, or start-date shifts, returning backtest IDs for status polling.

Instructions

Launches persisted backtests of a saved strategy: one per symbols × timeframes (× shifts), at most 30 per call — a wider fan-out is refused before anything launches. batch {kind:"START_DATE_SHIFT", shifts, shiftWeeks} moves from forward; SYMBOL_MATRIX names the plain fan-out. Returns {backtestIds, batchId}; then call wait {kind:"BACKTEST"}. Every run counts against the daily backtest quotas (per API key and per user). Inside a campaign the period must end before the locked region.

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": {
      "strategyId": "<strategyId>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "backtest_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesISO-8601 instant, or a date `YYYY-MM-DD` read as 00:00 UTC.
fromYesISO-8601 instant, or a date `YYYY-MM-DD` read as 00:00 UTC. Limits: from on or after 2020-01-01, to at most 24 h past now, from before to, at most 500,000 bars per run (422 PERIOD_TOO_EARLY / INVALID_PERIOD / PERIOD_TOO_LONG otherwise).
batchNo
symbolsNoDefaults to [config.instrument.symbol].
exchangeNoDefaults to config.market.exchange, then binance.
leverageNoFutures only. Defaults to config.market.futures.leverage.
marginModeNo
marketTypeNoDefaults to config.market.type.
strategyIdYes
timeframesNoDefaults to [config.instrument.timeframe].
applyFundingNo
initialCapitalNoDefaults to 10000.
strategyVersionNoPin a past revision; default is the current one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only say this is a non-read-only, non-destructive, non-idempotent call. The description adds real behavioral context beyond that: runs consume daily quotas per API key and per user (explaining non-idempotency), the call is rejected atomically when fan-out exceeds 30, and campaigns impose a period-before-locked-region precondition.

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-loads what is launched and the hard cap before the edge cases, and each sentence carries a distinct constraint (fan-out, batch semantics, return/next step, quota, campaign). The batch clause is tersely encoded and slightly cryptic on first read, but nothing is filler.

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 a 13-parameter tool with nested batch objects and no output schema, the description covers the return shape ({backtestIds, batchId}), the sequencing to wait, and the operational limits an agent most often gets wrong. What remains uncovered (funding, leverage/marginMode effects, how shifts interact with the bar limit) is secondary and largely schema-documented.

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?

With 69% schema coverage the schema documents most fields, but the description explains something the schema cannot: what batch.kind START_DATE_SHIFT actually does ('moves `from` forward' using shifts/shiftWeeks) versus SYMBOL_MATRIX being the plain fan-out. Minor fields such as applyFunding and marginMode are left to 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?

States a specific verb and resource ('Launches persisted backtests of a saved strategy') plus the fan-out rule (one per symbols × timeframes × shifts). It implicitly separates itself from a dry run via 'persisted' and from backtest_get by returning IDs rather than results, but it never names a sibling as the alternative, so the differentiation is inferred rather than stated.

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?

Gives concrete operating context: the 30-run fan-out cap that is refused before anything launches, the daily quota it consumes, the campaign period constraint, and the explicit follow-up call 'wait {kind:"BACKTEST"}'. It does not say when to prefer strategy_dry_run or optimization_create instead, so there is no exclusion guidance.

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