Skip to main content
Glama

Pre-Trade Safety

security.mev.shield
Read-onlyIdempotent

Pre-trade safety analysis. Evaluates sandwich attack risk, recommends optimal slippage, and suggests mitigations before executing on-chain trades. Every agent should call this before swapping. ($0.05) Use before a proposed swap, bridge, or liquidity action for a composite pre-trade MEV and slippage decision. It is not a historical sandwich scan or live transaction executor; use security.sandwich for past patterns and execute through the agent's own wallet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNoEVM chain only. Supported chains: base, ethereum, arbitrum, optimism, polygon, bsc, avalanche, zksync, linea, scroll, blast, mantle, gnosis, polygon-zkevm, mode, sei, celo, manta, taiko, fantom, cronos, opbnb, zora, worldchain, metis, fraxtal, kava, zetachain, filecoin, core-dao, aurora, moonbeam, klaytn, bob, canto, monad, tempo, megaeth, arc, plasma, katana, robinhood, pharos, hyperevm.base
actionNoTrade action typeswap
tokenInNoInput token symbolUSDC
tokenOutNoOutput token symbolETH
amountUsdNoTrade size in USD

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
safeNoWhether trade is safe from MEV
chainYesBlockchain queried
statusNo
warningsNo
availableNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=true, so safety profile is covered. The description adds genuinely useful context beyond the structured fields: a $0.05 cost, that it is analysis-only and does not execute, and that execution happens via the agent's own wallet. It does not disclose latency or rate limits, but the added cost/no-execution disclosure is substantive.

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?

Front-loaded with the one-line purpose, then usage, then exclusions, which is the right ordering. Slight redundancy between 'before executing on-chain trades' and 'Use before a proposed swap, bridge, or liquidity action,' but the repetition is minor and the sentences otherwise earn their place.

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?

An output schema exists, so return values need not be described, and annotations carry the safety profile. The description covers purpose, timing, alternatives, and cost, which is close to complete for a 5-param analysis tool. Minor gaps (no explicit input format guidance for token symbols) keep it from a 5.

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 chain, action, tokenIn, tokenOut, and amountUsd are already documented in the schema with enums and defaults. The description's mention of swap/bridge/liquidity actions loosely maps to the action enum but adds no syntax, format, or range detail beyond the schema. Baseline 3 is appropriate.

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 specific verb+resource: 'Pre-trade safety analysis' that 'Evaluates sandwich attack risk, recommends optimal slippage, and suggests mitigations.' It explicitly distinguishes itself from the sibling security.sandwich ('It is not a historical sandwich scan'). An agent can route to this without opening any schema.

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?

Gives explicit when-to-use ('Use before a proposed swap, bridge, or liquidity action') and when-not ('not a historical sandwich scan or live transaction executor; use security.sandwich for past patterns'). It also tells the agent how to act on the result ('execute through the agent's own wallet'), leaving nothing to inference.

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