Skip to main content
Glama

Test and scan a strategy

strategy
Read-onlyIdempotent

A trading rule of your own, run on what we recorded. view: fields (what a rule may name: price, moving averages, RSI, whale dollars bought and sold, forced closes, the fee for holding a bet, open positions; the rule's shape and rules to start from), backtest (default with a rule: every trade it would have made on up to 20 coins over about 30 days of hours, or days back to 5 years of price for the top coins, with counts, averages, the deepest fall and holding the coin instead), scan (which coins its entry conditions are true on now). Past trades on recorded data, fees taken off.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "strategy"
  }
}

Input Schema

NameRequiredDescriptionDefault
ruleNo{"side":"long"|"short","entry":{"all":[{"field","op","value"|"ref"}]},"exit":{"after_bars","take_profit_pct","stop_loss_pct","when"},"fee_pct"}
viewNoWhich lane; see the description.
coinsNoCoins, a list or "BTC,ETH". Up to 20 for a backtest; a scan with none checks every streamed coin.
cursorNoNext page: the cursor from the previous answer.
detailNobrief (default): the answer, key numbers and top rows. full: every row, paged with cursor.
packetsNoscan only: false leaves each match's packet off.
templateNoA rule to start from, by key (see view fields). `rule` is laid over it.
timeframeNo1h (default) or 1d.
within_barsNoscan only: a match on one of the last N bars counts (default 1).

Output Schema

NameRequiredDescriptionDefault
as_ofNoData time, ISO.
caveatNoA real limit, when non-null.
cursorNoNext page (detail full).
delayedNoSet when not live.
summaryNoThe answer in one sentence.
as_of_msNoData time, Unix ms.
availableNoFalse: no data; note says why.
truncatedNoLists shortened to their top rows; trimmed has shown of all per list and note says it in words.
next_toolsNoFollow-up calls {tool,args,why}.
access_noteNoWhat this connection could not return.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / packets
      Added value: +{
      +  "description": "scan only: false leaves each match's packet off.",
      +  "type": "boolean"
      +}
  2. Added

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the read-only annotations, the description discloses important behavior: results are based on recorded past trades, fees are deducted, backtests cover up to 20 coins with specific time ranges, and scan checks current conditions. It still leaves some operational details, such as rate limits or authentication needs, unstated.

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?

The content is relevant and appropriately sized for a complex multi-mode tool, but it is written as a dense run-on paragraph with nested parentheticals. Restructuring the views into separate sentences or bullets would improve scanability without removing information.

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?

Given the tool's complexity, nine parameters, and the presence of an output schema, the description covers the essential behavior: purpose, three modes, rule syntax, backtest scope, scan semantics, and fee treatment. It is largely complete, though the interaction between some secondary parameters and the modes is left to the schema.

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?

Schema coverage is already 100%, but the description adds real meaning for the key `rule` and `view` parameters by explaining allowed rule fields, rule shape, templates, and the default behavior of `backtest`. It does not add much beyond the schema for secondary parameters like `cursor`, `detail`, or `packets`.

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 capability: running a user-defined trading rule against recorded market data, with three named views. It is clearly more than a restatement of the title, though it does not explicitly distinguish this tool from siblings such as signals or market_screener.

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 useful mode-level context: fields reveals rule syntax and templates, backtest is the default when a rule is supplied, and scan checks current entry conditions. However, it does not say when to choose this tool over sibling tools or when not to use it, leaving the broader usage decision 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