Skip to main content
Glama

replay_orders

Replay a backtest’s market orders against historical trades to generate fills and slippage statistics from supplied CSV and trade files.

Instructions

Replay a backtest's market orders against the trades that followed them.

orders_csv: CSV with columns time (ISO or epoch), side (+1/-1 or buy/sell), qty (base units). trades_file: Binance archive aggTrades file (.zip or .csv) or Tardis.dev trades file (.csv or .csv.gz) covering the orders' period. Writes one row per filled order (side, qty, price, ref_price, slippage_bps) to fills_csv (default: next to the orders, .fills.csv) and returns a summary. Slippage is in bps against the last trade before each order; positive = cost.

Input Schema

NameRequiredDescriptionDefault
fills_csvNo
orders_csvYes
trades_fileYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and mostly succeeds: it discloses the side effect (writes one row per filled order to fills_csv, defaulting next to the orders file), the return value (a summary), and the slippage convention including its sign. It omits overwrite behavior for fills_csv and any error/partial-fill semantics.

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 is front-loaded, then each parameter is addressed on its own line, followed by output behavior. It is dense but every clause carries information; only the output-format sentence runs long and mixes several facts.

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?

For a three-parameter file-processing tool with no output schema, the description covers inputs, output destination, row schema, and slippage sign convention. Remaining gaps are minor: what the returned summary contains and whether an existing fills_csv is overwritten.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it fully does: orders_csv's accepted time formats, side encodings, and qty units; trades_file's accepted providers and compression formats; and fills_csv's default destination. All three parameters gain meaning unavailable in the bare schema.

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 first sentence states a specific verb and resource: replay a backtest's market orders against subsequent trades. An agent knows exactly what the operation does. It does not, however, distinguish itself from siblings such as pro_replay, so the agent must infer the boundary.

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?

Usage is implied by the data-shape requirements: the trades file must cover the orders' period, and orders must be market orders. There is no explicit when-to-use guidance and no statement of when NOT to use it, nor any pointer to a sibling alternative.

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

Deploy Server

Other Tools