Skip to main content
Glama

Yield.xyz AgentKit

Exit a Yield

actions_exit

Construct unsigned transactions to unstake or withdraw from a yield. Does NOT execute — the user must sign each transaction exactly as returned (never modify unsignedTransaction). Amounts are human-readable strings ("1.5" = 1.5 tokens, not wei). Submit transactions in stepIndex order. Call yields_get_balances first to verify the staked balance. To complete a PENDING withdrawal (e.g. claiming after a cooldown) that carries a passthrough value, use actions_manage — exit does NOT accept passthrough. For RWA and ERC-4626 vaults, inspect yields_get → mechanics.arguments.exit.fields[] to discover yield-specific options (e.g. useInstantExecution, useMaxAmount, receiverAddress).

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": {
      "yieldId": "<yieldId>",
      "address": "<address>"
    },
    "name": "actions_exit"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountNoAmount to withdraw in token units e.g. "1.5". Optional when useMaxAmount is true on supported yields.
addressYesWallet address that owns the position.
yieldIdYesYield ID from yields_get_all e.g. "ethereum-eth-lido-staking".
outputTokenNoWithdrawal token address, for yields that can pay out in more than one token. Required when yields_get → mechanics.arguments.exit.fields[] lists an outputToken field with required: true; that field's options[] holds the valid addresses. Use "0x" to receive the network's native token.
useAutoClaimNoOptional. Available on yields whose exit schema lists this field (e.g. Nest RWA vaults). true = authorize the redeem operator to auto-claim settled async redemptions (adds a one-time per-wallet operator approval), so no manual claim is needed after settlement. false or omitted = claim manually once the redemption settles. Honored only when listed in yields_get exit schema.
useMaxAmountNoOptional. ERC-4626 vault convenience flag. true = redeem the full position (overrides amount). Honored only when listed in yields_get exit schema.
executionModeNoTransaction execution mode. Defaults to "individual". "batched" is reserved for future use — batch mode is not yet available across all yields and should not be used until fully enabled.
receiverAddressNoOptional. ERC-4626 vault convenience field. Address that should receive the underlying token from the redemption. Defaults to the position owner (`address`). Honored only when listed in yields_get exit schema.
validatorAddressNoValidator address to undelegate from. Required for delegation-based yields.
outputTokenNetworkNoNetwork of the output token e.g. "ethereum". Only for cross-chain withdrawals, where the destination token is not on the vault's own network.
useInstantExecutionNoOptional. Available on yields whose exit schema lists this field (e.g. Midas mTBILL, Upshift vaults, Marinade on Solana). true = instant redemption (settles same block, may incur a higher fee — Midas docs quote up to 50 bps for mTBILL). false or omitted = standard redemption (queues; for RWAs settlement may take 1-7 business days — poll yields_get_balances and read the "exiting" entry's `date` field for the expected settlement timestamp). Distinct from executionMode (which controls per-step batching, not redemption path).

Output Schema

NameRequiredDescriptionDefault
idYes
typeYes
amountYes
intentYes
statusYes
addressYes
yieldIdYes
amountRawYes
amountUsdYes
createdAtYes
completedAtYes
rawArgumentsYes
transactionsYes
executionPatternYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed18 schema fields changed
    • removedOutput schema / properties / amount / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / amount / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / amountRaw / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / amountRaw / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / amountUsd / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / amountUsd / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / completedAt / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / completedAt / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / transactions / items / properties / broadcastedAt / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / transactions / items / properties / broadcastedAt / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / transactions / items / properties / error / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / transactions / items / properties / error / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / transactions / items / properties / explorerUrl / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / transactions / items / properties / explorerUrl / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / transactions / items / properties / hash / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / transactions / items / properties / hash / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / transactions / items / properties / signedTransaction / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / transactions / items / properties / signedTransaction / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior3/5

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

Annotations already declare non-read-only, non-destructive, non-idempotent behavior, so the baseline is set. The description still adds real value beyond them: it discloses that nothing executes server-side, that the returned unsignedTransaction must never be modified, that amounts are human-readable strings rather than wei, and that steps must be submitted in stepIndex order. It does not cover auth requirements or what happens if a signed transaction is rejected, so it sits above baseline but not at the top.

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?

The core constraint — unsigned, user-signed, do not modify — is front-loaded in the first two sentences, followed by operational ordering rules and then sibling routing. Every clause carries a constraint or a routing decision; nothing is filler despite the paragraph's density.

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 an 11-parameter, multi-step, non-executing mutation tool this covers the full call contract: construction vs. signing, ordering, unit format, prerequisite balance check, sibling escape hatch, and yield-specific option discovery. An output schema and rich parameter descriptions already handle return values and per-field detail, so nothing material is missing.

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 description coverage is 100%, so the schema already carries each parameter's meaning and the baseline would be 3. The description adds cross-parameter context the schema cannot: which flags are only honored when listed in the yield's exit schema, and the explicit semantic separation of useInstantExecution (redemption path) from executionMode (per-step batching).

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 concrete verb and resource — 'Construct unsigned transactions to unstake or withdraw from a yield' — and immediately distinguishes itself from the write-path siblings by clarifying it does not execute. An agent can tell this apart from actions_enter and actions_manage 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?

Gives explicit routing rules: call yields_get_balances first to verify balance, and use actions_manage instead when completing a PENDING withdrawal that carries a passthrough value, since exit 'does NOT accept passthrough'. It also points at yields_get → mechanics.arguments.exit.fields[] as the discovery path for yield-specific options, which is genuinely actionable when-to-use 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