Skip to main content
Glama

Prepare withdraw

prepare_withdraw
Read-onlyIdempotent

Withdraw collateral: withdraw(amount). "max" withdraws the most the minimum ratio and 10 USDG floor allow. Needs a fresh price when the position has debt. Returns UNSIGNED transaction data (to, data, value, gas) for the user's own wallet; simulated against the latest block first and refused if it would revert. Never signs or sends.

Input Schema

NameRequiredDescriptionDefault
ownerYesThe user's wallet address (0x...). Used to read the position and as the simulated sender; nothing is signed.
amountYesUSDG to withdraw as a decimal string, or "max"
marketYesMarket address (0x...) or symbol, e.g. NO-NVDA

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses the return payload shape (to, data, value, gas), that the transaction is unsigned, that it is simulated against the latest block, and that it is refused pre-emptively if it would revert. "Never signs or sends" directly resolves the main anxiety for a transaction-preparing tool marked readOnlyHint=true.

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 with the action first, then the amount special case, then the safety/return contract. No filler and no repetition of schema field names.

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?

For a 3-required-parameter preparation tool with no output schema, it covers the essential unknowns: what comes back, whether anything is signed or broadcast, the fresh-price dependency, and the reverting precondition. Nothing material is missing for correct invocation.

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 genuinely adds meaning for the amount parameter by defining what "max" computes (minimum ratio plus 10 USDG floor) — information absent from the schema's terse '"max"' note. Owner and market semantics are left to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening states a specific verb and resource ("Withdraw collateral") plus the underlying call signature withdraw(amount), and the phrase "for the user's own wallet" implicitly separates it from the many prepare_mandate_* withdraw siblings. It stops short of naming those alternatives explicitly, so the differentiation is inferable rather than stated.

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?

"Needs a fresh price when the position has debt" gives a concrete precondition, and the "max" note explains how to request a full withdrawal subject to the minimum ratio and 10 USDG floor. There is no explicit when-not-use or named alternative among the mandate-based withdraw tools, but the deployment context is clear.

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