Skip to main content
Glama

approve_token

Authorize a spender to transfer tokens on your behalf. Specify token, amount in smallest units, and network.

Instructions

Approve a spender to transfer tokens on your behalf. Requires APPROVED_SPENDERS policy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spenderYesSpender address
tokenYesToken info. Provide full metadata (address/decimals/symbol) OR assetId alone for auto-resolve.
amountYesApproval amount in smallest units (wei for EVM, lamports for Solana). Example: "1000000" = 1 USDC (6 decimals). Use max uint256 for unlimited: "115792089237316195423570985008687907853269984665640564039457584007913129639935"
networkNoTarget network (e.g., "polygon-mainnet" or CAIP-2 "eip155:137"). Required for EVM wallets; auto-resolved for Solana.
wallet_idNoTarget wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.
gas_conditionNoGas price condition for deferred execution. At least one of max_gas_price or max_priority_fee required.
Behavior2/5

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

With no annotations, the description carries the full burden. It only states the policy requirement but does not disclose that this is an on-chain transaction (likely requiring gas, wallet, and network) or what happens upon success/failure. The gas_condition parameter implies deferred execution, but the description omits this.

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 description is extremely brief (one sentence plus policy), which is efficient but may lack necessary detail for a complex tool with 6 parameters. It is front-loaded with the core action, but the policy requirement is secondary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 params, nested objects, no output schema), the description is incomplete. It does not explain return values, error modes, on-chain execution model, or how the gas_condition parameter ties into deferred execution. The schema fills some gaps, but the description should summarize the workflow.

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 all parameters are documented in the schema. The description adds no extra parameter explanation beyond the policy mention, which is not a parameter. Baseline 3 is appropriate.

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?

The description explicitly states the action ('approve'), the resource ('spender to transfer tokens'), and a precondition ('REQUIRES APPROVED_SPENDERS policy'). It clearly distinguishes from siblings like send_token, which sends tokens, and sign_transaction.

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?

The description mentions a required policy, providing some guidance on when the tool can be used (only when the policy is set). However, it does not contrast with alternatives (e.g., send_token for direct transfers) or provide exclusions. More explicit usage context would improve clarity.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/minhoyoo-iotrust/WAIaaS'

If you have feedback or need assistance with the MCP directory API, please join our Discord server