Skip to main content
Glama

write_wallet_approve

Idempotent

Build an unsigned approval transaction. For ERC20 tokens: generates approve(spender, amount). For ERC721/ERC1155 NFTs (e.g. LP positions): generates setApprovalForAll(operator, true). Required before write_account_deposit or write_account_add_liquidity (when depositing from wallet). Tip: call read_wallet_allowances first to check if approval already exists: skip this if the current allowance is sufficient.

Input Schema

NameRequiredDescriptionDefault
amountNoERC20 only: amount in raw units, or 'max_uint256' for unlimited. Ignored for NFTs.max_uint256
chain_idNoChain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)
asset_typeNoToken type: 'erc20' (default) for fungible tokens, 'erc721' or 'erc1155' for NFTs (LP positions)erc20
token_addressYesToken contract address to approve
spender_addressYesAddress being approved — use the Arcadia account address for deposits

Output Schema

NameRequiredDescriptionDefault
descriptionYes
transactionYes
predicted_account_addressNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changed
    • changedInput schema / properties / chain_id / description
      Previous value: -"Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)"New value: +"Chain ID: 8453 (Base), 130 (Unichain), 10 (Optimism), or 4663 (Robinhood)"
  3. Changed1 schema field changed
    • changedInput schema / properties / chain_id / description
      Previous value: -"Chain ID: 8453 (Base) or 130 (Unichain)"New value: +"Chain ID: 8453 (Base), 130 (Unichain), or 10 (Optimism)"
  4. Added

TDQS

A4.7/5.0
Behavior4/5

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

Annotations cover safety profile (readOnly=false, destructive=false, idempotent=true, openWorld=false), and the description adds key context beyond them: the transaction is 'unsigned' (not broadcast), and it is a prerequisite step whose generated call varies by asset type. It doesn't detail return shape, but an output schema exists so that burden is lifted.

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?

Three tight sentences, front-loaded with the core action, then per-asset-type branching, then the prerequisite chain and the read_wallet_allowances tip. No wasted prose.

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?

Annotations declare the safety profile, output schema handles return values, and the schema fully documents all 5 parameters. The description supplies the workflow ordering and per-asset-type behavior, so an agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning by explaining how asset_type drives the generated function (approve vs setApprovalForAll) and confirming amount is ERC20-only. This maps parameters to behavior beyond the field descriptions.

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 and resource ('Build an unsigned approval transaction') and immediately describes the two behavior modes: approve(spender, amount) for ERC20 and setApprovalForAll(operator, true) for ERC721/ERC1155. This clearly distinguishes it from sibling write_* tools that consume the approval.

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

Usage Guidelines5/5

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

Explicitly names prerequisites ('Required before write_account_deposit or write_account_add_liquidity') and gives a when-not rule: call read_wallet_allowances first and skip if allowance is sufficient. Both the enabling alternative and the skip condition are stated, leaving little inference.

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.