Skip to main content
Glama

build_deposit

Turns a chosen market into signed-ready calldata: an ordered list of transactions to deposit into it or leave it, across Morpho vaults, Aave reserves, Moonwell markets and this project's staking pools — three different protocol interfaces behind one call. The approve step is included only when the current allowance does not already cover the amount, read on-chain at request time.

Use this once a market has been chosen and the decision is made.

Use something else when: still choosing (list_lending_vaults, best_yield); weighing whether to go ahead (market_profile, yield_history).

Nothing is signed or sent — the caller holds the keys. Simulate before sending. amount: "all" on a withdrawal exits by share rather than by figure, so interest accruing between the call and the block is not left behind.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pool": "<pool>",
      "amount": "<amount>",
      "from": "<from>"
    },
    "name": "build_deposit"
  }
}

Input Schema

NameRequiredDescriptionDefault
fromYesThe address that will sign and hold the position
poolYesMarket id from list_lending_vaults, e.g. 'sparkusdc', 'aave-usdc', 'mUSDC'
actionNoDefaults to deposit
amountYesWhole asset units, e.g. '25.5' — or 'all' to exit a position completely

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it discloses the conditional approve step governed by an on-chain allowance read at request time, that nothing is signed or sent and the caller holds keys, that simulation is advised, and the share-vs-figure semantics of amount 'all'. These are exactly the non-obvious behavioral traits an agent needs.

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-loaded with the core purpose, then cleanly separated into a usage-routing block and a behavioral block. Every sentence conveys information an agent needs (protocol routing, approve condition, no-signing caveat, 'all' semantics); nothing is filler.

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?

No output schema and no annotations, so the description must supply everything: it describes the return artifact (signed-ready calldata, ordered transaction list), the conditional approve step, and the safety model (caller signs, simulate first). Complete for a mutation-tool entry point.

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. The description adds genuine meaning beyond the schema for the amount parameter — that 'all' on a withdrawal exits by share so accruing interest is not left behind — and explains the implicit approve transaction that isn't represented as a parameter at all.

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 artifact ('Turns a chosen market into signed-ready calldata'), enumerates the output shape (ordered list of transactions to deposit or leave), and names the protocols involved. An agent can tell this apart from the sibling read-only tools without opening any schema.

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?

Explicitly states the triggering precondition ('once a market has been chosen and the decision is made') and names alternatives with their conditions: list_lending_vaults/best_yield when still choosing, market_profile/yield_history when weighing whether to go ahead. Both when-to-use and when-not-to-use are covered.

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.