Skip to main content
Glama

Prepare owner collateral withdraw

prepare_mandate_owner_withdraw_collateral
Read-onlyIdempotent

Move collateral from the position to the account. "max" is the most the market allows. For the owner only: works with every session key revoked, ignores session limits, and still follows the market's rules. It prepares exactly this one market call and nothing else. Returns UNSIGNED transaction data for the owner's own wallet; simulated first and refused if it would revert. Never signs or sends.

Input Schema

NameRequiredDescriptionDefault
ownerYesThe account's owner, who will send it (0x...). Refused for any other address
amountYesUSDG to withdraw as a decimal string, or "max"
marketYesMarket address (0x...) or symbol, e.g. NO-NVDA
accountYesMandate account address (0x...)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Adds substantial context beyond annotations: it clarifies the readOnlyHint=true is because it "never signs or sends" and only returns UNSIGNED transaction data, discloses a simulate-first/refuse-on-revert safeguard, and notes the owner address gate. This resolves the otherwise confusing readOnly flag on a transaction-building tool.

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?

Purpose is front-loaded in the first sentence and every later sentence carries a distinct constraint (max semantics, owner-only, single call, unsigned output, simulation). Slightly dense with the quoted "max" aside breaking the flow, but no filler.

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

Completeness4/5

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

With no output schema, the description correctly tells the agent the return is unsigned transaction data and that reverts are refused up front, which is what's needed to act on it. It leaves the exact response shape/pagination unstated, a minor gap for a 4-param transactional tool.

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 baseline is 3; the description adds meaning by explaining that "max" means "the most the market allows" and by reinforcing that only the owner address is accepted. It does not elaborate on market symbol resolution or amount formatting beyond the schema.

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?

Specific verb+resource ("Move collateral from the position to the account") plus a scoping clause ("prepares exactly this one market call and nothing else") that separates it from the compound prepare_mandate_close_and_redeem sibling. The "For the owner only" framing distinguishes it from the session-key variant prepare_mandate_withdraw_collateral.

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?

States the selecting condition clearly: this is the owner path that "works with every session key revoked, ignores session limits, and still follows the market's rules," which implies the sibling collateral-withdraw tool is the session-key path. It stops short of naming that alternative explicitly, so the agent must infer the pairing from the sibling list.

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