Skip to main content
Glama

rule_backtest

Replay one fixed, published rule over resolved Polymarket markets from a derived store of on-chain daily closes: favorite_hold (buy the side at or above p on its first such day), longshot_hold (buy the side at or below p), late_entry (buy the favourite N days before the end date) or momentum_1w (buy in the direction of a one-week move). Pick a category (an event tag) and a date range; you get hit rate, mean and median return, drawdown, Brier score, a calibration table by entry price, results by year, a sample of matched markets and the exact method. Deterministic, no LLM, no buyer code. History, not a prediction; informational only. Price $0.25 per call, paid with USDC over x402.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoYYYY-MM-DD, last resolution day
fromNoYYYY-MM-DD, first resolution day
ruleYesthe rule to replay (see the route description)
categoryNo"all" or an event tag with at least 200 resolved markets
thresholdNofavorite_hold 0.55–0.99, longshot_hold 0.01–0.45, momentum_1w 0.02–0.50
min_volume_usdNo1000–10000000
days_before_endNolate_entry only: 1–60

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It explicitly discloses that the tool is deterministic, runs no LLM and no buyer code, returns history rather than prediction, and costs $0.25 paid via x402/USDC. This goes well beyond a bare 'runs a backtest' statement, though it omits details like authentication or rate limits.

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?

The description is long but dense: the opening sentence states the core action and rule options, the second gives selection instructions and expected outputs, and the remaining sentences add determinism, informational caveat, and pricing. Every clause contributes; there is no filler or repetition of the schema.

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 no output schema and no annotations, the description compensates by listing the outputs (hit rate, return stats, drawdown, Brier score, calibration table, results by year, sample markets, exact method) and key behavioral caveats. It could still mention defaults for the optional parameters and any error conditions, but the essential context for invoking the tool is present.

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 100%, so the schema already documents all seven parameters. The description adds value by defining each rule strategy (e.g., favorite_hold 'buy the side at or above p on its first such day'), which clarifies how threshold, days_before_end, and rule interact. It also clarifies category as an event tag and frames from/to as a date range.

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 precise action ('Replay') on a specific resource ('resolved Polymarket markets from a derived store of on-chain daily closes') and enumerates the four rule variants. This makes the tool's function unmistakable and sets it apart from the sibling tools, which are check/scrape/report utilities.

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?

Gives clear operating context: pick a category and date range, and notes the tool is informational, deterministic, and historical. It does not explicitly name alternatives or exclusions among siblings, but the context is sufficient for an agent to recognize when a historical backtest is appropriate.

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