Skip to main content
Glama

Strategy grid lookup

strategy_grid_lookup
Read-onlyIdempotent

Backtest lookup: what one exact version of a strategy actually did. Buy-the-dip and the moving-average cross, every combination of their knobs, computed over nine years of real prices with the exchange's fees charged both ways — sixteen coins, three of which died. Give the coin and the numbers and you get the return, the trades, the worst drawdown, and what buying and holding did over the same window. Read from a file you can download.

Use when someone quotes a specific dip-buying or moving-average rule ("buy 10% dips, take 5%") and you want its real backtest. For leverage use leverage_survival; for a stop on a plain buy-and-hold, stop_loss_check; to judge a win rate you were shown, overfitting_odds.

Input Schema

NameRequiredDescriptionDefault
coinYesBTC, ETH, SOL, DOGE, PEPE, SRM… ticker or full pair. Ask with an unknown one and the answer lists the sixteen we hold.
dropNodip only: how far below its recent high to buy, in %.
fastNocross only: fast average.
slowNocross only: slow average.
stopNodip only: stop loss, in %.
hoursNodip only: give up after this many hours.
familyNodip (buy when it falls) or cross (moving average crossover). Defaults to dip.dip
targetNodip only: take profit, in %.
candlesNocross only: 1d or 4h.

Output Schema

NameRequiredDescriptionDefault
okNofalse when we do not hold that data. Never a zero standing in for an answer.
ruleNoThe rule in plain English.
errorNono_data when ok is false.
reasonNoWhy, in one sentence, and what we do have instead.
sourceNoThe public file these numbers come from.
tradesNoHow many trades it took.
return_pctNoWhat it returned, after fees.
try_insteadNoWhen ok is false: the closest call that does answer, ready to send (tool, arguments, and what changed).
same_coin_inNoWhen ok is false because this tool lacks the coin: the other tools that hold it, each with arguments ready to send.
win_rate_pctNoShare of winners.
buy_and_hold_pctNoWhat buying the coin and leaving it alone returned over the same window. A result without this is advertising.
max_drawdown_pctNoWorst peak-to-trough fall.
versions_in_familyNoHow many versions of this idea exist.
versions_beating_buy_and_holdNoHow many of them beat doing nothing. Often zero.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "coin": "btc"
      +  }
      +]
    • addedOutput schema / properties / same_coin_in
      Added value: +{
      +  "description": "When ok is false because this tool lacks the coin: the other tools that hold it, each with arguments ready to send.",
      +  "type": "array"
      +}
    • addedOutput schema / properties / try_instead
      Added value: +{
      +  "description": "When ok is false: the closest call that does answer, ready to send (tool, arguments, and what changed).",
      +  "type": "object"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / candles / enum
      Added value: +[
      +  "1d",
      +  "4h"
      +]
    • addedInput schema / properties / family / default
      Added value: +"dip"
    • addedInput schema / properties / family / enum
      Added value: +[
      +  "dip",
      +  "cross"
      +]
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world and non-destructive, so the safety bar is low. The description adds real provenance the annotations cannot: results come from a downloadable static file rather than live computation, over nine years of prices, sixteen coins, fees charged on both sides. It does not cover refresh cadence or result-size limits, so it stops short of a 5.

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?

Purpose and scope are front-loaded in the first clause, and the routing sentence at the end is exactly where an agent needs it. The middle sentence is rhetorically padded ('sixteen coins, three of which died', the em-dash inventory), which is characterful but slows scanning for a structured-field reader.

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?

An output schema exists, so return values need not be enumerated, and the tool is still complete: source data, coverage, alternatives and invocation shape are all present. Minor residual gaps are the interaction between family and the dip/cross-only parameters, which the description leaves to the schema.

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 100% and every parameter already carries a per-field description and family-gating note ('dip only', 'cross only'), so the schema does the heavy lifting. The description adds only a generic 'give the coin and the numbers', which hints that coin alone is sufficient but adds no syntax or defaulting detail beyond the schema. Baseline 3 is correct.

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 (backtest lookup) on a specific resource (one exact strategy version), and enumerates the two strategy families it covers (dip-buy, moving-average cross) along with the outputs returned. An agent can distinguish it from the eleven siblings without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names three alternatives with the exact condition that selects each: leverage_survival for leverage, stop_loss_check for a stop on plain buy-and-hold, overfitting_odds for judging a quoted win rate. The trigger condition ('when someone quotes a specific dip-buying or moving-average rule') is stated explicitly.

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