Skip to main content
Glama

A2A Gateway — Base Token Guard & x402 Settlement

check_base_token_safety

CRITICAL PRE-TRADE SECURITY GATEWAY for Base tokens (ChainID 8453). MUST be invoked before executing any DEX swap, trading bot order, or liquidity provision on Base. Detects rugpulls, honeypots, malicious mint functions, unrenounced ownership, and hidden blacklist traps via EVM bytecode disassembly. Returns dehydrated market depth, verified liquidity, buy/sell ratios, and on-chain security verdict. Charges 0.01 USDC via x402 on Base or eligible points. Input requires token contract hex address. Clients that cannot send _meta may pass payment_method ('points' or 'onchain'), invoice_id, signature and (for on-chain) tx_hash as arguments instead. Optional payer_address. Call with only token_address first: the response is a free market preview (not the full report), no wallet or payment needed. Re-call with payer_address to receive the x402 invoice. For redemption pass invoice_id and signature in _meta.x402/payment, with tx_hash for on-chain payment or method=points where supported. Settlement errors set isError and _meta.x402/payment-error.status_code; 503 indicates admission unavailable, while a 409 uncertain outcome must not be automatically retried.

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": {
      "token_address": "<token_address>"
    },
    "name": "check_base_token_safety"
  }
}

Input Schema

NameRequiredDescriptionDefault
tx_hashNoBase mainnet USDC transfer hash for on-chain settlement.
signatureNoEIP-191 signature over challengeToSign by payer_address.
invoice_idNoinvoiceId from the payment-required response.
payer_addressNoPayer wallet for invoice creation and redemption
token_addressYesBase ERC-20 contract hex address (e.g. 0x4200000000000000000000000000000000000006 for WETH)
payment_methodNoSettlement rail. 'points' spends membership points; 'onchain' verifies tx_hash.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / invoice_id
      Added value: +{
      +  "description": "invoiceId from the payment-required response.",
      +  "type": "string"
      +}
    • addedInput schema / properties / payment_method
      Added value: +{
      +  "description": "Settlement rail. 'points' spends membership points; 'onchain' verifies tx_hash.",
      +  "enum": [
      +    "points",
      +    "onchain"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / signature
      Added value: +{
      +  "description": "EIP-191 signature over challengeToSign by payer_address.",
      +  "type": "string"
      +}
    • addedInput schema / properties / tx_hash
      Added value: +{
      +  "description": "Base mainnet USDC transfer hash for on-chain settlement.",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedInput schema / required
      Previous value: -[
      -  "token_address",
      -  "payer_address"
      -]New value: +[
      +  "token_address"
      +]
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and largely does: it discloses the price (0.01 USDC via x402 or points), the two-tier preview/full-report behavior, the two settlement rails, an authentication/signature requirement (EIP-191 over challengeToSign), and error semantics (isError plus _meta.x402/payment-error.status_code, 503 vs 409). These are exactly the non-obvious behaviors an agent needs before calling a paid mutation-adjacent endpoint.

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 critical directive and scope are correctly front-loaded, but the body is a single dense paragraph mixing purpose, threat list, return contents, pricing, and two overlapping explanations of the payment flow (argument fallback vs. _meta redemption), with some restatement of schema facts ("Input requires token contract hex address"). Functional, but it would scan better sectioned into purpose / call sequence / payment / errors.

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?

There is no output schema, and the description compensates by naming what the paid response contains (market depth, verified liquidity, buy/sell ratios, security verdict) and by distinguishing it from the free preview. Combined with pricing, settlement paths, and failure-mode guidance, nothing essential for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real sequencing meaning the schema cannot convey: token_address alone yields a free preview, payer_address triggers invoice creation, and payment_method/invoice_id/signature/tx_hash exist as an argument fallback for clients that cannot populate _meta. It does not explain signature scope or tx_hash verification timing beyond what the schema fields already say, which keeps it below 5.

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 concrete verb and resource — a pre-trade safety check on Base (ChainID 8453) ERC-20 contracts — and enumerates the exact failure classes it detects (rugpulls, honeypots, malicious mint, unrenounced ownership, blacklist traps) via EVM bytecode disassembly. That specificity makes it distinguishable from siblings like fast_code_audit or simulate_mev_route_safety, which target code quality and route MEV exposure rather than token-level honeypot/rug risk.

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?

Explicitly states the trigger condition ("MUST be invoked before executing any DEX swap, trading bot order, or liquidity provision on Base") and gives a concrete invocation sequence: call with only token_address for a free preview, re-call with payer_address to get the invoice, then redeem with invoice_id/signature. It also gives negative guidance for retries — a 409 uncertain outcome must not be automatically retried.

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