Prepare a guarded Morpho vault deposit
prepare_morpho_vault_depositPrepare an exact-approval Morpho Vault V2 deposit through the official SDK's VaultBundlesV1 route. The caller supplies a fresh RAY-scaled max share price, which is enforced onchain against ERC-4626 share-price inflation; shares are minted to the sender and the server performs no data fetch.
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": {
"chain_id": "<chain_id>",
"sender": "<sender>",
"vault": "<vault>",
"amount": "<amount>",
"max_share_price_ray": "<max_share_price_ray>"
},
"name": "prepare_morpho_vault_deposit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vault | Yes | Exact Morpho Vault V2 address returned by get_morpho_vaults | |
| amount | Yes | Positive underlying-asset amount in base units (positive decimal integer) | |
| sender | Yes | Wallet that will execute the Morpho action (address) | |
| chain_id | Yes | Chain returned by get_morpho_vaults | |
| deadline | No | Unix timestamp after which VaultBundlesV1 rejects the deposit; defaults to two hours after preparation. One already past makes the plan a guaranteed revert. (positive decimal integer) | |
| recipient | No | Vault-share recipient; must equal sender if supplied, because VaultBundlesV1 mints shares only to the transaction sender (address) | |
| max_share_price_ray | Yes | Maximum acceptable vault share price in RAY (1e27), derived by the agent from fresh Morpho/onchain vault state plus the user's slippage tolerance (positive decimal integer) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| execution_plan_reference | No | artifact_reference; pass unchanged |