Skip to main content
Glama

Mev sandwich shield

mev_sandwich_shield
Read-onlyIdempotent

Live 8-chain MEV sandwich attacker breakeven, gas cost vs slippage tolerance shield, optimal split chunks, and private RPC routing guide using real block gas and Chainlink native USD feeds. Not advice. $0.003 per call over x402 (USDC on Arc, Base or Solana, or XNT on X1). Call once without payment for the terms, sign them with your own wallet, call again with payment.

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": {
      "tradeUsd": "<tradeUsd>"
    },
    "name": "mev_sandwich_shield"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoEVM chain: ethereum, base (default), arbitrum, optimism, polygon, bnb, arc or robinhood
paymentNoa signed x402 payment (the base64 payload you would put in PAYMENT-SIGNATURE). Pass it and the purchase completes inside this tool call.
tradeUsdYesplanned swap notional size in USD (1 to 100000000)
poolFeeBpsNoDEX pool fee in bps (0 to 300, default 30)
slippageBpsNomax slippage tolerance in bps (1 to 5000, default 100)
poolLiquidityUsdNopool TVL liquidity in USD (optional; defaults to conservative 100000 with matrix)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotent/destructive=false, but the description adds behavior the annotations cannot convey: a real cost ($0.003 per call), the x402 payment mechanism, accepted settlement assets (USDC on Arc/Base/Solana, XNT on X1), the two-call handshake, and a 'not advice' disclaimer. That is substantial disclosure. The one tension worth noting is that readOnlyHint=true sits alongside a paid purchase that moves funds — the description treats payment as a side effect of a read-only analysis, which is defensible but not explicitly reconciled.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The capability claim is front-loaded, which is right, but the opening sentence is a dense noun pile of four separate features that an agent must parse to extract the actual function. The payment sentences are essential and earn their place; the feature list could be split into clearer clauses rather than compressed with commas and slashes.

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?

There is no output schema, so the description must signal what comes back, and it does at a high level (breakeven, gas-vs-slippage tradeoff, chunk split, routing recommendation). Payment, pricing, chains, and disclaimer are all covered. What is missing is the shape/format of the result and whether the analysis is live-on-chain or model-based, which matters for an agent deciding whether to trust it.

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 every parameter (chain list, tradeUsd range, poolFeeBps, slippageBps, poolLiquidityUsd default) is already documented in the schema. The description adds only the '8-chain' framing and the payment-payload meaning, which the schema also covers. Baseline 3 applies since the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names specific outputs: sandwich-attacker breakeven, gas-vs-slippage comparison, optimal split chunks, and private RPC routing across 8 chains. That is well beyond a restatement of the name and clearly distinguishes it from gas/quote siblings like evm_gas_estimate or cross_chain_quote. It loses a point for being a stacked noun phrase with no verb and for burying the 'this is an analysis/calculator' framing under marketing jargon.

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 gives solid invocation guidance for the payment handshake ('Call once without `payment` for the terms, sign them with your own wallet, call again with `payment`'), which is the main procedural risk here. It never says when to prefer this over a plain gas estimate or quote tool, and gives no preconditions (e.g., what inputs are required to get a meaningful breakeven) beyond what the schema enforces.

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