Skip to main content
Glama

Base & EVM DeFi Pre-Trade Shield (x402)

Pre-trade token safety check: honeypot, taxes, liquidity and oracle price

base_token_safety_check
Read-onlyIdempotent

Screens one ERC-20 token on Base or another EVM chain right before a swap and returns a verdict SAFE, CAUTION, DANGER or HONEYPOT, a safety score from 0 to 100 and a swap-eligibility decision with a recommended maximum slippage. It combines the GoPlus contract scan and a honeypot.is sell simulation (buy and sell tax, hidden owner, blacklist, mintable, proxy, cannot-sell-all), live DexScreener liquidity, volume and pool age, and a DefiLlama oracle price compared with the DEX price, and lists every finding as a coded flag. Use it as the last guard of a trading or treasury agent before buying an unfamiliar token, or to explain why a token is risky. Do not use it as investment advice or a price forecast, for NFTs or native coins, or for a wallet address, which belongs to evm_wallet_risk_check. Live data: results change as markets move, so call it again right before each trade rather than reusing an old result. Read 'verdict', 'swapEligibility' and 'flags'. Costs 0.015 USDC per call, paid with x402 v2 on Base (eip155:8453) or with a B2B X-API-Key; an unpaid call returns HTTP 402 with a PAYMENT-REQUIRED header instead of an exception, and every failure is a JSON body with ok false and 'error', so an agent loop never breaks on a thrown error. Read-only: it never signs, sends or approves a transaction and holds no keys.

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": "base_token_safety_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoChain the token lives on. Default base. Aliases such as eth, arb, op, matic, bnb, avax or a numeric chain id are also accepted; an unknown value falls back to base.base
addressYesToken contract address as 0x followed by 40 hex characters, or on Base one of the tickers WETH, ETH, USDC, USDBC, CBBTC, AERO, VIRTUAL, DEGEN, BRETT, TOSHI, ONDO or CLANKER. Anything else returns ok false with error 'invalid_token_address'.

Output Schema

NameRequiredDescriptionDefault
okYesFalse when the address could not be resolved or the call was rejected.
metaNoCall metadata: service, version, authMode ('x402' or 'b2b-api-key'), facilitator and processingTimeMs.
chainNoResolved chain key.
errorNoMachine code of the failure, present only when ok is false.
flagsNoFindings as {severity: high | medium | low, code, detail}, such as HONEYPOT_DETECTED, HIGH_SELL_TAX, LOW_DEX_LIQUIDITY or ORACLE_PRICE_DIVERGENCE.
tokenNoaddress, symbol, name and decimals, each null when no source knows it.
chainIdNoEVM chain id, 8453 for Base.
messageNoHuman-readable failure detail, present only when ok is false.
sourcesNoWhich upstreams answered: goPlus, honeypotIsV2, dexScreener, defiLlama. A false entry means less evidence, not a clean result.
verdictNoHONEYPOT when the token cannot be sold; otherwise DANGER below score 45, CAUTION below 75, SAFE from 75.
safetyScoreNo0 to 100, starting at 100 and reduced by each finding.
swapEligibilityNoeligible (true for SAFE, or CAUTION with at least USD 25,000 liquidity and no oracle failure), maxRecommendedSlippageBps (50, 100 or 250 by liquidity) and reason.
contractSecurityNoContract scan: isHoneypot, cannotSellAll, buyTaxPct, sellTaxPct, hiddenOwner, canTakeBackOwnership, isMintable, isProxy, isBlacklisted, tradingCooldown, holderCount, top10HolderPct and more; null where no source answered.
pricingAndOracleNodexPriceUsd, oraclePriceUsd, oracleConfidence, divergencePct and oracleAgree ('pass', 'warn' or 'fail').
liquidityAndMarketNoprimaryDex, pairAddress, pairUrl, topPoolLiquidityUsd, totalChainLiquidityUsd, volume24hUsd, priceChange24hPct, pairAgeHours and txns24h {buys, sells}.
suggestedNextStepsNoAdvisory follow-up calls, such as a wallet risk check of the deployer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the underlying data sources, live-data freshness expectations, per-call cost and payment mechanics, HTTP 402 behavior on unpaid calls, JSON error shape, and that the tool never signs or submits transactions. These details materially help an agent invoke and handle the tool correctly without contradicting readOnlyHint or destructiveHint.

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 purpose is front-loaded and the paragraph proceeds logically through data sources, usage, exclusions, freshness, output fields, payment/error behavior, and safety guarantees. It is long, but almost every sentence carries operational value for a complex paid pre-trade check.

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 the output schema, external data dependencies, payment flow, and read-only annotations, the description provides everything an agent needs: when to call it, what it returns, how failures appear, how often to refresh results, and what it does not do. No important behavioral context appears missing.

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%, and the input schema already documents the chain enum, aliases, and address formats. The description reinforces that the tool screens one ERC-20 token on Base or another EVM chain but adds no significant parameter meaning beyond the schema.

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 specific verb and resource — screening one ERC-20 token before a swap — and concretely names the outputs: verdict, safety score, swap eligibility, and recommended slippage. It also distinguishes the tool from the wallet-oriented sibling by directing wallet checks to evm_wallet_risk_check.

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?

It gives explicit when-to-use guidance as the last guard before buying an unfamiliar token or explaining token risk. It also states clear exclusions — no investment advice, price forecasting, NFTs, native coins, or wallet addresses — and routes wallet checks to the named alternative.

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.