Skip to main content
Glama

check_token_safety

Checks ERC-20 token safety before AI agents swap by quoting sellability and round-trip cost; returns TRUST/CAUTION/AVOID evidence to block unsafe trades.

Instructions

Token safety check for AI agents before they swap: quote-based sellability, round-trip cost, TRUST / CAUTION / AVOID. $0.02 per call, free pre-signing gate included. Returns evidence: live contract facts, market liquidity, a USD-sized sell QUOTED through the configured venues' own routers (direct and WETH-routed), round-trip cost at your intended size, and phantom-price detection. It does NOT execute or simulate a transfer: transfer tax, blacklist, pause, and max-tx restrictions are listed in notChecked, not tested. Unconfigured venues are also named in notChecked; this is not a honeypot proof.

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": {
      "tokenAddress": "<tokenAddress>",
      "chainId": "<chainId>"
    },
    "name": "check_token_safety"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainIdYesREQUIRED. 1 Ethereum, 42161 Arbitrum, 8453 Base. There is no default; omitting it returns 400 missing_chain.
intendedUsdNoSize the agent plans to buy, in USD (default 500)
tokenAddressYesERC-20 contract address, or a known symbol like WETH
offeredPriceUsdNoOptional price per token someone offered you

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.3

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does unusually well: it discloses cost ($0.02 per call, free pre-signing gate), what evidence is returned, and an explicit notChecked list (transfer tax, blacklist, pause, max-tx, unconfigured venues). The only gap is no statement about latency, rate limits, or failure behaviour when a venue is unreachable.

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 verdict and the excluded capabilities, and every sentence carries content. It is dense with parenthetical jargon ('direct and WETH-routed', 'phantom-price detection'), which slightly slows scanning but none of it is filler.

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?

No annotations, no output schema, four parameters: the description compensates by describing return evidence, pricing, and the precise boundary of what is and is not tested. An agent has enough to decide whether to call it and how to read the result.

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; the description earns a bump by tying intendedUsd to a concrete effect ('round-trip cost at your intended size', 'a USD-sized sell QUOTED through the configured venues' routers'). chainId and tokenAddress are left to the schema, and offeredPriceUsd is only obliquely referenced via 'phantom-price detection'.

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-and-resource ('Token safety check for AI agents before they swap'), names the outputs (quote-based sellability, round-trip cost, TRUST/CAUTION/AVOID verdicts) and explicitly bounds scope with 'It does NOT execute or simulate a transfer'. An agent can tell this apart from a gate or a routing tool without opening the schema.

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?

Provides clear timing context ('before they swap') and a usage caveat ('this is not a honeypot proof'), plus a note that unconfigured venues are excluded. It does not name a specific sibling alternative (e.g. preflight_gate or get_assurance) or state when to prefer one, so the when-not guidance is implied rather than routed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.