Skip to main content
Glama

What can drain this wallet? Approval and allowance check on Base, incl. Permit2 and unlimited approvals

token_allowance_check
Read-only

What can drain this wallet? Approval check for one wallet and one ERC-20 token on Base: how much each spender (up to 10 app or router addresses) is allowed to move, flagging unlimited approvals and approvals covering the full balance, plus approvals made through Uniswap Permit2 with their expiry. Defaults to checking Permit2 itself. Useful before signing and for spotting approvals to revoke. Read-only. Not charged for invalid addresses or non-tokens. Paid via x402; see list_prices.

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": {
      "owner": "<owner>",
      "token": "<token>"
    },
    "name": "token_allowance_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
ownerYesWallet 0x address on Base.
tokenYesToken contract 0x address on Base.
spendersNoOptional: up to 10 spender addresses (array or comma-separated). Defaults to Uniswap Permit2.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / spenders / items / anyOf
      Previous value: -[
      -  {
      -    "maxLength": 512,
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "items": {
      -      "anyOf": [
      -        {
      -          "maxLength": 512,
      -          "type": "string"
      -        },
      -        {
      -          "type": "number"
      -        },
      -        {
      -          "type": "boolean"
      -        }
      -      ]
      -    },
      -    "maxItems": 200,
      -    "type": "array"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 512,
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "maxLength": 512,
      +          "type": "string"
      +        },
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "boolean"
      +        }
      +      ]
      +    },
      +    "maxItems": 200,
      +    "type": "array"
      +  },
      +  {
      +    "additionalProperties": {},
      +    "type": "object"
      +  }
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / spenders / items / anyOf
      Previous value: -[
      -  {
      -    "maxLength": 512,
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 512,
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "maxLength": 512,
      +          "type": "string"
      +        },
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "boolean"
      +        }
      +      ]
      +    },
      +    "maxItems": 200,
      +    "type": "array"
      +  }
      +]
  3. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, yet the description adds real behavioral context: billing via x402, no charge for invalid addresses or non-token inputs, a cap of 10 spenders, and the Permit2 default. The only gap is that it does not explain pagination or result ordering, but for a bounded read call the disclosure is solid.

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?

It is front-loaded with the user-facing question and then packed with concrete facts in a single tight paragraph; every clause carries information. It is dense enough that scanning for the default and pricing notes takes effort, but nothing is wasted.

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?

With only three parameters and no output schema, the description supplies enough to call it correctly and even sketches what comes back (per-spender allowance, unlimited-approval flags, Permit2 expiry). Only the precise response structure is left implicit, which is minor for a read-only check.

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 description coverage is 100%, so the schema already documents owner, token, and the spenders default. The description restates the 10-spender cap and Permit2 default without adding format or addressing detail beyond what the schema provides, so baseline 3 applies.

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 operation and scope: an approval/allowance check for one wallet and one ERC-20 token on Base, returning per-spender allowances. It further enumerates what is flagged (unlimited approvals, full-balance approvals, Permit2 approvals with expiry), which clearly distinguishes it from siblings like token_safety_check or wallet_sanctions_check.

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?

"Useful before signing and for spotting approvals to revoke" gives a concrete usage context, and the default-Permit2 note tells the agent what happens when spenders is omitted. It does not explicitly exclude or route to named alternatives, which keeps it below a 5.

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