Skip to main content
Glama

replay_pool_tape

Backtest a DEX position by replaying recorded swap history through the pool's curve. Returns price, reserves, LP value, impermanent loss, and drift over time.

Instructions

Backtest a DEX position from a recorded pool history. Replays a list of swaps (or decoded Uniswap v2 Swap logs) through the exact curve and returns the price / reserves / LP-value / impermanent-loss / drift series over time. Use this to evaluate an LP position or a trading sequence against a real transcript. Requires the optional flox-py dependency.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
poolYesA pool spec: {venue, token0:{symbol,decimals}, token1:{symbol,decimals}, ...venue params} -- the replay's starting state.
swapsNoSwaps as [ts, 'NUMBER SYMBOL', into?] entries. Supply this or `evm_logs`.
evm_logsNoDecoded Uniswap v2 Swap log dicts (data word order amount0In, amount1In, amount0Out, amount1Out). Supply this or `swaps`.
Behavior4/5

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

The description explains the output (price, reserves, LP-value, impermanent-loss, drift series) and mentions the optional dependency. It does not disclose potential side effects or performance implications, but for a read-only replay tool, the behavioral coverage is good.

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 three sentences with no redundancy. The first sentence states the main action, the second details outputs, and the third gives use case and dependency. It is front-loaded and every sentence is valuable.

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 absence of an output schema, the description compensates by listing return values. It also explains the relationship between parameters. However, it could mention potential data format errors or the compute-intensive nature of replaying many swaps.

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?

The description adds significant meaning beyond the schema: it explains that 'swaps' and 'evm_logs' are mutually exclusive, describes the format of evm_logs (data word order), and clarifies that 'pool' is the starting state. With 100% schema coverage, this description provides essential guidance.

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 clearly states the tool backtests a DEX position from recorded pool history by replaying swaps. It distinguishes itself from siblings like 'run_backtest' by specifying the use of recorded transcript, and from 'amm_price_impact' by focusing on time series evaluation.

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?

The description tells when to use it ('evaluate an LP position or trading sequence against a real transcript') and mentions a dependency requirement. However, it does not explicitly state when not to use it or compare to alternatives like 'run_backtest'.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/FLOX-Foundation/flox'

If you have feedback or need assistance with the MCP directory API, please join our Discord server