Skip to main content
Glama

Submit a withdrawal

submit_withdrawal
Destructive

Submit a withdrawal from MetaLend's rebalancer — moves funds. Requires a jwt from submit_auth_verify for this walletAddress and a signature over prepare_withdrawal's typedData. Always call prepare_withdrawal first — this tool does not look up pool data or validate amounts. The signature's EIP-712 domain is scoped to this one chain — for a smart-contract wallet, it must have (or, if undeployed, would have via ERC-6492 counterfactual deployment) a valid signer on that exact chain (an EOA is chain-agnostic and unaffected). This call can time out on its own if the backend accepted the withdrawal but its response took too long to arrive — the trackingId needed for get_withdrawal_status is still recoverable then: retry with the exact same signature — it cannot double-spend (a real duplicate is rejected with a 409 signature-already-used error, which itself confirms the original withdrawal went through), and that error's message now includes the original trackingId, so read it from there and call get_withdrawal_status directly rather than escalating to support. If that error's message doesn't include a trackingId (it's only included when the conflicting withdrawal belongs to this same wallet), treat the timeout as inconclusive rather than a failure and escalate to support with the wallet address and approximate time instead. Can also fail with a 403 if the jwt wasn't issued for this walletAddress, or a 409 if withdrawing from the Linea Aave USDC pool specifically while a funding-cap refill for that wallet is in progress there (temporary; not visible ahead of time from list_pools or get_balances) — wait and retry. Rate limited to 20 calls/minute per caller, no more than one call every 3s.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jwtYesJWT from submit_auth_verify for this walletAddress.
chainYesFrom prepare_withdrawal's output.
tokenYesToken symbol, e.g. USDC, USDT, MUSD, RLUSD, USDG, USDE, PYUSD.
amountYesFrom prepare_withdrawal's output.
deadlineYesFrom prepare_withdrawal's output.
signatureYesSignature over prepare_withdrawal's typedData.
poolContractYes
walletAddressYesEVM wallet address (0x-prefixed, 40 hex chars). Any casing is accepted — it is normalized to its EIP-55 checksum before being forwarded upstream.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

While annotations carry destructiveHint=true and readOnlyHint=false, the description adds substantial behavioral depth on top: timeout semantics (backend may accept but response may lag), idempotent retry safety ('it cannot double-spend'), the 409 signature-already-used semantics confirming prior success, the Linea Aave USDC funding-cap refill conflict, and rate-limit rules (20 calls/min, 3s spacing). No contradiction with annotations.

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?

The description is long, but every sentence carries operational value — this is a mutation tool with many failure modes, so the density is justified. Front-loading is strong: purpose first, prerequisites second, then errors. The timeout/error paragraph is a nested wall-of-text that could be restructured into clearer conditional braches, and the rate-limit info is buried at the end, which slightly hurts scannability.

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 high-complexity tool with 8 required params, no output schema, and significant failure modes, the description covers prerequisites, sequencing, all error paths (403, two distinct 409 cases, timeout), recovery procedures with the trackingId, and rate limits. Nothing an agent needs to call it correctly or recover from a timeout is missing. The absence of output schema is compensated by the detailed trackingId recovery guidance.

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 88%, so the baseline is 3. The description adds genuine meaning beyond the schema: the signature's EIP-712 domain is scoped to the provided chain (smart-contract wallet implications via ERC-6492 vs EOA), the jwt↔walletAddress binding is reinforced by the 403 error semantics, and the replay-safety of reusing the same signature. poolContract remains covered only by its regex pattern, but that is a minor gap against the strong schema coverage.

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?

The first sentence states a specific verb ('Submit'), resource ('withdrawal from MetaLend's rebalancer'), and effect ('moves funds'). It is clearly distinguished from siblings: prepare_withdrawal is called first (this tool 'does not look up pool data or validate amounts'), and get_withdrawal_status is referenced for tracking. An agent can tell this from the prepare/get siblings immediately.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use guidance: 'Always call prepare_withdrawal first' and prerequisite requirements for jwt and signature. It also specifies when NOT to escalate (read trackingId from the 409 error and call get_withdrawal_status directly) versus when to escalate (timeout without trackingId), plus explicit error-code handling for 403 and 409 cases. This is far beyond a typical tool description.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Every tool maps to a distinct resource or lifecycle stage: get_config vs get_default_config, get_balances vs get_bridge_balances, and prepare_* vs submit_* vs status pollers are all clearly separated. Cross-references explicitly tell agents which tool NOT to use, eliminating ambiguity.

Naming Consistency5/5

All tools use snake_case with a consistent verb_noun pattern: get_* for reads, list_pools for catalog lookup, prepare_* for unsigned payloads, and submit_* for signed writes. There are no mixed conventions or vague verbs.

Tool Count4/5

19 tools is above the typical 3-15 range, but the count is justified by the protocol's surface area: auth, config, deposits, withdrawals, balances, pools, rewards, and metadata each earn their place. It is slightly heavy but not bloated.

Completeness4/5

The set covers the main lifecycle well: auth, config read/default/prepare/submit, deposit and withdrawal prepare/submit/status, balances, pools, rewards, costs, and token metadata. Minor gaps exist, such as no pre-flight check for in-progress rebalances (causing 409s) and no reward claim broadcast, but these are workarroundable via documented retry behavior and externally broadcastable claim transactions.

Resources