Skip to main content
Glama

Prepare a Yield Copilot vault deposit (Morpho USDC on Base) as an unsigned swap pair

otto_prepare_yield_deposit
Read-only

Prepare the EXACT otto_prepare_swap pair (envelope + prepareInput) that deposits USDC into one of the executable Morpho vaults from the Yield Copilot registry, as a LI.FI position-acquisition route (which may buy shares or compose a protocol deposit) whose output token is the vault's ERC-4626 share token and whose receiver is the signing account. The vault comes from the registry row named by executableMarketId and is never an input; the caller's registryCommitment must equal the commitment recomputed over the current record. The quoted shares are checked against the vault's own previewDeposit and refused when they fall short by more than the pinned tolerance. Returns the pair unchanged plus a preview; never signs or submits; the signing account signs and sends the pair itself. Preparation does not authorize execution. Every envelope from this server is valid for 300 seconds from construction (valid_until); a stale envelope is refused by the verifier — request a fresh one.

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": {
      "accountProfile": "<accountProfile>",
      "executableMarketId": "<executableMarketId>",
      "registryCommitment": "<registryCommitment>",
      "amount": "<amount>",
      "slippage": "<slippage>"
    },
    "name": "otto_prepare_yield_deposit"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesExact USDC amount to deposit, in atomic units (6 decimals).
slippageYes
client_refNo
accountProfileYes
executableMarketIdYesThe executable market id the READ half served (`GET /api/yield-copilot` rows with deployable:true), e.g. base-usdc-morpho-gauntlet-prime.
registryCommitmentYesThe registry commitment served with that row. It must equal the commitment this server recomputes over the CURRENT record; a stale or foreign row is refused by name.

Output Schema

NameRequiredDescriptionDefault
previewYes
envelopeYes
prepareInputYes
registry_commitmentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / preview / properties / route_semantics
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "action": {
      +      "enum": [
      +        "deposit",
      +        "withdraw"
      +      ],
      +      "type": "string"
      +    },
      +    "classification": {
      +      "enum": [
      +        "share-purchase",
      +        "share-sale",
      +        "protocol-composition",
      +        "mixed",
      +        "unclassified"
      +      ],
      +      "type": "string"
      +    },
      +    "evidence": {
      +      "const": "provider-quote-steps",
      +      "type": "string"
      +    },
      +    "protocol_action_verified": {
      +      "const": false,
      +      "type": "boolean"
      +    },
      +    "tools": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "transport": {
      +      "const": "lifi",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "transport",
      +    "action",
      +    "classification",
      +    "evidence",
      +    "protocol_action_verified",
      +    "tools"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / properties / preview / required
      Previous value: -[
      -  "market_id",
      -  "venue",
      -  "protocol",
      -  "chain_id",
      -  "vault",
      -  "asset",
      -  "amount",
      -  "expected_shares",
      -  "min_shares",
      -  "preview_deposit_shares",
      -  "parity_shortfall_bps",
      -  "parity_tolerance_bps",
      -  "quoted_fees"
      -]New value: +[
      +  "market_id",
      +  "venue",
      +  "protocol",
      +  "chain_id",
      +  "vault",
      +  "asset",
      +  "amount",
      +  "expected_shares",
      +  "min_shares",
      +  "preview_deposit_shares",
      +  "parity_shortfall_bps",
      +  "parity_tolerance_bps",
      +  "quoted_fees",
      +  "route_semantics"
      +]
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint/destructiveHint/idempotentHint) by disclosing the full execution model: the tool never signs or submits, the signing account must send the pair itself, preparation does not authorize execution, and every envelope expires 300 seconds after construction with stale envelopes refused by the verifier. It also reveals an internal validation behavior (quoted shares cross-checked against the vault's previewDeposit, refused beyond the pinned tolerance) that an agent could not infer from annotations or schema.

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 critical info (what pair is produced, where the vault comes from, commitment check, no signing) is front-loaded in the first sentences, and the expiry caveat is placed last where it belongs. Some wording is redundant, notably "Returns the pair unchanged" followed by "never signs or submits; the signing account signs and sends the pair itself," which restates the same non-custodial point twice. Dense but largely earned.

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-stakes multi-step financial flow with nested objects and an output schema, the description covers provenance of the vault, the commitment freshness check, the deposit-quality check, the signer boundary, and envelope expiry — everything needed to call it correctly. Return details are appropriately deferred to the output schema, with only a one-line summary of what comes back.

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?

With schema coverage at 50%, the description carries meaningful extra semantics for the two hardest parameters: executableMarketId is defined as a registry row id and explicitly noted as 'never an input' vault data, and registryCommitment is tied to a server-side recomputation over the current record with stale/foreign rows refused by name. It also implies the receiver is the signing account (linking accountProfile to behavior) and references a pinned slippage tolerance. It leaves slippage.maxBps and client_ref unelaborated, keeping it below a 5.

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 resource ("Prepare the EXACT otto_prepare_swap pair ... that deposits USDC into one of the executable Morpho vaults") and names the concrete output shape (envelope + prepareInput, output token = ERC-4626 share token). It is clearly distinguishable from otto_prepare_swap (this wraps it for a specific vault deposit) and from otto_prepare_yield_withdraw (opposite direction).

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?

Gives clear preconditions for use: executableMarketId must come from a deployable:true registry row, registryCommitment must match the recomputed commitment, and shares must clear previewDeposit within the pinned tolerance. It also clarifies the relationship to otto_prepare_swap rather than treating it as a competing alternative. It does not explicitly state when NOT to use it (e.g., pick otto_prepare_yield_withdraw to exit a vault), so it stops short of full 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.

Resources