Skip to main content
Glama
janorium-mcp

janorium-mcp

Official

Monte Carlo over trades

backtest_monte_carlo
Idempotent

Resamples a backtest's stored trades to estimate risk: returns p5/p50/p95 and mean final equity, return and max drawdown, plus probability of ruin. Use it to gauge strategy robustness.

Instructions

Resamples the stored trades. Returns p5/p50/p95 and the mean of final equity, return and max drawdown (p25/p75/min/max, the equity bands and the drawdown histogram of GET /backtests/{id}/monte-carlo are left out), plus probabilityOfRuinPct — the REST field name. Under SHUFFLE the final-equity spread is zero by construction — read the drawdown distribution. Inside a campaign it counts toward the robustness gate of the backtest's config.

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": {
      "backtestId": "<backtestId>"
    },
    "name": "backtest_monte_carlo"
  }
}

Input Schema

NameRequiredDescriptionDefault
runsNo
seedNo
methodNoBOOTSTRAP
ruinPctNo
backtestIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

Beyond the annotations, the description discloses concrete behavioral traits: which summary statistics are returned, which REST fields (p25/p75/min/max, equity bands, drawdown histogram) are deliberately omitted, and the important caveat that SHUFFLE yields zero final-equity spread by construction. It does not explain why readOnlyHint is false for what reads like a computation, which is the one behavioral gap left.

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 purpose is front-loaded and every clause carries information — the omitted-field parenthetical and the SHUFFLE warning both prevent real mistakes. The prose is dense and parenthetical-heavy, and the "probabilityOfRuinPct — the REST field name" aside is cryptic, but there is little outright waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description does the necessary work of specifying return statistics and their exclusions, and it flags campaign participation. However, a five-parameter tool with zero schema coverage leaves the agent guessing on runs, seed, and ruinPct, which is a meaningful completeness gap for a statistical simulation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across five parameters, so the description must compensate, and it largely does not: runs, seed, and ruinPct are never explained. Only the method enum gets partial treatment (SHUFFLE behavior), and the mention of probabilityOfRuinPct is about a return field name rather than the ruinPct threshold parameter.

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 opens with a specific verb+resource ("Resamples the stored trades") and then enumerates the statistics it computes, which lets an agent distinguish it from plain retrieval tools like backtest_get or backtest_trades. It never names a sibling it should be preferred over, but the operation itself is unambiguous.

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 context is implied and partially stated: "Inside a campaign it counts toward the robustness gate of the backtest's config" tells the agent about a downstream consumer, and the SHUFFLE note tells it how to read results under that method. There is no explicit when-to-use/when-not guidance relative to alternatives such as backtest_risk_scaling, so selection still requires inference.

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