Skip to main content
Glama

Prepare an LP position deposit

prepare_lp_position_deposit
Read-only

Retired Ethereum MEVCapture v2.1 deposits are rejected; reads, claims and withdrawals remain available. Prepare a v3 position mint or add_liquidity, initializing a new pool at initial_tick when requested, with every approval, refund and cleanup step. Ekubo ticks use base 1.000001, so tick = ln(price in base units) x 10^6 and a Uniswap-style 1.0001 calculation is 100x too small. The token ratio follows the range and current price: do every swap first, re-read the tick with the pool's current_state_query, then mint once. If the wallet lacks one side, execute that swap separately and size the deposit from the measured balance after its receipt, never a quoted output. See ekubo://docs/lp-position-workflow.

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>",
      "core_address": "<core_address>",
      "tick_lower": "<tick_lower>",
      "tick_upper": "<tick_upper>",
      "max_amount0": "<max_amount0>",
      "max_amount1": "<max_amount1>",
      "slippage_bps": "<slippage_bps>"
    },
    "name": "prepare_lp_position_deposit"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNomint_new
senderYesaddress
pool_idNoOmit when pool_key is supplied (decimal or 0x-hex integer)
chain_idYesEVM chain ID
pool_keyNoRequired for an uninitialized pool. PoolKey {token0, token1, config}: token addresses (zero = native), bytes32 config
token_idNoadd_liquidity only (decimal or 0x-hex integer)
tick_lowerYes
tick_upperYes
max_amount0YesMax token0 base units; 0 for single-sided (decimal integer)
max_amount1YesMax token1 base units; 0 for single-sided (decimal integer)
core_addressYesv3 Core address
initial_tickNoUninitialized pool only: initializes at this tick
slippage_bpsYesUser-selected liquidity slippage
pool_initializedNofalse only for a new pool to initialize here

Output Schema

NameRequiredDescriptionDefault
execution_plan_referenceNoartifact_reference; pass unchanged

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, so the description carries the real burden and does: it discloses that the tool returns a full step sequence with approvals, refunds and cleanup, that v2.1 requests are rejected, and that the deposit must be sized from a measured post-swap balance rather than a quoted output. That is far more behavioral context than the single annotation provides; the readOnlyHint is consistent because the tool prepares steps rather than executing them, though the instruction to "execute that swap separately" could be read as more imperative than the annotation implies.

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?

Front-loaded with the most decision-relevant fact (v2.1 retired), then what the tool does, then the error-prone tick math, then the execution ordering. It is dense and reads as a run-on paragraph rather than discrete steps, but almost every clause carries operational weight; the doc reference at the end is well placed.

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 14-parameter transaction-preparation tool with an output schema, this covers the hard parts: mode selection, uninitialized-pool initialization, tick conversion, swap/mint ordering, and single-sided fallback. Return values need not be described because an output schema exists, and the linked workflow doc absorbs the remaining procedural depth.

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 79%, so the schema documents most fields; the description still adds real meaning the schema lacks — the Ekubo tick conversion (tick = ln(price) x 10^6, base 1.000001, and that a Uniswap-style 1.0001 calculation is 100x too small) is essential to filling tick_lower/tick_upper correctly. It also ties max_amount0/1 to the single-sided swap workflow and ties max_amount sizing to the measured balance. It does not add much on slippage_bps, chain_id or core_address, but those are self-evident.

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?

"Prepare a v3 position mint or add_liquidity" gives a specific verb plus resource, and the opening sentence separates this tool from its retired v2.1 predecessor and from the sibling read/claim/withdraw operations that remain available. An agent can tell exactly which of the prepare_lp_position_* family this is without opening the 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?

It states when this is the wrong tool (v2.1 deposits are rejected), which of the two modes to choose, and when pool initialization is needed (initial_tick / uninitialized pool). It also prescribes an explicit ordering — do swaps first, re-read the tick via current_state_query, then mint once — plus a fallback path when a wallet lacks one side, and points to a workflow doc.

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.