Skip to main content
Glama

prepare_weth_unwrap

DestructiveIdempotent

Unwrap WETH into native ETH via a direct transaction on supported chains. Enter decimal amount or 'max' for full balance. No approval required.

Instructions

Build an unsigned WETH → native ETH unwrap transaction via a direct WETH.withdraw(uint256) call on the canonical WETH9 contract for the target chain. Supported chains: ethereum, arbitrum, polygon, base, optimism. Pass an explicit decimal amount (e.g. "0.5") or the literal "max" to unwrap the full WETH balance. WETH is always 18 decimals. No approval is required — the wallet burns its own balance and receives native ETH back in the same call; the call is cheaper than routing through a DEX/aggregator. Balance is checked pre-build and the call refuses with a clear message if the wallet is short, rather than letting the tx revert on-chain. For the symmetric wrap direction (native ETH → WETH), use prepare_native_send with the WETH contract as to — sending ETH to the WETH9 fallback triggers deposit() automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYes
chainNoethereum
amountYesHuman-readable WETH amount, NOT raw wei. Example: "0.5" for 0.5 WETH. Pass "max" to unwrap the full WETH balance. WETH is always 18 decimals on every supported chain.
Behavior4/5

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

Beyond annotations (destructiveHint=true, readOnlyHint=false), the description adds that the wallet burns its own balance and receives native ETH, that it performs a pre-balance check and gives a clear error, and that it's cheaper than aggregators. No contradictions with annotations.

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 concise and front-loaded, starting with the core purpose. It uses clear, direct language and avoids redundancy. It could be slightly more streamlined, but overall it is efficient and well-organized.

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

Completeness3/5

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

The description covers the main action, parameters, and behavior, but lacks details about the return format (unsigned transaction object) and next steps for the caller. It mentions the alternative tool and balance checks, but does not explain how to utilize the built transaction. Given no output schema, this is a gap.

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?

The schema has only 33% description coverage (only amount has a schema description). The description significantly compensates for the amount parameter by explaining the format (decimal or 'max') and the 18-decimal standard. It also lists supported chains (matching the enum) but doesn't add extra for wallet.

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 specifies the tool's exact function: building an unsigned WETH withdrawal via WETH.withdraw(). It clearly distinguishes the resource (WETH on canonical contract) and verb (unwrap), and differentiates from sibling tool prepare_native_send for the wrap direction.

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?

The description explicitly tells when to use this tool (for WETH unwrap) and points to an alternative (prepare_native_send for the wrap). It also notes that no approval is needed and that it's cheaper than a DEX, but does not explicitly list when not to use it beyond mentioning the alternative.

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/szhygulin/recon-crypto-mcp'

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