Skip to main content
Glama

approve_token_spending

Set an ERC20 token spending allowance for a spender address. Specify token, spender, amount, and network to authorize token transfers.

Instructions

Approve a spender to use your ERC20 tokens

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesAmount to approve (use 'unlimited' for max approval)
networkNoNetwork name (e.g. 'bsc', 'opbnb', 'ethereum', 'base', etc.) or chain ID. Supports others main popular networks. Defaults to BSC mainnet.bsc
privateKeyYesPrivate key in hex format (with or without 0x prefix). SECURITY: This is used only for address derivation and is not stored. The private key will not be logged or displayed in chat history.
tokenAddressYesERC20 token contract address
spenderAddressYesAddress to approve for spending
Behavior2/5

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

With no annotations, the description carries the full burden, but it only states the high-level action. It does not disclose that this modifies on-chain state, broadcasts a transaction, requires gas, or carries security risks such as exposing funds to the spender, which is critical for a mutation tool.

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?

The description is a single sentence that efficiently conveys the core action with no filler. It is concise and front-loaded, making it easy for an agent to parse quickly.

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?

For a tool that approves token spending, the description is minimal and incomplete. It lacks mention of return values, transaction processing, security implications, or behavior on different networks, leaving important operational context to the schema. Given no output schema and no annotations, this is a significant gap.

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?

The tool description adds no parameter details beyond the input schema, but schema coverage is 100% with descriptive entries for each field. The baseline of 3 applies because the schema already documents all parameters, including the 'unlimited' option for amount and security note for privateKey.

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 uses the specific verb 'Approve' and clearly identifies the resource ('a spender to use your ERC20 tokens'), which distinguishes it from sibling operations like revoke_token_approval and check_token_allowance. It precisely states what the tool does without ambiguity.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as checking existing allowances or revoking approvals. It also omits prerequisites, such as ensuring the token address is correct or that the spender address is trustworthy.

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/nirholas/universal-crypto-mcp'

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