Skip to main content
Glama

AgentLogic MCP Server

token_allowance

Read an ERC-20 allowance before transacting: how much of a token an owner has approved a spender to move, in raw units and formatted with the token's decimals, plus an unlimited flag when the allowance is at or near max uint256 (an unlimited approval is a standing risk worth knowing about). Works on base, ethereum, polygon, arbitrum and optimism. Price: $0.001 USDC on Base via x402.

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": "<token>",
      "owner": "<owner>",
      "spender": "<spender>"
    },
    "name": "token_allowance"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoChain to read: base (default), ethereum, polygon, arbitrum or optimism.
ownerYesAddress that granted the approval.
tokenYesERC-20 token contract address.
spenderYesAddress approved to spend (a router, exchange or contract).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/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 disclosure burden and does well: it states the operation is a read, discloses the return shape (raw units, decimal-formatted value, unlimited flag), enumerates supported chains, and even surfaces cost ($0.001 USDC on Base via x402). It omits failure behavior (e.g., unsupported chain or non-contract address) and any rate-limit or latency note, keeping it below 5.

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?

The core purpose and return semantics are front-loaded in the first clause, and the risk interpretation of an unlimited approval is a useful addition rather than filler. The chained parentheticals make the single long sentence slightly harder to scan than a split structure would be.

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 output schema exists, and the description compensates by naming the returned values and the unlimited-approval flag. Chain coverage and pricing are both stated, and the low tool complexity means nothing material is missing for an agent to call it correctly.

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 every parameter is already documented with its own description; the description adds no syntax, format, or validation detail beyond what the schema provides. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Read an ERC-20 allowance') and immediately defines it in terms an agent can act on: how much of a token an owner has approved a spender to move. The owner/spender framing makes it unambiguously distinct from a plain balance tool like token_balance without needing to open 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 Guidelines4/5

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

'before transacting' gives a clear situational trigger for calling it, and the owner/spender requirement implicitly rules out simple balance checks. There are no explicit exclusions or named alternative tools, so it falls short of 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.