Skip to main content
Glama

check_erc20_allowance

Inspect ERC-20 owner balance and spender allowance to detect unlimited or over-exposed approvals before interacting with a token contract.

Instructions

Inspect ERC-20 owner balance and spender allowance, flagging unlimited or over-exposed approvals.

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>",
      "owner_address": "<owner_address>",
      "spender_address": "<spender_address>"
    },
    "name": "check_erc20_allowance"
  }
}

Input Schema

NameRequiredDescriptionDefault
rpc_urlNoOptional EVM JSON-RPC URL or preset alias
owner_addressYesToken owner wallet address (0x...)
token_addressYesERC-20 token contract address (0x...)
spender_addressYesApproved spender contract/wallet address (0x...)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden: 'Inspect' and 'flagging' imply a read-only analysis and disclose that the result highlights unlimited or over-exposed approvals, which is useful behavioral context. However, it does not state permissions/auth needs, rate limits, or how 'over-exposed' is determined, so key behavior remains implicit.

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?

A single front-loaded sentence with no filler, stating the action, the resources, and the notable output trait. It is efficient, though slightly terse given the absence of annotations and output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter tool with no annotations and no output schema, the description covers purpose and the flagged-risk output but leaves gaps: it does not explain return values (balances, allowance amounts, unlimited-approval indicator) or the threshold for 'over-exposed'. Adequate but with clear omissions.

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 all four parameters are already documented in the schema, establishing a baseline of 3. The description maps conceptually to owner_address (balance), spender_address and token_address (allowance), but adds no syntax, format, or guidance for the optional rpc_url/preset alias.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Inspect') and specific resources ('ERC-20 owner balance and spender allowance') plus a value-add behavior ('flagging unlimited or over-exposed approvals'). It is clear what the tool does, but it never distinguishes itself from siblings such as inspect_erc20_token or inspect_evm_wallet, which an agent must choose between.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance and no named alternative. The risk-flagging phrase hints at an approval-audit use case, but the agent must infer that this tool is for pre-approval or allowance-audit checks rather than general wallet or token inspection.

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