Skip to main content
Glama
agent-next

polymarket-paper-trader

by agent-next

backtest

Run a backtest using historical Polymarket price data to evaluate a trading strategy's performance. Specify data, strategy path, starting balance, spread, and depth for realistic simulation.

Instructions

Run a backtest with historical price data.

data_path: path to CSV or JSON file with historical prices strategy_path: dotted Python path to strategy function (e.g. "mymod.my_strategy") balance: starting balance (USD) spread: synthetic order book spread depth: synthetic order book depth per level

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNo
spreadNo
balanceNo
data_pathYes
strategy_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does not state whether backtest is a read-only simulation, whether it modifies account state, or what side effects (if any) it has. The absence of any such disclosure leaves the agent uncertain about safety and side effects.

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 extremely efficient: a single clear opening sentence followed by a parameter list, with each parameter on its own line. There is no filler or redundancy, and the most important information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lacks context about what happens after the backtest runs—such as whether it returns a report, whether it is a pure simulation, or whether it affects the account. It also omits details like the expected format of CSV/JSON data or the strategy function's signature. While an output schema exists (so return values need not be explained), the description does not address the tool's non-obvious behavior as a simulation, leaving an agent with incomplete guidance.

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?

The description explains each of the five parameters with concise, meaningful context that goes beyond the bare schema (which has 0% coverage). It clarifies the expected format for data_path and strategy_path, and gives sensible defaults for balance, spread, and depth. While not exhaustive, it covers all parameters and adds practical value.

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?

The description states a specific verb ('Run') and a clear resource ('a backtest') with a qualifying context ('with historical price data'). This distinguishes it from the trading actions (buy, sell) and portfolio tools among its siblings, making the purpose immediately obvious.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It does not mention that it is for simulation/testing rather than live trading, nor does it reference any sibling tools or conditions that would steer an agent toward or away from backtest.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.