Skip to main content
Glama

ERC-20 allowance ($0.001)

lookup_allowance
Read-only

PAID $0.001 USDC. How much of a token a spender is approved to move from an owner. Requires contract, owner and spender; optional chain= (default ethereum). Returns JSON for allowance(owner, spender) on that ERC-20 contract.

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": {
      "contract": "<contract>",
      "owner": "<owner>",
      "spender": "<spender>"
    },
    "name": "lookup_allowance"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoSingle chain. Format: a chain slug such as ethereum or base. Example: ethereum. Default: ethereum, as the existing tool text states.
ownerYesWallet that granted the allowance. Format: 0x followed by 40 hex characters. Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045. Required.
api_keyNoOptional payment credential. Format: a prepaid key sk_scrapling_... or a catalog pass token sdp_... from pass_day or pass_month. Example: sdp_... . When omitted on a paid tool, the call is unpaid and the server answers with x402 PaymentRequired; retry the same call with the signed payment in params._meta['x402/payment'].
spenderYesAddress allowed to spend. Format: 0x followed by 40 hex characters. Example: 0x000000000022D473030F116dDEE9F6B43aC78BA3. Required.
contractYesERC-20 contract. Format: 0x followed by 40 hex characters. Example: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48. Required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / api_key / description
      Previous value: -"Optional prepaid key (sk_scrapling_...) or catalog pass token (sdp_..., from pass_day/pass_month). Otherwise pay per call with x402 via _meta['x402/payment']."New value: +"Optional payment credential. Format: a prepaid key sk_scrapling_... or a catalog pass token sdp_... from pass_day or pass_month. Example: sdp_... . When omitted on a paid tool, the call is unpaid and the server answers with x402 PaymentRequired; retry the same call with the signed payment in params._meta['x402/payment']."
    • addedInput schema / properties / chain / description
      Added value: +"Single chain. Format: a chain slug such as ethereum or base. Example: ethereum. Default: ethereum, as the existing tool text states."
    • addedInput schema / properties / contract / description
      Added value: +"ERC-20 contract. Format: 0x followed by 40 hex characters. Example: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48. Required."
    • addedInput schema / properties / owner / description
      Added value: +"Wallet that granted the allowance. Format: 0x followed by 40 hex characters. Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045. Required."
    • addedInput schema / properties / spender / description
      Added value: +"Address allowed to spend. Format: 0x followed by 40 hex characters. Example: 0x000000000022D473030F116dDEE9F6B43aC78BA3. Required."
  2. Changed5 schema fields changed
    • changedInput schema / properties / api_key / description
      Previous value: -"Optional payment credential. Format: a prepaid key sk_scrapling_... or a catalog pass token sdp_... from pass_day or pass_month. Example: sdp_... . When omitted on a paid tool, the call is unpaid and the server answers with x402 PaymentRequired; retry the same call with the signed payment in params._meta['x402/payment']."New value: +"Optional prepaid key (sk_scrapling_...) or catalog pass token (sdp_..., from pass_day/pass_month). Otherwise pay per call with x402 via _meta['x402/payment']."
    • removedInput schema / properties / chain / description
      Removed value: -"Single chain. Format: a chain slug such as ethereum or base. Example: ethereum. Default: ethereum, as the existing tool text states."
    • removedInput schema / properties / contract / description
      Removed value: -"ERC-20 contract. Format: 0x followed by 40 hex characters. Example: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48. Required."
    • removedInput schema / properties / owner / description
      Removed value: -"Wallet that granted the allowance. Format: 0x followed by 40 hex characters. Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045. Required."
    • removedInput schema / properties / spender / description
      Removed value: -"Address allowed to spend. Format: 0x followed by 40 hex characters. Example: 0x000000000022D473030F116dDEE9F6B43aC78BA3. Required."
  3. Changed5 schema fields changed
    • changedInput schema / properties / api_key / description
      Previous value: -"Optional prepaid key (sk_scrapling_...) or catalog pass token (sdp_..., from pass_day/pass_month). Otherwise pay per call with x402 via _meta['x402/payment']."New value: +"Optional payment credential. Format: a prepaid key sk_scrapling_... or a catalog pass token sdp_... from pass_day or pass_month. Example: sdp_... . When omitted on a paid tool, the call is unpaid and the server answers with x402 PaymentRequired; retry the same call with the signed payment in params._meta['x402/payment']."
    • addedInput schema / properties / chain / description
      Added value: +"Single chain. Format: a chain slug such as ethereum or base. Example: ethereum. Default: ethereum, as the existing tool text states."
    • addedInput schema / properties / contract / description
      Added value: +"ERC-20 contract. Format: 0x followed by 40 hex characters. Example: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48. Required."
    • addedInput schema / properties / owner / description
      Added value: +"Wallet that granted the allowance. Format: 0x followed by 40 hex characters. Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045. Required."
    • addedInput schema / properties / spender / description
      Added value: +"Address allowed to spend. Format: 0x followed by 40 hex characters. Example: 0x000000000022D473030F116dDEE9F6B43aC78BA3. Required."
  4. Changed5 schema fields changed
    • changedInput schema / properties / api_key / description
      Previous value: -"Optional payment credential. Format: a prepaid key sk_scrapling_... or a catalog pass token sdp_... from pass_day or pass_month. Example: sdp_... . When omitted on a paid tool, the call is unpaid and the server answers with x402 PaymentRequired; retry the same call with the signed payment in params._meta['x402/payment']."New value: +"Optional prepaid key (sk_scrapling_...) or catalog pass token (sdp_..., from pass_day/pass_month). Otherwise pay per call with x402 via _meta['x402/payment']."
    • removedInput schema / properties / chain / description
      Removed value: -"Single chain. Format: a chain slug such as ethereum or base. Example: ethereum. Default: ethereum, as the existing tool text states."
    • removedInput schema / properties / contract / description
      Removed value: -"ERC-20 contract. Format: 0x followed by 40 hex characters. Example: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48. Required."
    • removedInput schema / properties / owner / description
      Removed value: -"Wallet that granted the allowance. Format: 0x followed by 40 hex characters. Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045. Required."
    • removedInput schema / properties / spender / description
      Removed value: -"Address allowed to spend. Format: 0x followed by 40 hex characters. Example: 0x000000000022D473030F116dDEE9F6B43aC78BA3. Required."
  5. Changed5 schema fields changed
    • changedInput schema / properties / api_key / description
      Previous value: -"Optional prepaid key (sk_scrapling_...) or catalog pass token (sdp_..., from pass_day/pass_month). Otherwise pay per call with x402 via _meta['x402/payment']."New value: +"Optional payment credential. Format: a prepaid key sk_scrapling_... or a catalog pass token sdp_... from pass_day or pass_month. Example: sdp_... . When omitted on a paid tool, the call is unpaid and the server answers with x402 PaymentRequired; retry the same call with the signed payment in params._meta['x402/payment']."
    • addedInput schema / properties / chain / description
      Added value: +"Single chain. Format: a chain slug such as ethereum or base. Example: ethereum. Default: ethereum, as the existing tool text states."
    • addedInput schema / properties / contract / description
      Added value: +"ERC-20 contract. Format: 0x followed by 40 hex characters. Example: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48. Required."
    • addedInput schema / properties / owner / description
      Added value: +"Wallet that granted the allowance. Format: 0x followed by 40 hex characters. Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045. Required."
    • addedInput schema / properties / spender / description
      Added value: +"Address allowed to spend. Format: 0x followed by 40 hex characters. Example: 0x000000000022D473030F116dDEE9F6B43aC78BA3. Required."
  6. Added

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds one genuinely non-obvious trait, that the call is paid ($0.001 USDC), plus the default chain=ethereum, but it omits what an unpaid call returns and points only indirectly at the payment flow that the api_key schema field actually documents.

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?

Two tight sentences, with the cost signal front-loaded so an agent sees the paid nature before anything else. No filler; the only minor inefficiency is restating the required parameters, which the schema already marks.

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?

For a simple read-only single-value lookup with no output schema, the description states the operation, the semantics of the returned value (allowance(owner, spender) on that contract), the required inputs, and the default chain. Nothing needed to call it correctly is missing.

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 spells out formats, examples, required status, and the api_key/x402 payment retry. The description repeats the required set (contract, owner, spender) and the chain default without adding format or edge-case meaning, which is the correct baseline 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.

Purpose4/5

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

The description names a specific operation on a specific resource: reading how much of a token a spender may move from an owner on an ERC-20 contract. This is distinguishable from the surrounding lookup_* family (token_info, token_risk, evm_gas, tx) by the owner/spender/allowance framing, though no sibling is named explicitly.

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 description of what an allowance is; there is no explicit statement of when to pick this over lookup_token_info or lookup_token_risk, nor any precondition beyond the required fields. An agent can infer the case (checking approval exposure before a tx), but the definition does not route it.

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.