Skip to main content
Glama

check_wallet_drain

Read-onlyIdempotent

chainpeek: Check a wallet for a drain: find tokens pulled out without its signature. For live approvals with revoke transactions use audit_token_approvals. Returns a verdict (drained | review | clean) for wallet over the last 24 hours by default (about 27 minutes on Base): each transfer out of USDC and USDT (or up to 5 tokens) is sent, authorized (EIP-3009, as x402 uses), wallet_code, pulled (someone else's transaction) or unknown, with the puller and its live allowance, the nonce before and after, and evidence. Drained: a pull to an address the wallet did not pay itself, or pulls of half of a token's holding. Review: other pulls, a balance that fell with an unmoved nonce, smart-account or EIP-7702 wallets. Gasless orders look like pulls. Bad input is a 422, a failed read a 502 (neither charged). Typically 2-10 s. Price: USD 0.002. Free: 10 chain reads per IP per UTC day. Docs: https://tanod.dev/learn/wallet-drain-check-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": "check_wallet_drain"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesbase or ethereum (the chains with built-in USDC and USDT here).
tokensNo1 to 5 tokens: USDC, USDT or contract addresses. Default: USDC and USDT.
walletYesThe wallet to check (0x + 40 hex).
lookback_sNoSeconds of history read (1-86,400; default 86,400, 24 hours), cut by block timestamps. Public nodes serve logs only about 8,000 blocks deep: about 27 minutes on Base today (the whole window on Ethereum); `history.from_time`, `history.seconds` and `history.complete` say what was read. Not with `lookback_blocks`.
lookback_blocksNoInstead of `lookback_s`: the latest blocks read, in one range (1-2,000; 2,000 is about 6.7 minutes on Base at 0.2 s and 6.7 hours on Ethereum).

Output Schema

NameRequiredDescriptionDefault
riskNo
chainNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
nonceNo
rulesNo
countsNo
limitsNo
tokensNo
walletNo
historyNo
reasonsNo
verdictNo
rpc_callsNo
transfersNo
wallet_codeNo
transfers_totalNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changed
    • removedInput schema / properties / chain / title
      Removed value: -"Chain"
    • removedInput schema / properties / lookback_blocks / default
      Removed value: -null
    • removedInput schema / properties / lookback_blocks / title
      Removed value: -"Lookback Blocks"
    • removedInput schema / properties / lookback_s / default
      Removed value: -null
    • removedInput schema / properties / lookback_s / title
      Removed value: -"Lookback S"
    • removedInput schema / properties / tokens / default
      Removed value: -null
    • removedInput schema / properties / tokens / title
      Removed value: -"Tokens"
    • removedInput schema / properties / wallet / title
      Removed value: -"Wallet"
    • removedInput schema / title
      Removed value: -"check_wallet_drainArguments"
    • removedOutput schema / properties / history / properties
      Removed value: -{
      -  "blocks": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "chunks": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "complete": {
      -    "type": [
      -      "boolean",
      -      "null"
      -    ]
      -  },
      -  "from_block": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "from_time": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "requested_blocks": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "requested_s": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "seconds": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "stopped": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "to_block": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "to_time": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "tx_lookup_cap": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "tx_lookups": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / limits / items
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / nonce / properties
      Removed value: -{
      -  "end": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "moved": {
      -    "type": [
      -      "boolean",
      -      "null"
      -    ]
      -  },
      -  "start": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "start_block": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / reasons / items
      Removed value: -{
      -  "properties": {
      -    "code": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "evidence": {
      -      "type": [
      -        "object",
      -        "null"
      -      ]
      -    },
      -    "message": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "severity": {
      -      "enum": [
      -        "high",
      -        "medium",
      -        "low",
      -        "info",
      -        "ok",
      -        null
      -      ],
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    }
      -  },
      -  "type": [
      -    "object",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / tokens / items
      Removed value: -{
      -  "properties": {
      -    "authorized_raw": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "balance": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "balance_raw": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "decimals": {
      -      "type": [
      -        "integer",
      -        "null"
      -      ]
      -    },
      -    "fell": {
      -      "type": [
      -        "boolean",
      -        "null"
      -      ]
      -    },
      -    "held_raw": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "inflow_raw": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "outflow_raw": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "pulled": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "pulled_raw": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "pulled_share": {
      -      "type": [
      -        "number",
      -        "null"
      -      ]
      -    },
      -    "start_balance": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "start_balance_raw": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "token": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "token_symbol": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "unknown_raw": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    }
      -  },
      -  "type": [
      -    "object",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / transfers / items
      Removed value: -{
      -  "properties": {
      -    "allowances": {
      -      "type": [
      -        "object",
      -        "null"
      -      ]
      -    },
      -    "amount": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "amount_raw": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "block": {
      -      "type": [
      -        "integer",
      -        "null"
      -      ]
      -    },
      -    "class": {
      -      "enum": [
      -        "sent",
      -        "authorized",
      -        "wallet_code",
      -        "pulled",
      -        "unknown",
      -        null
      -      ],
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "log_index": {
      -      "type": [
      -        "integer",
      -        "null"
      -      ]
      -    },
      -    "recipient_paid_by_wallet": {
      -      "type": [
      -        "boolean",
      -        "null"
      -      ]
      -    },
      -    "to": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "token": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "tx_from": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "tx_hash": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "tx_to": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    }
      -  },
      -  "type": [
      -    "object",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / wallet_code / properties
      Removed value: -{
      -  "code_size": {
      -    "type": [
      -      "integer",
      -      "null"
      -    ]
      -  },
      -  "kind": {
      -    "type": [
      -      "string",
      -      "null"
      -    ]
      -  },
      -  "read": {
      -    "type": [
      -      "boolean",
      -      "null"
      -    ]
      -  }
      -}
  2. Changed1 schema field changed
    • changedInput schema / properties / lookback_s / description
      Previous value: -"Seconds of history read (1-86,400; default 86,400, 24 hours), cut by block timestamps. Public nodes serve logs only about 8,000 blocks deep: about 27 minutes on Base at its current 0.2 s block time (the whole window on Ethereum); `history.from_time`, `history.seconds` and `history.complete` say what was read. Not with `lookback_blocks`."New value: +"Seconds of history read (1-86,400; default 86,400, 24 hours), cut by block timestamps. Public nodes serve logs only about 8,000 blocks deep: about 27 minutes on Base today (the whole window on Ethereum); `history.from_time`, `history.seconds` and `history.complete` say what was read. Not with `lookback_blocks`."
  3. Changed14 schema fields changed
    • addedInput schema / properties / lookback_blocks / anyOf
      Added value: +[
      +  {
      +    "maximum": 2000,
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / lookback_blocks / default
      Previous value: -2000New value: +null
    • changedInput schema / properties / lookback_blocks / description
      Previous value: -"Latest blocks read (1-2,000; default 2,000, about 67 minutes on Base and 6.7 hours on Ethereum)."New value: +"Instead of `lookback_s`: the latest blocks read, in one range (1-2,000; 2,000 is about 6.7 minutes on Base at 0.2 s and 6.7 hours on Ethereum)."
    • removedInput schema / properties / lookback_blocks / maximum
      Removed value: -2000
    • removedInput schema / properties / lookback_blocks / minimum
      Removed value: -1
    • removedInput schema / properties / lookback_blocks / type
      Removed value: -"integer"
    • addedInput schema / properties / lookback_s
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 86400,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Seconds of history read (1-86,400; default 86,400, 24 hours), cut by block timestamps. Public nodes serve logs only about 8,000 blocks deep: about 27 minutes on Base at its current 0.2 s block time (the whole window on Ethereum); `history.from_time`, `history.seconds` and `history.complete` say what was read. Not with `lookback_blocks`.",
      +  "title": "Lookback S"
      +}
    • addedOutput schema / properties / history / properties / chunks
      Added value: +{
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / history / properties / from_time
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / history / properties / requested_blocks
      Added value: +{
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / history / properties / requested_s
      Added value: +{
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / history / properties / seconds
      Added value: +{
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / history / properties / stopped
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / history / properties / to_time
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  4. Changed6 schema fields changed
    • addedOutput schema / properties / history / properties / tx_lookup_cap
      Added value: +{
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / tokens / items / properties / authorized_raw
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / tokens / items / properties / held_raw
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / tokens / items / properties / pulled
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / tokens / items / properties / start_balance
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / tokens / items / properties / unknown_raw
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  5. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive, so safety is covered; the description adds real value beyond that with error semantics (422 on bad input, 502 on failed read, neither charged), latency (2-10 s), price ($0.002), and a free tier of 10 reads per IP per UTC day. Its main self-disclosure is the noise profile — gasless orders look like pulls, and nonce/smart-account cases route to 'review' — though it does not say how to resolve an 'unknown' classification.

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?

Front-loading is good — purpose, then the sibling alternative, then verdict semantics. But the core sentence enumerating transfer categories ('is sent, authorized (EIP-3009, as x402 uses), wallet_code, pulled ... or unknown') is a dense run-on that is hard to parse, and pricing/docs/speed details crowd the same paragraph as the classification rules.

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?

An output schema exists, so return values need no explanation, yet the description still defines the three verdicts and their triggers, which is what an agent needs to act. Combined with error codes, latency, cost, rate limits, and docs, nothing material is missing for a read-only analysis tool with a non-obvious data window.

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%, so the baseline is 3; the description restates the 24-hour default and the up-to-5-token option that the schema already documents. It adds little parameter-specific meaning beyond noting that only USDC and USDT are covered by default, and the lookback truncation detail is already in the schema's lookback_s description.

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 ('Check a wallet for a drain') with a precise scope: tokens pulled out without the wallet's signature. It explicitly names the sibling audit_token_approvals and the condition that separates the two, so an agent can route correctly without opening either schema.

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?

Gives an explicit alternative ('For live approvals with revoke transactions use audit_token_approvals') tied to a distinguishing condition — drain detection versus approval revocation. It also establishes the default time window and the Base-specific truncation, which shapes when the answer is trustworthy.

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