Skip to main content
Glama

get_allowance

Check how many ERC-20 tokens a spender is approved to transfer. Returns the allowance in both raw and human-readable format. Use this to check if an approval is needed before a DeFi transaction.

Instructions

Check how many ERC-20 tokens a spender is approved to transfer. Returns the allowance in both raw and human-readable format. Use this to check if an approval is needed before a DeFi transaction.

Input Schema

NameRequiredDescriptionDefault
tokenYesERC-20 token contract address
spenderYesSpender contract address to check
chain_idYesChain ID
decimalsNoToken decimals. Resolved from the registry or the token contract when omitted; if given, it must match
wallet_idYesWallet ID (used to determine the owner address)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.14.2
    • removedInput schema / properties / decimals / default
      Removed value: -18
    • changedInput schema / properties / decimals / description
      Previous value: -"Token decimals (6 for USDC, 18 for most tokens)"New value: +"Token decimals. Resolved from the registry or the token contract when omitted; if given, it must match"
    • addedInput schema / properties / decimals / maximum
      Added value: +36
    • addedInput schema / properties / decimals / minimum
      Added value: +0
  2. First observedv1.7.3

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the return shape (raw and human-readable) and implies a read-only operation, but says nothing about required permissions, whether the wallet must be unlocked, or failure modes.

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?

Three tight sentences with the core action front-loaded and no filler. The return-format sentence and the usage sentence both carry information an agent needs.

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?

For a read-only lookup with no output schema, the description is nearly sufficient: it explains what is returned and when to reach for it. It falls just short by not resolving its overlap with check_approval or noting any preconditions.

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 five parameters are already documented in the schema. The description only restates the spender concept and adds no syntax, defaults, or edge-case detail beyond what the schema provides.

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 and resource — checking the ERC-20 allowance a spender can transfer — which is concrete and easy to act on. However, it does not differentiate itself from the similarly named sibling check_approval, leaving the agent to guess which of the two to use.

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?

Provides one clear usage context ('check if an approval is needed before a DeFi transaction'), which is genuinely helpful. But it never names alternatives or exclusions, so with a near-duplicate sibling (check_approval) present, the routing guidance is incomplete.

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