Calculate Uniswap concentrated liquidity amounts
quote_uniswap_liquidityCalculate V3/V4 range liquidity, rounded mint/burn amounts and explicit token bounds from a current sqrt-price snapshot and raw token budgets, or an exact liquidity amount. Fees are excluded. Obtain current state using prepare_uniswap_reads.
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": {
"tick_lower": "<tick_lower>",
"tick_upper": "<tick_upper>",
"tick_spacing": "<tick_spacing>",
"sqrt_price_x96": "<sqrt_price_x96>",
"amount0": "<amount0>",
"amount1": "<amount1>"
},
"name": "quote_uniswap_liquidity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount0 | Yes | decimal integer | |
| amount1 | Yes | decimal integer | |
| liquidity | No | decimal integer | |
| tick_lower | Yes | ||
| tick_upper | Yes | ||
| slippage_bps | No | ||
| tick_spacing | Yes | ||
| sqrt_price_x96 | Yes | decimal integer |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| liquidity | No | ||
| amount0_max | No | ||
| amount0_min | No | ||
| amount1_max | No | ||
| amount1_min | No | ||
| instructions | No | ||
| mint_amount0 | No | ||
| mint_amount1 | No | ||
| input_snapshot | No | ||
| live_state_queried | No |