Skip to main content
Glama

Theoretical sandwich-attack profit for a swap of a given

agent_intel_mev_sandwich_risk_analyzer
Read-only

Theoretical sandwich-attack profit for a swap of a given size in one DEX pool, at the pool's current reserves (DexScreener) and the swap's slippage tolerance: the largest front-run that still lets the victim's trade succeed, and the profit it would give. Constant-product pools only, no mempool view, no competing bots: a worst-case estimate, not a prediction. Suggests a slippage tolerance. Related tools on this server, for a different need: agent_intel_defi_yield_risk_optimizer when you need to rank DeFi pools by total APY from DefiLlama's public; agent_intel_holder_cluster_analyzer when you need holder concentration for an EVM token: share of supply held. Price: $0.003 in USDC per successful call, paid with x402 (Base, Solana or Arc); failed calls are not charged.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pair": "<pair>",
      "amount": "<amount>"
    },
    "name": "agent_intel_mev_sandwich_risk_analyzer"
  }
}

Input Schema

NameRequiredDescriptionDefault
pairYesPool (pair) address
sideNosell = victim gives base token; buy = victim gives quote token (default sell)
chainNoDexScreener chain name, e.g. base, ethereum (default base)
amountYesVictim's input amount in that token's units
feePctNoPool fee in percent, 0 to 5 (default 0.3)
slippagePctNoVictim's slippage tolerance in percent, 0 to 50 (default 1)

Output Schema

NameRequiredDescriptionDefault
dexNo
noteNo
pairNo
riskNo
sideNo
chainNo
modelNo
sourceNo
checkedAtNo
victimAmountNo
victimMinOutNo
maxFrontRunSizeNo
theoreticalProfitNo
victimExpectedOutNo
victimSlippagePctNo
suggestedSlippagePctNo
victimPriceImpactPctNo
profitAsPctOfVictimSizeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description goes well beyond them by disclosing the data source (DexScreener), the modeling assumptions and their limits (constant-product only, no mempool or competing-bot view, worst-case not a prediction), that it also suggests a slippage tolerance, and the commercial terms ($0.003 USDC per successful call via x402 on Base/Solana/Arc, failed calls not charged). That is exactly the operational and failure-mode context annotations cannot carry.

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?

Core answer is front-loaded in the first sentence, with caveats and pricing after, and nothing in the main body is redundant. Minor deductions: it is one long unbroken paragraph, and the sibling blurbs are verbose to the point of truncation ('from DefiLlama's public').

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?

For a six-parameter read-only analytical tool with a full output schema, every decision-relevant fact is present: data provenance, model assumptions, pricing/payment, and routing to related tools. Return-value shape is correctly left to the output schema.

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 baseline is 3. The description adds a small amount of meaning beyond the schema — that reserves come from DexScreener and that the output includes a suggested slippage tolerance tied to slippagePct — but it does not explain side/amount units or the feePct range beyond what the schema already states.

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?

States a precise verb+resource+scope: theoretical sandwich-attack profit for a swap of a given size in one constant-product DEX pool at current DexScreener reserves, decomposed into the largest viable front-run and its profit. It also explicitly names two sibling tools it is NOT, so an agent can route without opening schemas.

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

Usage Guidelines4/5

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

Clear context for when the tool applies, plus explicit boundaries (constant-product pools only, no mempool view, no competing bots, worst-case estimate rather than prediction) and hand-offs to agent_intel_defi_yield_risk_optimizer and agent_intel_holder_cluster_analyzer for adjacent needs. It falls short of 5 because it never names its closest alternative, agent_intel_dex_depth_slippage_calculator, nor states when to prefer that over this.

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.

Resources