Skip to main content
Glama

Prepare a Yield Copilot vault withdraw (Morpho USDC on Base) as a delegable swap pair

otto_prepare_yield_withdraw
Read-only

Prepare the EXACT otto_prepare_swap pair (envelope + prepareInput) that redeems vault shares from one of the executable Morpho vaults in the Yield Copilot registry back to USDC in the signing account, as a LI.FI exit route (which may sell shares or compose a protocol redemption) whose input token is the vault's ERC-4626 share token. The vault and the asset come from the registry row named by executableMarketId and are never inputs; the caller's registryCommitment must equal the commitment recomputed over the current record. The quoted USDC is checked against the vault's own previewRedeem and refused when it falls short by more than the pinned tolerance. Returns the pair unchanged plus a preview; never signs or submits — submit the pair through otto_submit_under_delegation, which admits a withdraw only under fence v2 and a permission minted under cap ruleset v2, values it at zero against the per-swap cap (it returns the person's own assets), and bounds it by the engine's share cap. 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sharesYes
slippageYes
client_refNo
accountProfileYes
executableMarketIdYes
registryCommitmentYes

Output Schema

TableJSON 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",
      -  "shares",
      -  "expected_assets",
      -  "min_assets",
      -  "preview_redeem_assets",
      -  "parity_shortfall_bps",
      -  "parity_tolerance_bps",
      -  "quoted_fees"
      -]New value: +[
      +  "market_id",
      +  "venue",
      +  "protocol",
      +  "chain_id",
      +  "vault",
      +  "asset",
      +  "shares",
      +  "expected_assets",
      +  "min_assets",
      +  "preview_redeem_assets",
      +  "parity_shortfall_bps",
      +  "parity_tolerance_bps",
      +  "quoted_fees",
      +  "route_semantics"
      +]
  2. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, openWorld, non-idempotent, non-destructive), and the description adds substantial non-obvious behavior: the previewRedeem cross-check with a pinned tolerance refusal, the registryCommitment recomputation requirement, the 300-second envelope validity window, and how the withdraw is valued (zero against the per-swap cap) and bounded (engine share cap). This is far more than the annotations convey.

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?

The purpose is front-loaded, but the text is a single dense paragraph that mixes construction semantics, safety checks, submission routing, and cap rules into one run-on block, and repeats the otto_prepare_swap framing. Everything roughly earns its place, yet the lack of structure makes it harder to scan than it needs to be.

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?

An output schema exists, so return values need not be described, and the description still supplies the prerequisites (registry commitment match, previewRedeem tolerance), the lifecycle constraint (300s validity), and the downstream submission path. For a prepare-only tool, nothing an agent needs to invoke it correctly is missing.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must carry the burden. It explains executableMarketId (names the registry row supplying vault and asset) and registryCommitment (must equal the recomputed commitment) and alludes to the slippage tolerance, but shares, accountProfile, slippage.maxBps bounds, and client_ref are left entirely to the schema's structural constraints.

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+resource (prepare the swap pair that redeems Yield Copilot Morpho vault shares back to USDC), names the exact artifact produced (envelope + prepareInput), and pins the route type (LI.FI exit whose input token is the ERC-4626 share token). An agent can distinguish it from otto_prepare_swap and otto_prepare_yield_deposit from the text alone.

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?

Explicitly routes the agent: the returned pair must be submitted through otto_submit_under_delegation, and it states the operation is admitted only under fence v2 with a cap-ruleset-v2 permission. However, it never states when NOT to use this tool (e.g. versus a direct swap or deposit), so the alternative-selection is implied rather than fully spelled out.

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