Skip to main content
Glama

Submit a deposit

submit_deposit
Destructive

[DEPRECATED] Submit a deposit to MetaLend's rebalancer — moves funds. Requires a jwt from submit_auth_verify for this walletAddress, and either a signature (from prepare_deposit's signature-method output) or, for approval-based tokens, no signature at all once your wallet has already broadcast the approve() transaction on-chain. Always call prepare_deposit first — this tool does not validate amounts or resolve addresses itself (it does reject a partial set of validAfter/validBefore/nonce/signature/tokenName/tokenVersion — provide all six, or none). This call can time out on its own if the backend accepted the deposit but its response took too long to arrive. For a signature-based deposit, the trackingId needed for get_deposit_status is still recoverable then: retry with the exact same signature/nonce — it cannot double-spend (a real duplicate is rejected with a 409 signature-already-used error, which itself confirms the original deposit went through), and that error's message now includes the original trackingId, so read it from there and call get_deposit_status directly rather than escalating to support. If that error's message doesn't include a trackingId (it's only included when the conflicting deposit 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. For an approval-based deposit (no signature), retrying after an uncertain outcome is safe in the ordinary case without needing to check status first: this tool's own amount is only used by the backend to check against your current on-chain allowance before anything is broadcast — the on-chain deposit transaction itself takes no amount parameter, it just pulls and consumes your entire then-current allowance atomically. So if the original attempt already landed, a retry finds a zero allowance and is rejected outright with a 400 ApprovalValidationError from that same pre-flight check, before anything is broadcast on-chain, rather than moving funds again. The one exception: if you separately call token.approve() again for this token/spender while an earlier submit_deposit for it is still outstanding, a retry (or the original call, if it was merely delayed rather than failed) could then consume that new allowance as a second real deposit — avoid re-approving until you've confirmed via get_deposit_status that any earlier attempt for the same token has reached a terminal state. Can also fail with a 403 if the jwt wasn't issued for this walletAddress, or a 503 if deposits are temporarily paused platform-wide. The signature must be a raw 65-byte ECDSA signature (132 hex chars, 0x-prefixed) — anything else, including an ERC-6492-wrapped or other smart-contract-wallet signature, is rejected outright regardless of validity; there is no counterfactual/smart-wallet support for deposit signatures (unlike withdrawal/config signatures). Use the approval method instead for a smart-contract wallet. Rate limited to 10 calls/minute per caller, no more than one call every 6s.

Input Schema

NameRequiredDescriptionDefault
jwtYesJWT from submit_auth_verify for this walletAddress.
chainYesChain name, e.g. BASE, ETHEREUM, POLYGON — the originating chain of this deposit: where the approve() call is broadcast, or for the signature flow, the chain the EIP-712 signature must validate on. Not where the rebalancer later invests the funds — deposits are naturally cross-chain in that sense, and this server only checks that the token has a signed config at all (hasSignedConfig), independent of which chains that config's domainIds allow. For an EOA, this originating chain is supported unconditionally: a raw ECDSA signature has no chain-specific verification step of its own, so any chain works. But when it comes to deposits done on a chain the wallet doesn't have configuration for, the deposit might fail if it's a smart-contract wallet that doesn't support cross-chain signatures (e.g. Coinbase's Smart Wallet / Base Smart Wallet)
nonceNoFrom prepare_deposit's signature-method output.
tokenYesToken symbol, e.g. USDC, USDT, MUSD, RLUSD, USDG, USDE, PYUSD.
amountYesRaw token amount as a decimal-digit string (smallest denomination). Use get_token_info for decimals.
signatureNoSignature over prepare_deposit's typedData. Omit for approval-based deposits.
tokenNameNoFrom prepare_deposit's signature-method output.
validAfterNoFrom prepare_deposit's signature-method output.
validBeforeNoFrom prepare_deposit's signature-method output.
tokenVersionNoFrom prepare_deposit's signature-method output.
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.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only say destructive/openWorld/non-readOnly, but the description goes far beyond: jwt/auth requirements, 403 and 503 failure modes, the 10/min and 6s rate limits, timeout behavior, idempotency and double-spend safety, the 409 signature-already-used and 400 ApprovalValidationError semantics, and the exact signature format restriction. This is exactly the extra context the annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Content is mostly relevant given the tool's complexity and is front-loaded with purpose and deprecation, but it is delivered as one dense run-on paragraph with nested parenthetical exceptions that is hard to scan. Several retry clauses overlap, so the structure costs more than the length alone.

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 full burden and does so: it explains auth, method selection, error codes, idempotency, timeout recovery, and how to recover the trackingId for get_deposit_status. An agent has everything needed to call it correctly and recover from failure.

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 adds real value: the all-six-or-none rule for validAfter/validBefore/nonce/signature/tokenName/tokenVersion, and the clarification that `amount` is used only for the pre-flight allowance check rather than the on-chain pull. These are semantics not present in 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 first clause states a specific verb and resource ('Submit a deposit to MetaLend's rebalancer — moves funds') and marks the tool [DEPRECATED], which distinguishes it sharply from prepare_deposit and the read-only status siblings. The core action is clear, though it is somewhat buried under a paragraph dominated by retry/error semantics. It never names a replacement for the deprecated tool, which slightly weakens the differentiation.

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?

It explicitly states the prerequisite ('Always call prepare_deposit first'), the two alternative flows (signature vs approval-based, and when each applies), and concrete when-not rules (don't re-approve while an earlier submit is outstanding; use approval method for smart-contract wallets). This is unusually explicit routing guidance.

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.