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. Price: $0.003 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); 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?

Beyond the readOnly/openWorld annotations, it discloses the data source (DexScreener current reserves), the modeling assumptions and their limits, the payment requirement (x402, USDC on Base/Solana and 10+ networks), the exact price ($0.003 per successful call), and the fact that failed calls are free. That is exactly the operational 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?

The core output is front-loaded before the colon, followed by scope limits and pricing. It is one dense sentence plus a short pricing sentence, both of which earn their place, though the opening sentence carries a lot of clauses.

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 an output schema and annotations that cover the safety profile, the description supplies the remaining essentials: data source, model limitations, and the paid-call economics. An agent can decide to call it and understand what the result represents without further context.

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 all six parameters including defaults and ranges. The description adds only indirect meaning (that slippage tolerance shapes the largest viable front-run, and that 'amount' is the victim's input), which is marginal over the structured fields.

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 states a precise computation: the maximum front-run size and profit for a sandwich attack on a swap of a given size in a single DEX pool. Scope qualifiers (constant-product pools only, one pool, current DexScreener reserves, no mempool view) make it clearly distinct from a general slippage or depth calculator among the siblings.

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?

It clearly says when the estimate applies (constant-product pools, current reserves, single pool) and when it does not (no mempool view, no competing bots, worst-case estimate rather than a prediction). It does not name an alternative tool to use instead when those conditions fail, but the exclusions are explicit.

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