Skip to main content
Glama

Run a backtest report

report
Read-only

Run a backtest and show its results. Supply strategyExplanation in plain terms for the widget. In your reply, explain the rule, always show Return vs. SPY (summary.returnVsSpyPct in percentage points, or Unavailable), and give one takeaway or limit supported by the report. Choose any additional cards using stats. Use scoreSeries for a separate score panel. Use chartSeries to select named report series and set their legend labels, line or bar types, colors, and line patterns. Keep the interpretation about this historical test. To publish this exact result later, pass its reportId to save_strategy after the user asks to save it to the website.

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": {
      "run": "<run>"
    },
    "name": "report"
  }
}

Input Schema

NameRequiredDescriptionDefault
runYes
statsNo
chartSeriesNo
scoreSeriesNoNamed report series to draw in the separate score panel.
strategyExplanationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changed
    • removedInput schema / properties / chartSeries / description
      Removed value: -"Additional price-panel plots. Reference named engine report series. Set a legend label, line or bar type, line pattern, and optional hex color."
    • removedInput schema / properties / chartSeries / items
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "color": {
      -      "pattern": "^#[0-9a-fA-F]{6}$",
      -      "type": "string"
      -    },
      -    "label": {
      -      "maxLength": 80,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "seriesId": {
      -      "maxLength": 100,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "style": {
      -      "default": "solid",
      -      "enum": [
      -        "solid",
      -        "dashed",
      -        "dotted"
      -      ],
      -      "type": "string"
      -    },
      -    "type": {
      -      "default": "line",
      -      "enum": [
      -        "line",
      -        "bar"
      -      ],
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "seriesId"
      -  ],
      -  "type": "object"
      -}
    • removedInput schema / properties / chartSeries / maxItems
      Removed value: -12
    • removedInput schema / properties / chartSeries / type
      Removed value: -"array"
    • removedInput schema / properties / run / additionalProperties
      Removed value: -false
    • removedInput schema / properties / run / properties
      Removed value: -{
      -  "data": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "end": {
      -        "type": "string"
      -      },
      -      "interval": {
      -        "enum": [
      -          "1min",
      -          "5min",
      -          "15min",
      -          "30min",
      -          "1hour"
      -        ],
      -        "type": "string"
      -      },
      -      "source": {
      -        "enum": [
      -          "price-api",
      -          "intraday-api"
      -        ],
      -        "type": "string"
      -      },
      -      "start": {
      -        "type": "string"
      -      },
      -      "tickers": {
      -        "items": {
      -          "pattern": "^[A-Z0-9][A-Z0-9.-]{0,11}$",
      -          "type": "string"
      -        },
      -        "minItems": 1,
      -        "type": "array"
      -      }
      -    },
      -    "required": [
      -      "tickers",
      -      "start",
      -      "end",
      -      "source"
      -    ],
      -    "type": "object"
      -  },
      -  "money": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "benchmark": {
      -        "const": "SPY",
      -        "default": "SPY",
      -        "type": "string"
      -      },
      -      "capital": {
      -        "exclusiveMinimum": 0,
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "capital"
      -    ],
      -    "type": "object"
      -  },
      -  "series": {
      -    "default": [],
      -    "items": {
      -      "anyOf": [
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "field": {
      -              "enum": [
      -                "open",
      -                "high",
      -                "low",
      -                "close",
      -                "volume"
      -              ],
      -              "type": "string"
      -            },
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "lag": {
      -              "minimum": 0,
      -              "type": "integer"
      -            },
      -            "op": {
      -              "const": "price",
      -              "type": "string"
      -            },
      -            "ticker": {
      -              "pattern": "^[A-Z0-9][A-Z0-9.-]{0,11}$",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "op",
      -            "ticker",
      -            "field",
      -            "lag"
      -          ],
      -          "type": "object"
      -        },
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "lag": {
      -              "minimum": 0,
      -              "type": "integer"
      -            },
      -            "op": {
      -              "const": "observations",
      -              "type": "string"
      -            },
      -            "points": {
      -              "items": {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "knownAt": {
      -                    "anyOf": [
      -                      {
      -                        "type": "string"
      -                      },
      -                      {
      -                        "type": "string"
      -                      }
      -                    ]
      -                  },
      -                  "observedAt": {
      -                    "anyOf": [
      -                      {
      -                        "type": "string"
      -                      },
      -                      {
      -                        "type": "string"
      -                      }
      -                    ]
      -                  },
      -                  "value": {
      -                    "type": "number"
      -                  }
      -                },
      -                "required": [
      -                  "observedAt",
      -                  "knownAt",
      -                  "value"
      -                ],
      -                "type": "object"
      -              },
      -              "minItems": 1,
      -              "type": "array"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "op",
      -            "points",
      -            "lag"
      -          ],
      -          "type": "object"
      -        },
      -        {
      -          "additionalProperties": false,
      -          "description": "Running sum, high, low, or first value since the session start. With bars, only the first bars of each session count; the value is null until they finish, then held for the rest of the session.",
      -          "properties": {
      -            "agg": {
      -              "enum": [
      -                "sum",
      -                "high",
      -                "low",
      -                "first"
      -              ],
      -              "type": "string"
      -            },
      -            "bars": {
      -              "exclusiveMinimum": 0,
      -              "type": "integer"
      -            },
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "input": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "lag": {
      -              "minimum": 0,
      -              "type": "integer"
      -            },
      -            "op": {
      -              "const": "session",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "op",
      -            "input",
      -            "agg",
      -            "lag"
      -          ],
      -          "type": "object"
      -        },
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "input": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "lag": {
      -              "exclusiveMinimum": 0,
      -              "type": "integer"
      -            },
      -            "op": {
      -              "const": "lag",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "op",
      -            "input",
      -            "lag"
      -          ],
      -          "type": "object"
      -        },
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "input": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "lag": {
      -              "minimum": 0,
      -              "type": "integer"
      -            },
      -            "op": {
      -              "enum": [
      -                "average",
      -                "high",
      -                "low",
      -                "sum",
      -                "change",
      -                "stddev"
      -              ],
      -              "type": "string"
      -            },
      -            "window": {
      -              "exclusiveMinimum": 0,
      -              "type": "integer"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "op",
      -            "input",
      -            "window",
      -            "lag"
      -          ],
      -          "type": "object"
      -        },
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "alpha": {
      -              "exclusiveMinimum": 0,
      -              "maximum": 1,
      -              "type": "number"
      -            },
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "input": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "lag": {
      -              "minimum": 0,
      -              "type": "integer"
      -            },
      -            "op": {
      -              "const": "smooth",
      -              "type": "string"
      -            },
      -            "window": {
      -              "exclusiveMinimum": 0,
      -              "type": "integer"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "op",
      -            "input",
      -            "window",
      -            "alpha",
      -            "lag"
      -          ],
      -          "type": "object"
      -        },
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "lag": {
      -              "minimum": 0,
      -              "type": "integer"
      -            },
      -            "left": {
      -              "anyOf": [
      -                {
      -                  "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "number"
      -                }
      -              ]
      -            },
      -            "op": {
      -              "enum": [
      -                "add",
      -                "subtract",
      -                "multiply",
      -                "ratio",
      -                "min",
      -                "max"
      -              ],
      -              "type": "string"
      -            },
      -            "right": {
      -              "anyOf": [
      -                {
      -                  "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "number"
      -                }
      -              ]
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "op",
      -            "left",
      -            "right",
      -            "lag"
      -          ],
      -          "type": "object"
      -        },
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "input": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "lag": {
      -              "minimum": 0,
      -              "type": "integer"
      -            },
      -            "op": {
      -              "const": "rank",
      -              "type": "string"
      -            },
      -            "order": {
      -              "enum": [
      -                "ascending",
      -                "descending"
      -              ],
      -              "type": "string"
      -            },
      -            "peers": {
      -              "items": {
      -                "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                "type": "string"
      -              },
      -              "minItems": 2,
      -              "type": "array"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "op",
      -            "input",
      -            "peers",
      -            "order",
      -            "lag"
      -          ],
      -          "type": "object"
      -        },
      -        {
      -          "additionalProperties": false,
      -          "description": "A level that moves only one way. Up: the larger of input and its own prior value, and it restarts at input after the prior price closes below it. Down is the reverse. Use it for Supertrend style bands.",
      -          "properties": {
      -            "direction": {
      -              "enum": [
      -                "up",
      -                "down"
      -              ],
      -              "type": "string"
      -            },
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "input": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "lag": {
      -              "minimum": 0,
      -              "type": "integer"
      -            },
      -            "op": {
      -              "const": "ratchet",
      -              "type": "string"
      -            },
      -            "price": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "op",
      -            "input",
      -            "price",
      -            "direction",
      -            "lag"
      -          ],
      -          "type": "object"
      -        },
      -        {
      -          "additionalProperties": false,
      -          "description": "Swing high or low of input: a value beyond the span values before it and not passed by the span values after it. Known only span bars later. back 0 is the latest swing, 1 the one before. read returns another series at that swing bar.",
      -          "properties": {
      -            "back": {
      -              "minimum": 0,
      -              "type": "integer"
      -            },
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "input": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "kind": {
      -              "enum": [
      -                "high",
      -                "low"
      -              ],
      -              "type": "string"
      -            },
      -            "lag": {
      -              "minimum": 0,
      -              "type": "integer"
      -            },
      -            "op": {
      -              "const": "pivot",
      -              "type": "string"
      -            },
      -            "read": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "span": {
      -              "exclusiveMinimum": 0,
      -              "type": "integer"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "op",
      -            "input",
      -            "kind",
      -            "span",
      -            "back",
      -            "lag"
      -          ],
      -          "type": "object"
      -        }
      -      ]
      -    },
      -    "type": "array"
      -  },
      -  "signals": {
      -    "default": [],
      -    "items": {
      -      "anyOf": [
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "left": {
      -              "anyOf": [
      -                {
      -                  "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "number"
      -                }
      -              ]
      -            },
      -            "op": {
      -              "enum": [
      -                "above",
      -                "below",
      -                "crossAbove",
      -                "crossBelow"
      -              ],
      -              "type": "string"
      -            },
      -            "right": {
      -              "anyOf": [
      -                {
      -                  "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "number"
      -                }
      -              ]
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "op",
      -            "left",
      -            "right"
      -          ],
      -          "type": "object"
      -        },
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "inputs": {
      -              "items": {
      -                "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                "type": "string"
      -              },
      -              "minItems": 2,
      -              "type": "array"
      -            },
      -            "op": {
      -              "enum": [
      -                "and",
      -                "or"
      -              ],
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "op",
      -            "inputs"
      -          ],
      -          "type": "object"
      -        },
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "input": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "op": {
      -              "const": "not",
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "op",
      -            "input"
      -          ],
      -          "type": "object"
      -        },
      -        {
      -          "additionalProperties": false,
      -          "properties": {
      -            "field": {
      -              "enum": [
      -                "month",
      -                "day",
      -                "firstSessionOfMonth",
      -                "utcMinute"
      -              ],
      -              "type": "string"
      -            },
      -            "id": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "op": {
      -              "const": "calendar",
      -              "type": "string"
      -            },
      -            "values": {
      -              "items": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "minItems": 1,
      -              "type": "array"
      -            }
      -          },
      -          "required": [
      -            "id",
      -            "op",
      -            "field",
      -            "values"
      -          ],
      -          "type": "object"
      -        }
      -      ]
      -    },
      -    "type": "array"
      -  },
      -  "simulation": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "allocation": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "targets": {
      -            "items": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "ticker": {
      -                  "pattern": "^[A-Z0-9][A-Z0-9.-]{0,11}$",
      -                  "type": "string"
      -                },
      -                "weight": {
      -                  "anyOf": [
      -                    {
      -                      "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "exclusiveMinimum": 0,
      -                      "maximum": 1,
      -                      "type": "number"
      -                    }
      -                  ],
      -                  "description": "A number, or a series read on the rebalance date. A series weight must be 0 to 1."
      -                },
      -                "when": {
      -                  "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "ticker",
      -                "when",
      -                "weight"
      -              ],
      -              "type": "object"
      -            },
      -            "minItems": 1,
      -            "type": "array"
      -          },
      -          "when": {
      -            "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "when",
      -          "targets"
      -        ],
      -        "type": "object"
      -      },
      -      "feeBps": {
      -        "default": 0,
      -        "maximum": 10000,
      -        "minimum": 0,
      -        "type": "number"
      -      },
      -      "fillTiming": {
      -        "enum": [
      -          "nextOpen",
      -          "nextClose"
      -        ],
      -        "type": "string"
      -      },
      -      "positions": {
      -        "default": [],
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "add": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "distance": {
      -                  "anyOf": [
      -                    {
      -                      "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                      "type": "string"
      -                    },
      -                    {
      -                      "type": "number"
      -                    }
      -                  ]
      -                },
      -                "maxUnits": {
      -                  "exclusiveMinimum": 0,
      -                  "minimum": 2,
      -                  "type": "integer"
      -                }
      -              },
      -              "required": [
      -                "distance",
      -                "maxUnits"
      -              ],
      -              "type": "object"
      -            },
      -            "closeStopPct": {
      -              "exclusiveMinimum": 0,
      -              "maximum": 100,
      -              "type": "number"
      -            },
      -            "closeTargetPct": {
      -              "exclusiveMinimum": 0,
      -              "type": "number"
      -            },
      -            "direction": {
      -              "enum": [
      -                "long",
      -                "short"
      -              ],
      -              "type": "string"
      -            },
      -            "enter": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "exit": {
      -              "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -              "type": "string"
      -            },
      -            "option": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "expiry": {
      -                  "type": "string"
      -                },
      -                "premium": {
      -                  "exclusiveMinimum": 0,
      -                  "type": "number"
      -                },
      -                "right": {
      -                  "enum": [
      -                    "call",
      -                    "put"
      -                  ],
      -                  "type": "string"
      -                },
      -                "strike": {
      -                  "exclusiveMinimum": 0,
      -                  "type": "number"
      -                }
      -              },
      -              "required": [
      -                "right",
      -                "strike",
      -                "premium",
      -                "expiry"
      -              ],
      -              "type": "object"
      -            },
      -            "size": {
      -              "anyOf": [
      -                {
      -                  "additionalProperties": false,
      -                  "properties": {
      -                    "fraction": {
      -                      "exclusiveMinimum": 0,
      -                      "maximum": 1,
      -                      "type": "number"
      -                    },
      -                    "kind": {
      -                      "const": "fraction",
      -                      "type": "string"
      -                    }
      -                  },
      -                  "required": [
      -                    "kind",
      -                    "fraction"
      -                  ],
      -                  "type": "object"
      -                },
      -                {
      -                  "additionalProperties": false,
      -                  "properties": {
      -                    "distance": {
      -                      "anyOf": [
      -                        {
      -                          "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                          "type": "string"
      -                        },
      -                        {
      -                          "type": "number"
      -                        }
      -                      ]
      -                    },
      -                    "kind": {
      -                      "const": "risk",
      -                      "type": "string"
      -                    },
      -                    "maxFraction": {
      -                      "exclusiveMinimum": 0,
      -                      "maximum": 1,
      -                      "type": "number"
      -                    },
      -                    "riskFraction": {
      -                      "exclusiveMinimum": 0,
      -                      "maximum": 1,
      -                      "type": "number"
      -                    }
      -                  },
      -                  "required": [
      -                    "kind",
      -                    "riskFraction",
      -                    "maxFraction",
      -                    "distance"
      -                  ],
      -                  "type": "object"
      -                }
      -              ]
      -            },
      -            "stopDistance": {
      -              "anyOf": [
      -                {
      -                  "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "number"
      -                }
      -              ]
      -            },
      -            "targetDistance": {
      -              "anyOf": [
      -                {
      -                  "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "number"
      -                }
      -              ]
      -            },
      -            "ticker": {
      -              "pattern": "^[A-Z0-9][A-Z0-9.-]{0,11}$",
      -              "type": "string"
      -            },
      -            "trailDistance": {
      -              "anyOf": [
      -                {
      -                  "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "number"
      -                }
      -              ],
      -              "description": "Trailing stop: distance below the highest high since entry for a long, or above the lowest low for a short. It moves only in the trade's favor and applies from the next bar."
      -            }
      -          },
      -          "required": [
      -            "ticker",
      -            "direction",
      -            "enter",
      -            "size"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "sleeves": {
      -        "items": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "allocation": {
      -              "additionalProperties": false,
      -              "properties": {
      -                "targets": {
      -                  "items": {
      -                    "additionalProperties": false,
      -                    "properties": {
      -                      "ticker": {
      -                        "pattern": "^[A-Z0-9][A-Z0-9.-]{0,11}$",
      -                        "type": "string"
      -                      },
      -                      "weight": {
      -                        "anyOf": [
      -                          {
      -                            "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                            "type": "string"
      -                          },
      -                          {
      -                            "exclusiveMinimum": 0,
      -                            "maximum": 1,
      -                            "type": "number"
      -                          }
      -                        ],
      -                        "description": "A number, or a series read on the rebalance date. A series weight must be 0 to 1."
      -                      },
      -                      "when": {
      -                        "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                        "type": "string"
      -                      }
      -                    },
      -                    "required": [
      -                      "ticker",
      -                      "when",
      -                      "weight"
      -                    ],
      -                    "type": "object"
      -                  },
      -                  "minItems": 1,
      -                  "type": "array"
      -                },
      -                "when": {
      -                  "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "when",
      -                "targets"
      -              ],
      -              "type": "object"
      -            },
      -            "positions": {
      -              "default": [],
      -              "items": {
      -                "additionalProperties": false,
      -                "properties": {
      -                  "add": {
      -                    "additionalProperties": false,
      -                    "properties": {
      -                      "distance": {
      -                        "anyOf": [
      -                          {
      -                            "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                            "type": "string"
      -                          },
      -                          {
      -                            "type": "number"
      -                          }
      -                        ]
      -                      },
      -                      "maxUnits": {
      -                        "exclusiveMinimum": 0,
      -                        "minimum": 2,
      -                        "type": "integer"
      -                      }
      -                    },
      -                    "required": [
      -                      "distance",
      -                      "maxUnits"
      -                    ],
      -                    "type": "object"
      -                  },
      -                  "closeStopPct": {
      -                    "exclusiveMinimum": 0,
      -                    "maximum": 100,
      -                    "type": "number"
      -                  },
      -                  "closeTargetPct": {
      -                    "exclusiveMinimum": 0,
      -                    "type": "number"
      -                  },
      -                  "direction": {
      -                    "enum": [
      -                      "long",
      -                      "short"
      -                    ],
      -                    "type": "string"
      -                  },
      -                  "enter": {
      -                    "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                    "type": "string"
      -                  },
      -                  "exit": {
      -                    "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                    "type": "string"
      -                  },
      -                  "option": {
      -                    "additionalProperties": false,
      -                    "properties": {
      -                      "expiry": {
      -                        "type": "string"
      -                      },
      -                      "premium": {
      -                        "exclusiveMinimum": 0,
      -                        "type": "number"
      -                      },
      -                      "right": {
      -                        "enum": [
      -                          "call",
      -                          "put"
      -                        ],
      -                        "type": "string"
      -                      },
      -                      "strike": {
      -                        "exclusiveMinimum": 0,
      -                        "type": "number"
      -                      }
      -                    },
      -                    "required": [
      -                      "right",
      -                      "strike",
      -                      "premium",
      -                      "expiry"
      -                    ],
      -                    "type": "object"
      -                  },
      -                  "size": {
      -                    "anyOf": [
      -                      {
      -                        "additionalProperties": false,
      -                        "properties": {
      -                          "fraction": {
      -                            "exclusiveMinimum": 0,
      -                            "maximum": 1,
      -                            "type": "number"
      -                          },
      -                          "kind": {
      -                            "const": "fraction",
      -                            "type": "string"
      -                          }
      -                        },
      -                        "required": [
      -                          "kind",
      -                          "fraction"
      -                        ],
      -                        "type": "object"
      -                      },
      -                      {
      -                        "additionalProperties": false,
      -                        "properties": {
      -                          "distance": {
      -                            "anyOf": [
      -                              {
      -                                "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                                "type": "string"
      -                              },
      -                              {
      -                                "type": "number"
      -                              }
      -                            ]
      -                          },
      -                          "kind": {
      -                            "const": "risk",
      -                            "type": "string"
      -                          },
      -                          "maxFraction": {
      -                            "exclusiveMinimum": 0,
      -                            "maximum": 1,
      -                            "type": "number"
      -                          },
      -                          "riskFraction": {
      -                            "exclusiveMinimum": 0,
      -                            "maximum": 1,
      -                            "type": "number"
      -                          }
      -                        },
      -                        "required": [
      -                          "kind",
      -                          "riskFraction",
      -                          "maxFraction",
      -                          "distance"
      -                        ],
      -                        "type": "object"
      -                      }
      -                    ]
      -                  },
      -                  "stopDistance": {
      -                    "anyOf": [
      -                      {
      -                        "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                        "type": "string"
      -                      },
      -                      {
      -                        "type": "number"
      -                      }
      -                    ]
      -                  },
      -                  "targetDistance": {
      -                    "anyOf": [
      -                      {
      -                        "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                        "type": "string"
      -                      },
      -                      {
      -                        "type": "number"
      -                      }
      -                    ]
      -                  },
      -                  "ticker": {
      -                    "pattern": "^[A-Z0-9][A-Z0-9.-]{0,11}$",
      -                    "type": "string"
      -                  },
      -                  "trailDistance": {
      -                    "anyOf": [
      -                      {
      -                        "pattern": "^[A-Za-z][A-Za-z0-9_]*$",
      -                        "type": "string"
      -                      },
      -                      {
      -                        "type": "number"
      -                      }
      -                    ],
      -                    "description": "Trailing stop: distance below the highest high since entry for a long, or above the lowest low for a short. It moves only in the trade's favor and applies from the next bar."
      -                  }
      -                },
      -                "required": [
      -                  "ticker",
      -                  "direction",
      -                  "enter",
      -                  "size"
      -                ],
      -                "type": "object"
      -              },
      -              "type": "array"
      -            },
      -            "weight": {
      -              "exclusiveMinimum": 0,
      -              "maximum": 1,
      -              "type": "number"
      -            }
      -          },
      -          "required": [
      -            "weight"
      -          ],
      -          "type": "object"
      -        },
      -        "minItems": 1,
      -        "type": "array"
      -      },
      -      "slippageBps": {
      -        "default": 0,
      -        "exclusiveMaximum": 10000,
      -        "minimum": 0,
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "fillTiming"
      -    ],
      -    "type": "object"
      -  },
      -  "version": {
      -    "const": 2,
      -    "type": "number"
      -  }
      -}
    • removedInput schema / properties / run / required
      Removed value: -[
      -  "version",
      -  "data"
      -]
    • removedInput schema / properties / run / type
      Removed value: -"object"
    • removedInput schema / properties / stats / items
      Removed value: -{
      -  "enum": [
      -    "period",
      -    "tradeCount",
      -    "fillCount",
      -    "finalValue",
      -    "returnPct",
      -    "maxDrawdownPct",
      -    "benchmarkFinalValue",
      -    "returnVsSpyPct",
      -    "winRatePct"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / stats / maxItems
      Removed value: -9
    • removedInput schema / properties / stats / type
      Removed value: -"array"
    • removedInput schema / properties / strategyExplanation / description
      Removed value: -"In 1 to 3 plain sentences, explain what the strategy trades, what triggers buys and sells or rebalancing, and one key assumption when relevant. Use the run rules. Leave historical results for the report."
    • removedInput schema / properties / strategyExplanation / maxLength
      Removed value: -600
    • removedInput schema / properties / strategyExplanation / minLength
      Removed value: -1
    • removedInput schema / properties / strategyExplanation / type
      Removed value: -"string"
  2. First observed

TDQS

A3.5/5.0
Behavior4/5

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

readOnlyHint=true already frames the safety profile, and the description adds real context beyond it: this is a historical backtest, results are identified by a reportId that must be handed to a separate write tool to be published, and one field (summary.returnVsSpyPct, in percentage points, or 'Unavailable') surfaces in the result. It omits runtime/cost characteristics and whether the backtest is long-running, which matters for a compute-heavy call.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Every sentence carries content, but the description is a densely packed run-on that interleaves output-formatting directives, parameter semantics, and cross-tool routing without paragraph breaks. The core action appears first, which helps, but the middle sags under instruction-like clauses.

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?

For a five-parameter compute tool with 20% schema coverage, no output schema, and an undescribed required parameter, the definition is only partly sufficient: it compensates well for the optional presentation parameters but leaves the mandatory 'run' payload and the overall result shape opaque. An agent could format the response but not reliably construct the request.

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 only 20%, so the description carries most of the load — and it does explain strategyExplanation (plain-terms text for the widget), stats (additional cards), scoreSeries (separate score panel), and chartSeries (named series with legend labels, line/bar types, colors, line patterns). But the one required parameter, 'run', is never described anywhere, leaving an agent unable to construct a valid call from the definition alone.

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: run a backtest and show its results, plus it clarifies that the interpretation is about a historical test. It touches the save_strategy sibling for persistence, though it never distinguishes itself from the similarly-named 'simulate' sibling.

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?

It gives clear conditional guidance for one sibling ('pass its reportId to save_strategy after the user asks to save it to the website') and for optional panels ('Use scoreSeries for a separate score panel'). However it never says when to choose this tool over simulate or build_series, so tool selection is only implied.

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