Prepare Uniswap V4 liquidity deposit
prepare_uniswap_v4_add_liquidityMint or increase an exact liquidity amount using raw uint128 token maxima. Zero token0 means native ETH. Uses exact ERC20 and Permit2 approvals with cleanup, settles both signs of accrued-fee deltas on increase, and refunds native surplus. Verify NFT pool key/range and hook behavior; hook_data is forwarded unchanged. Optional pool initialization.
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>",
"deadline": "<deadline>",
"pool_id": "<pool_id>",
"token0": "<token0>",
"token1": "<token1>",
"fee": "<fee>",
"tick_spacing": "<tick_spacing>",
"tick_lower": "<tick_lower>",
"tick_upper": "<tick_upper>",
"liquidity": "<liquidity>",
"amount0_max": "<amount0_max>",
"amount1_max": "<amount1_max>"
},
"name": "prepare_uniswap_v4_add_liquidity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fee | Yes | ||
| hooks | No | address | |
| sender | Yes | address | |
| token0 | Yes | address | |
| token1 | Yes | address | |
| pool_id | Yes | bytes32 hex | |
| chain_id | Yes | ||
| deadline | Yes | decimal integer | |
| token_id | No | decimal integer | |
| hook_data | No | hex bytes | 0x |
| liquidity | Yes | decimal integer | |
| tick_lower | Yes | ||
| tick_upper | Yes | ||
| amount0_max | Yes | decimal integer | |
| amount1_max | Yes | decimal integer | |
| tick_spacing | Yes | ||
| initialize_sqrt_price_x96 | No | decimal integer |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| execution_plan_reference | No | artifact_reference; pass unchanged |