Skip to main content
Glama

OnchainCheck Wallet Screen

Optimism erc20 allowance

optimism_erc20_allowance
Read-onlyIdempotent

ERC-20 allowance on OP Mainnet: how much a spender may transfer from an owner, whether the approval is effectively unlimited, the owner's balance, and the amount the spender could move right now. Costs $0.005 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": "optimism_erc20_allowance"
  }
}

Input Schema

NameRequiredDescriptionDefault
ownerYesAddress that granted the approval
tokenYesERC-20 contract on OP Mainnet
spenderYesAddress allowed to spend

Output Schema

NameRequiredDescriptionDefault
rawNostring, e.g. "60000000"
chainNostring, e.g. "optimism"
ownerNostring, e.g. "0x9B1e7350517c2C94a990e55aC6c20De37675c703"
tokenNostring, e.g. "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"
symbolNostring, e.g. "USDC"
spenderNostring, e.g. "0xFb4e4811C7A811E098A556bD79B64c20b479E431"
allowanceNostring, e.g. "60"
unlimitedNoboolean, e.g. false
ownerBalanceNostring, e.g. "66.148476"
spendableNowNostring, e.g. "60"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds genuinely new behavioral context the annotations do not carry: the derived 'effectively unlimited' interpretation, the spendable-right-now computation, and the $0.005 USDC cost paid on Base via x402 — a material operational detail for a paid call.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the resource and chain, followed by the returned facts and cost. No filler and nothing buried.

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?

Output schema exists so return values needn't be spelled out, yet the description usefully names them, and it discloses the payment model. The only gap is routing guidance relative to the many sibling lookup tools, which would make it complete for selection purposes.

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% and each parameter already documents its role (owner granted the approval, token contract on OP Mainnet, spender allowed to spend). The description restates owner/spender roles without adding format, address constraints, or failure semantics, 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?

States a specific verb+resource with chain scope: 'ERC-20 allowance on OP Mainnet', then enumerates the four facts returned (allowance, unlimited flag, owner balance, spendable now). The OP Mainnet qualifier is exactly what separates it from the arbitrum/base/eth/polygon allowance siblings.

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

Usage Guidelines3/5

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

Usage is only implied by the chain scope in the title and first clause; there is no explicit 'use this when...' guidance and no pointer to wallet_profile or wallet_balances as alternatives when the agent wants balances rather than an approval.

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