Skip to main content
Glama

screener_backtest

Read-onlyIdempotent

Historically replay a cross-sectional screen at every bar. Matching instruments form an equal-weight long or short portfolio, entered at the next bar open and held to the following bar open, then re-screened. Use this when the question is whether repeatedly trading screener matches worked — a single-symbol backtest of coins that match today is not a substitute. Costs follow actual portfolio turnover, so an unchanged holding is not charged as a fresh round trip.

Input Schema

NameRequiredDescriptionDefault
nameNo
logicNoDefault all.
quoteNoDefault USDC on Hyperliquid, USDT elsewhere.
rulesYes
feeBpsNoPer side. Default 4.
marketNoDefaults to the chart. Perpetuals are futures.
exchangeNoDefaults to the chart.
lookbackNoBars. Default 300.
directionNoDefault long.
timeframeNoDefaults to the chart.
slippageBpsNoPer side. Default 1.
maxPositionsNoEqual-weight slots, 1 to 50. Default 10.
universeSizeNoDefault 50.
manualSymbolsNoOptional symbols forced into the universe before current-volume ranking.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / quote / description
      Previous value: -"Default USDT."New value: +"Default USDC on Hyperliquid, USDT elsewhere."
    • addedInput schema / properties / rules / items / properties / left / properties
      Added value: +{
      +  "expression": {
      +    "type": "string"
      +  },
      +  "field": {
      +    "enum": [
      +      "open",
      +      "high",
      +      "low",
      +      "close",
      +      "volume",
      +      "quoteVolume",
      +      "trades",
      +      "change1",
      +      "change5",
      +      "rangePercent"
      +    ],
      +    "type": "string"
      +  },
      +  "kind": {
      +    "enum": [
      +      "field",
      +      "indicator",
      +      "formula",
      +      "strategy"
      +    ],
      +    "type": "string"
      +  },
      +  "name": {
      +    "type": "string"
      +  },
      +  "parameters": {
      +    "additionalProperties": {
      +      "type": "number"
      +    },
      +    "type": "object"
      +  },
      +  "params": {
      +    "additionalProperties": {
      +      "type": [
      +        "number",
      +        "string",
      +        "boolean"
      +      ]
      +    },
      +    "type": "object"
      +  },
      +  "plotKey": {
      +    "description": "Optional; defaults to the first indicator output.",
      +    "type": "string"
      +  },
      +  "strategyId": {
      +    "type": "string"
      +  },
      +  "studyId": {
      +    "description": "Indicator id, e.g. rsi or ema.",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / rules / items / properties / right / anyOf
      Added value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "properties": {
      +      "kind": {
      +        "enum": [
      +          "constant",
      +          "operand"
      +        ],
      +        "type": "string"
      +      },
      +      "operand": {
      +        "properties": {
      +          "expression": {
      +            "type": "string"
      +          },
      +          "field": {
      +            "type": "string"
      +          },
      +          "kind": {
      +            "enum": [
      +              "field",
      +              "indicator",
      +              "formula",
      +              "strategy"
      +            ],
      +            "type": "string"
      +          },
      +          "params": {
      +            "type": "object"
      +          },
      +          "plotKey": {
      +            "type": "string"
      +          },
      +          "strategyId": {
      +            "type": "string"
      +          },
      +          "studyId": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "value": {
      +        "type": "number"
      +      }
      +    },
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / rules / items / properties / right / description
      Previous value: -"A number, or another operand in the same form as left."New value: +"Use a number for a threshold: RSI >50 is {left:{kind:\"indicator\",studyId:\"rsi\"},operator:\"above\",right:50}. To compare with an indicator use {kind:\"operand\",operand:{kind:\"indicator\",studyId:\"ema\",params:{period:20}}}."
  2. Changed2 schema fields changed
    • addedInput schema / properties / exchange
      Added value: +{
      +  "description": "Defaults to the chart.",
      +  "enum": [
      +    "binance",
      +    "bybit",
      +    "okx",
      +    "hyperliquid"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / market
      Added value: +{
      +  "description": "Defaults to the chart. Perpetuals are futures.",
      +  "enum": [
      +    "spot",
      +    "futures"
      +  ],
      +  "type": "string"
      +}
  3. Changed2 schema fields changed
    • changedInput schema / properties / rules / items / properties / right / description
      Previous value: -"{\"kind\":\"constant\",\"value\":30} or {\"kind\":\"operand\",\"operand\":{…}}"New value: +"A number, or another operand in the same form as left."
    • removedInput schema / properties / rules / items / properties / right / type
      Removed value: -"object"
  4. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, openWorld, non-destructive), yet the description still adds real simulation semantics: fill timing at next-bar open, one-bar holding, and that costs track actual turnover so a carried position is not charged a fresh round trip. It omits practical cost concerns such as runtime for large lookback × universeSize combinations.

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

Conciseness5/5

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

Four tight sentences with the core mechanic front-loaded, followed by the routing discriminator and the cost-model caveat. Nothing is redundant with the title or schema.

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 14-parameter tool with no output schema, the description explains the strategy construction well but never indicates what comes back (equity curve, returns, hit rate, per-trade list) or how lookback and universeSize affect runtime and result length. Adequate but leaves a real gap around the return value.

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 description coverage is 86%, so nearly every parameter is already documented in structured data; the description's only added meaning is that slots are equal-weight (maxPositions) and that costs are per side applied to turnover (feeBps/slippageBps). It adds nothing about rules, universeSize, or manualSymbols beyond the schema. Baseline 3 is appropriate.

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 — historically replaying a cross-sectional screen at every bar — and spells out the mechanics (equal-weight long/short, entry at next bar open, held to the following bar open, then re-screened). This is clearly distinguishable from screener_run (single point-in-time screen) and backtest_run (single-symbol).

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?

Explicitly says when to use it ("when the question is whether repeatedly trading screener matches worked") and names the wrong alternative in generic terms ("a single-symbol backtest of coins that match today is not a substitute"). It stops short of naming the sibling tools backtest_run or screener_run, so routing is inferred rather than stated.

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