Skip to main content
Glama

PreFlight402 — Web3 Risk & x402 Audit

Cross-DEX Pool Spread & Depth Arbitrage ($0.010 USDC)

dex_spread
Read-onlyIdempotent

Paid via x402 ($0.010 USDC on Base): compares active DEX pool prices and DefiLlama oracle pricing to return best buy/sell pools, gross spread %, and liquidity.

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": {
      "address": "<address>"
    },
    "name": "dex_spread"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoEVM chain slug (defaults to base).base
addressYes0x-prefixed EVM token contract address.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, openWorld, and non-destructive, so safety is covered. The description adds genuinely useful behavior: the x402 payment requirement and its exact price, and the two data sources it reconciles (live DEX pools vs DefiLlama oracle). It stops short of noting rate limits, latency, or what happens when oracle and pool pricing diverge or a token has no pools.

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?

A single sentence that front-loads the payment gate and then packs sources and return fields with no filler. Every clause carries information an agent needs before calling.

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?

With no output schema, the description correctly discharges the burden of naming the return fields (buy/sell pools, spread %, liquidity). It is not fully complete: it does not define how liquidity/depth is measured or how the x402 payment is actually settled, though the latter is arguably protocol-level rather than tool-level.

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 coverage is 100%, so both parameters are already documented in the schema; baseline is 3. The description adds only a weak hint by specifying the price as "on Base" while the chain enum supports six chains, leaving it unclear whether cost or coverage differs per chain — a small ambiguity rather than added meaning for `address`.

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?

Specific verb and resource: "compares active DEX pool prices and DefiLlama oracle pricing" and names the outputs (best buy/sell pools, gross spread %, liquidity). The title/comparison scope makes it obvious what the tool does, though it does not explicitly contrast itself with any sibling (none of the listed siblings are close analogues, so the gap is minor).

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?

Usage context is only implied: it is a paid comparison tool, and the upfront "Paid via x402 ($0.010 USDC on Base)" tells the agent a cost gate exists, which is a useful prerequisite. However, there is no explicit statement of when to prefer this over manual price checks or other tools, no mention of when it fails (unknown token, no pools), and no guidance for the non-Base chains despite the chain enum.

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.