Skip to main content
Glama

get_token_allowance

Verify ERC-20/KIP-7 token allowances: see how many tokens a spender can transfer from an owner. Use for DeFi approvals on Kaia; returns raw and human-readable amounts.

Instructions

Get ERC-20/KIP-7 allowance: the amount a spender can transfer from an owner. Use for DeFi approvals (e.g. DEX, staking). Returns raw allowance and human-readable amount if decimals known.

Input Schema

NameRequiredDescriptionDefault
ownerYesOwner address (0x...)
networkNomainnet or kairos (default: mainnet)
spenderYesSpender address (0x...)
decimalsNoOptional token decimals for human-readable output (default: 18)
tokenAddressYesToken contract address (0x...)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/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 behavioral burden. It usefully discloses the return shape (raw allowance plus human-readable amount when decimals are known) and the decimals default, but omits permission/read-only confirmation and failure behavior for non-contract addresses.

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 tight sentences, front-loaded with the core definition followed by usage and return behavior. No filler or redundancy; every clause earns its place.

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 parameterized read tool with no output schema and no annotations, the description covers purpose, usage, and partial return semantics adequately. It could be stronger on failure modes or read-only guarantees, but nothing critical for correct invocation 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 documents all five parameters and the baseline is 3. The description adds only a light gloss by explaining that decimals drives the human-readable amount, which is marginal added meaning over the schema.

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 (Get) and resource (ERC-20/KIP-7 allowance) and defines the concept precisely as the amount a spender can transfer from an owner. This cleanly distinguishes it from siblings like get_token_info or get_token_holders, which cover metadata and holder lists rather than per-owner/spender allowances.

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?

Gives a clear use case ('Use for DeFi approvals (e.g. DEX, staking)') that tells the agent when this tool is appropriate. However, it names no alternatives or exclusions, so it does not help the agent choose between this and a more general tool like read_contract.

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