Skip to main content
Glama

Owner tx: withdraw idle funds

prepare_withdraw
Read-only

Returns an UNSIGNED transaction {chainId, to, data, value} plus simulation — an eth_call of exactly it from from (ok, or the revert decoded by name) — warnings and next. This server signs nothing: the sender signs and sends it with their own wallet and pays the gas. Owner only. Moves idle balance (not in a position) out of the manager to recipient, one row per token, through the owner escape hatch executeEncodedTxBatch. Liquidity inside positions is withdrawn in the app's Withdraw page, which plans it against live prices.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chainId": "<chainId>",
      "manager": "<manager>",
      "recipient": "<recipient>",
      "items": "<items>",
      "from": "<from>"
    },
    "name": "prepare_withdraw"
  }
}

Input Schema

NameRequiredDescriptionDefault
fromYesThe address that will send the transaction — the manager owner (ownerOf(1)). The simulation runs from it.
itemsYesIdle balances to take out, one row per token
chainIdYesEVM chain id: 8453 Base, 42161 Arbitrum, 130 Unichain (1 = Ethereum mainnet, your gas)
managerYesManager NFT contract address
recipientYesWhere the funds go

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past readOnlyHint/openWorldHint: it discloses that the server signs nothing, that the sender signs, sends and pays gas, that a simulation is an eth_call of exactly the returned payload with revert names decoded, and that `warnings` and `next` come back alongside. This is exactly the context an agent needs before handing an unsigned payload off for signing.

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?

Front-loaded with the return shape, then the signing model, then the authorization and scope limits — a sensible order with little waste. The middle-of-paragraph parenthetical about the simulation is a bit tangled but still earns its place.

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?

There is no output schema, yet the description enumerates the return payload fields, the simulation result semantics, and the accompanying `warnings`/`next`. Combined with the full schema coverage and the safety annotations, nothing an agent needs in order to call it correctly 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 `from`, `recipient`, `items.token`, `items.amount` and `chainId`. The description only reinforces "one row per token" for the escape-hatch path; it adds no formatting or constraint detail beyond what the schema states, so the baseline 3 applies.

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 — return an UNSIGNED transaction that moves idle balance out of the manager to a recipient via `executeEncodedTxBatch`. It also draws a hard boundary against a different operation (liquidity inside positions is withdrawn in the app's Withdraw page), so an agent can distinguish the two cases without opening a schema.

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?

Explicitly says "Owner only" and scopes the tool to idle balances as opposed to funds in a position, naming where the positional case is handled instead. What is missing is routing to a sibling prepare_* tool for the reverse operation or any prerequisite about holding the manager NFT beyond the `from` description in the schema.

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.

Resources