Skip to main content
Glama

Preview an Aave Vault deposit, mint, withdraw or redeem

get_vault_preview
Read-only

v3 only. Convert between a vault's assets and its shares at the current index, without building anything. Which unit 'amount' is in depends on the action, and this is the thing to get right: 'deposit' takes ASSETS and returns the shares minted, 'mint' takes SHARES and returns the assets it would cost, 'withdraw' takes ASSETS and returns the shares burnt, 'redeem' takes SHARES and returns the assets returned. Use the assets pair to fix the token amount exactly and the shares pair to fix the share count exactly. Call this before prepare_vault_action rather than multiplying by a rate: the index moves.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vaultYesVault contract address, 0x-prefixed (40 hex chars).
actionYesWhich conversion: deposit/withdraw speak assets, mint/redeem speak shares.
amountYesAmount in main units (e.g. '10.5'), in the unit the action takes.
chainIdYesChain the vault is on, e.g. 1 for Ethereum.
versionNoOptional, and only 'v3': this tool exists on v3 only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds meaningful behavioral context: the conversion happens at the current index, the index moves over time, and nothing is built on-chain. This goes beyond the annotations, though it does not detail output format or error behavior.

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 dense and front-loaded: it opens with 'v3 only', gives the core conversion concept, then the unit mapping, and then call-time guidance. It is somewhat long, but each sentence earns its place by covering required semantics rather than repeating the schema.

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 read-only preview tool with no output schema, the description tells the agent what each action returns, what unit the amount must be in, when to call it relative to prepare_vault_action, and that it is v3-only. Combined with full schema coverage of all parameters, this is sufficient for correct invocation.

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 important semantics by explaining that 'amount' is interpreted as assets for deposit/withdraw and as shares for mint/redeem, and by advising the agent to use the assets pair or shares pair to fix the exact amount or count. This materially clarifies the interplay between 'action' and 'amount'.

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 states a specific operation: converting a vault's assets to/from shares at the current index, and explicitly says 'without building anything', which distinguishes it from prepare_vault_action. It also names all four action modes, making its scope unambiguous.

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?

It explicitly instructs the agent to call this before prepare_vault_action rather than multiplying by a rate because 'the index moves'. It also warns that the unit of 'amount' depends on the action and gives the exact unit mapping for deposit/mint/withdraw/redeem, which is clear invocation 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