Skip to main content
Glama

Submit a deposit

submit_deposit
Destructive

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

TableJSON 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.8/5.0
Behavior5/5

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

Annotations already mark this as destructive/open-world, but the description adds crucial behavior beyond that: timeout ambiguity, 409 duplicate detection with trackingId recovery, 400 allowance pre-flight rejection, 403/503 error conditions, rate limits, and the rejection of non-ECDSA signatures. There is 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 and dense, but every paragraph addresses a real prerequisite or failure mode, and the core requirements are front-loaded. It loses one point for being a wall of text that could be more scannable, though no sentence feels like 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?

The description thoroughly covers prerequisites, error handling, retry behavior, rate limits, and the smart-contract-wallet caveat for a high-stakes fund-moving tool. However, since there is no output schema, it would be stronger if it explicitly stated that a successful call returns a trackingId, rather than only implying its recovery after timeouts.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even though schema coverage is 100%, the description adds meaning the schema cannot convey: the all-or-none grouping of six signature-related parameters, the exact raw ECDSA signature format versus ERC-6492, the amount's role as an allowance check only in approval flows, the origin-chain semantics for chain, and walletAddress normalization.

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 description opens with a specific verb and resource: 'Submit a deposit to MetaLend's rebalancer — moves funds.' It clearly differentiates itself from siblings like prepare_deposit and get_deposit_status by establishing this tool performs the actual fund-moving submission, not preparation or status retrieval.

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?

The description gives explicit usage rules: 'Always call prepare_deposit first,' distinguishes signature-based vs approval-based flows, and directs smart-contract-wallet users to use the approval method. It also provides concrete retry vs escalate guidance with get_deposit_status and support, and warns against re-approving before a terminal status is confirmed.

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