Skip to main content
Glama

Prepare owner residual withdraw

prepare_mandate_owner_withdraw_residual
Read-onlyIdempotent

After settlement: close the account's position and pay the residual to the account. 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
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 the annotations: it returns UNSIGNED data only, simulates first and refuses on revert, never signs or sends, bypasses session-key revocation and session limits, and still enforces market rules. This reconciles readOnlyHint=true with an operation that ultimately moves funds by making explicit that only calldata is produced.

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?

Front-loads the timing precondition, then actor scope, then scope limitation, then return semantics — four short sentences with no filler. Every clause carries decision-relevant information.

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?

With no output schema, the description still tells the agent what comes back (unsigned transaction data for the owner's wallet), how failure manifests (simulated first, refused on revert), and that it is single-call scoped. Nothing needed 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 coverage is 100%, and the schema already documents owner ('Refused for any other address'), market (address or symbol), and account. The description's 'for the owner only' restates the owner constraint rather than adding format or usage detail beyond the schema, 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 ('prepare... close the account's position and pay the residual to the account') and pins the triggering condition ('After settlement'). The owner-only framing ('works with every session key revoked, ignores session limits') functionally separates it from the session-key withdraw siblings without needing to name them.

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?

Gives clear conditions for use: only after settlement, only for the account owner, and only for this single market call. It does not explicitly name the alternative to reach for in the non-owner or pre-settlement case, so the agent must infer the fallback from sibling names rather than being routed.

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