Skip to main content
Glama
Tanod MCP Server

Tanod MCP Server

Official

audit_token_approvals

Read-onlyIdempotent

Audit a wallet's live ERC-20 and Permit2 token approvals, flag unlimited or stale allowances, and return unsigned revoke transactions to set risky approvals to zero.

Instructions

chainpeek: List a wallet's live token approvals and get revoke transactions. For tokens already pulled out use check_wallet_drain; for one allowance use get_allowance. Returns the live ERC-20 and Permit2 allowances of wallet: amount or unlimited, spender code (key-controlled, contract, new contract), newest approval and pull, staleness, flags with evidence, and the unsigned revoke transaction that sets it to 0. Candidates: approval events in the latest 6,000 blocks, Permit2, and spenders. High: unlimited to a key-controlled account. Medium: limited to one, or unlimited to a contract with no code 30 days ago. Low: other unlimited or stale. Older approvals are found only via spenders or Permit2. Bad input is a 422, a failed read a 502 (neither charged). Nothing is signed or sent. Typically 3-15 s. Price: USD 0.005. Free: 10 chain reads per IP per UTC day. Docs: https://tanod.dev/learn/token-approval-audit-api.html

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": {
      "chain": "<chain>",
      "wallet": "<wallet>"
    },
    "name": "audit_token_approvals"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesbase or ethereum (the chains with built-in USDC and USDT here).
tokensNoUp to 50 token contracts to audit. Default: USDC, USDT and up to 18 tokens the wallet has sent (from its transfer history).
walletYesThe wallet whose approvals are audited (0x + 40 hex).
spendersNoUp to 50 spender addresses whose ERC-20 and Permit2 allowances are read directly on every audited token, however old (tokens x spenders at most 200). The full-coverage path for spenders you know.
stale_daysNoAn allowance is stale when the spender pulled nothing from the wallet in this many days.
lookback_blocksNoLatest blocks scanned for approval events (0-6,000; default 6,000, about 20 minutes on Base today and 20 hours on Ethereum; `history.from_time` says when the window starts). 0 scans nothing and checks `spenders` and Permit2 only.

Output Schema

NameRequiredDescriptionDefault
riskNo
blockNo
chainNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
rulesNo
limitsNo
tokensNo
walletNo
checkedNo
historyNo
reasonsNo
rpc_callsNo
allowancesNo
stale_daysNo
block_timestampNo
allowances_totalNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.4

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description still adds real substance beyond them: nothing is signed or sent, 422 vs 502 with neither charged, 3-15 s latency, price and free-tier quota. What it does not do is explain pagination or result-count limits, so it falls just short of full marks.

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?

Purpose and alternatives are front-loaded, and the risk-tier sentences (High/Medium/Low) carry genuine decision value. The prose is telegraphic and dense - heavy semicolon stacking - but no sentence is padding.

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?

Complete for a read-only audit tool: inputs, failure modes, timing, and cost are all covered, and an output schema exists so the return-shape listing is a bonus rather than a requirement. Minor gap on what happens when the token x spender product exceeds the cap.

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%, so the baseline is 3; the description earns the extra point by interpreting the parameters operationally - the lookback window is roughly 20 minutes on Base versus 20 hours on Ethereum, and `spenders` is described as the full-coverage path with a 200-combination ceiling. It adds meaning rather than restating field descriptions.

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?

"List a wallet's live token approvals and get revoke transactions" is a specific verb+resource pair, and the description immediately names the siblings it is not (check_wallet_drain for already-drained tokens, get_allowance for a single allowance). An agent can route correctly from the first sentence alone.

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?

Explicit when-to-use-elsewhere routing is given with conditions attached for both named alternatives, plus a key coverage caveat: older approvals are only found via `spenders` or Permit2, and `lookback_blocks: 0` turns the event scan off. That is the exclusion and edge-case detail most definitions omit.

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

Deploy Server

Other Tools