Skip to main content
Glama

Diogenes Web3, DeFi & 402 Security MCP

Pre-Swap DEX MEV Sandwich & Frontrunning Risk Evaluator

evaluate_dex_mev_risk
Read-onlyIdempotent

Evaluates decentralized exchange (DEX) swap parameters against pool depth and mempool visibility to quantify MEV sandwich risk and compute optimal slippage tolerance in basis points. Use when configuring slippage tolerance and private-RPC routing before executing an on-chain DEX token swap; for comparing cross-chain bridge settlement routes across different L1 blockchains, use compare_crosschain_bridge_routes instead. Read-only edge call (32 KB, 60 RPM): accepts 'pair' ('execution_venue' defaults to 'uniswap_v3_public'), uses '?demo=true' or L402 (25 sats); HTTP 400 if invalid.

Input Schema

NameRequiredDescriptionDefault
pairYesTrading pair symbol or pool identifier (e.g. 'ETH/USDC' or 'SOL/USDC').
execution_venueNoTarget DEX protocol or RPC relay; defaults to 'uniswap_v3_public' when omitted.

Output Schema

NameRequiredDescriptionDefault
sandwich_riskYesAssessed MEV extraction risk tier ('LOW', 'MEDIUM', or 'HIGH').
recommended_rpcYesSuggested MEV-protected broadcast endpoint.
optimal_slippage_bpsYesRecommended maximum slippage tolerance in basis points (1 bps = 0.01%).
frontrunning_detectedYesTrue if public mempool broadcast exposes the swap to predatory bots.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Beyond annotations, the description adds operational context including response size (32 KB), rate limit (60 RPM), demo vs L402 payment access, and HTTP 400 on invalid input. These details help an agent plan calls without guessing about access, rate limits, or error behavior.

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 front-loaded with purpose and usage guidance, then packs operational details tightly without wasting sentences. Every clause contributes either selection guidance or invocation context.

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 the output schema exists, the description need not explain return values. It covers purpose, when to use it, the main alternative, access/payment mechanics, rate limits, defaults, and error handling, making it complete for correct invocation.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both parameters and the execution_venue enum. The description only repeats that it accepts 'pair' and that execution_venue defaults to 'uniswap_v3_public', adding little semantic value beyond the schema.

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 names a specific verb, resource, and scope: it evaluates DEX swap parameters against pool depth and mempool visibility to quantify MEV sandwich risk and compute optimal slippage tolerance. It also explicitly distinguishes itself from compare_crosschain_bridge_routes.

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?

It states exactly when to use the tool: configuring slippage tolerance and private-RPC routing before executing an on-chain DEX swap. It also names the alternative tool and condition for cross-chain bridge route comparison.

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.