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. Supply payer_address. 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>",
      "payer_address": "<payer_address>"
    },
    "name": "check_base_token_safety"
  }
}

Input Schema

NameRequiredDescriptionDefault
payer_addressYesPayer wallet for invoice creation and redemption
token_addressYesBase ERC-20 contract hex address (e.g. 0x4200000000000000000000000000000000000006 for WETH)

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?

With no annotations supplied, the description carries the full behavioral burden and does so thoroughly: cost of 0.01 USDC via x402, accepted payment methods (Base or points), required redemption fields, and precise error semantics including isError on settlement failure, 503 meaning admission unavailable, and 409 being an uncertain outcome that must not be auto-retried.

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 most important constraint, that this is a mandatory pre-trade gate, is front-loaded, and nearly every sentence adds actionable content. The payment and settlement-error details are packed into long, jargon-dense run-on sentences that could be broken apart for faster parsing.

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?

For a paid, security-critical tool with no output schema and no annotations, the description covers what is returned (market depth, verified liquidity, buy/sell ratios, verdict), how payment works, and how failures surface, leaving nothing essential for correct invocation unstated.

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 already 100% for the two declared properties, so baseline would be 3; the description goes beyond it by documenting payment/redemption inputs (invoice_id, signature in _meta.x402/payment, tx_hash for on-chain payment, method=points) that are not represented in the schema at all.

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 names a specific verb and resource: it detects rugpulls, honeypots, malicious mint functions, unrenounced ownership and blacklist traps in Base ERC-20 tokens via bytecode disassembly, and returns a security verdict. The 'pre-trade security gateway' framing and ChainID 8453 scope make it clearly distinct from siblings such as simulate_mev_route_safety, which concerns MEV routing rather than contract safety.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states an explicit trigger condition: it MUST be invoked before any DEX swap, trading bot order, or liquidity provision on Base. That is strong when-to-use guidance, but it does not name alternative tools or state when-not to use it (e.g., non-Base chains or already-verified tokens).

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