Skip to main content
Glama

check_pending_swaps_on_pool

Monitors the public mempool on Polygon for pending swaps on a Uniswap v3 pool, detecting direct pool calls and single-hop router transactions.

Instructions

Watches the public mempool for pending transactions touching a given Uniswap v3 pool — either direct calls to the pool, or single-hop swaps routed through a known Uniswap v3 router (SwapRouter or SwapRouter02) whose calldata references both of the pool's tokens.

Polygon only — Arbitrum uses a centralized sequencer with no public mempool, so this isn't available there. See the README for details.

Note: only catches single-hop router swaps (exactInputSingle / exactOutputSingle). Multi-hop swaps (exactInput / exactOutput) encode the route as a packed path that isn't decoded yet — see roadmap.

Args: pool_address: the pool contract address (catches direct calls) token0: address of one of the pool's two tokens token1: address of the pool's other token chain: only "polygon" is currently supported duration_seconds: how long to watch, capped at 60 seconds (default 15)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNopolygon
token0Yes
token1Yes
pool_addressYes
duration_secondsNo
Behavior5/5

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

With no annotations, the description fully discloses behavior: watches mempool, duration cap of 60 seconds, only single-hop swaps decoded, and platform restriction. This provides complete transparency for an AI agent.

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?

Well-structured with clear sections: purpose, platform restriction, limitations, and parameter list. Front-loaded with core action. The Args list is slightly verbose but necessary due to missing schema descriptions.

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

Completeness5/5

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

Given 5 parameters, no output schema, and no annotations, the description is comprehensive. It covers all parameters, constraints, limitations, and platform specifics, providing sufficient context for effective tool usage.

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?

Despite 0% schema coverage, the description includes an Args section explaining each parameter's purpose: pool_address, token0, token1, chain (only polygon), duration_seconds (capped at 60). Adds meaning beyond schema names.

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 it watches the mempool for pending transactions touching a specific Uniswap v3 pool, including direct calls and single-hop router swaps. It distinguishes from the sibling 'check_confirmed_swaps_on_pool' by focusing on pending vs confirmed.

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?

Explicitly states it is only for Polygon and not available on Arbitrum due to centralized sequencer. Also notes limitation to single-hop swaps and directs to README for details, giving clear when-to-use and when-not-to-use guidance.

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/matiosera3-ops/mev-mcp'

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