Skip to main content
Glama

Prepare mandate close and redeem

prepare_mandate_close_and_redeem
Read-onlyIdempotent

After settlement: withdrawResidual, redeem and claim, paid to the account. Checks the account's limits, then returns UNSIGNED transaction data for the session key, simulated first. Above the approval threshold it returns EIP-712 typed data for the owner instead, which only works when the owner is an ordinary wallet: it refuses when the owner is a contract, such as a Safe. Never signs or sends.

Input Schema

NameRequiredDescriptionDefault
marketYesMarket address (0x...) or symbol, e.g. NO-NVDA
accountYesMandate account address (0x...)
approvalNoOnly above the approval threshold: the nonce and deadline from typedData, plus the owner's signature
sessionKeyYesThe session key that will send it (0x...). Not held by this server
approvalTtlSecondsNoOptional: how long a new approval stays valid. Default 1 hour

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well past the annotations: it discloses that limits are checked, output is simulated first, results are UNSIGNED and never signed or sent, and that the call returns EIP-712 typed data rather than a transaction above the approval threshold. It also flags a failure mode (contract owners rejected) that the agent could not infer from readOnlyHint/idempotentHint.

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-loads the post-settlement action sequence and then branches into the threshold behavior in a single tight paragraph. Dense but waste-free; the 'paid to the account' clause and the Safe example each pull weight.

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 carries the return-value burden and does: unsigned transaction data normally, EIP-712 typed data above threshold, simulation performed first. Together with the refusal case, that covers everything an agent needs to invoke and interpret this 5-parameter, nested-object 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 3 is the baseline, but the description adds workflow meaning the schema does not: the approval object exists only above the threshold, and the returned typedData is what the owner signs. Session key ownership ('Not held by this server') is already in the schema, so no extra credit there.

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?

Names the concrete operations (withdrawResidual, redeem and claim) and the timing condition (after settlement) plus the destination (paid to the account). That distinguishes it from the plain prepare_close_and_redeem and from prepare_mandate_withdraw_residual, though it never explicitly contrasts itself with those siblings by name.

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?

'After settlement' establishes the precondition, and the threshold branch explains which path the caller will get and when the owner-signature path applies. It also states a hard exclusion (refuses when the owner is a contract such as a Safe), but it never tells the agent when to pick this over prepare_close_and_redeem or a narrower prepare_mandate_* tool.

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