Skip to main content
Glama

zap_into_lp_position

Maps to POST /addliquidity/quote. Builds a single-transaction zap to enter an LP position from ANY input token — the deposit token does NOT have to be one of the pool's underlying tokens. SwapWizard handles all intermediate swaps, the LP mint, and price-range setup in a single transaction. FULL CONCENTRATED LIQUIDITY SUPPORT: for CL pools (Uniswap V3/V4, PancakeSwap V3/Infinity CL, Aerodrome Slipstream, SushiSwap V3, Algebra forks like Camelot/THENA/QuickSwap, Fluid, Balancer V3) you can set a custom price range via tickLower/tickUpper — omit them for the protocol's default range. Classic pools (Curve, Balancer V2, Uniswap V2, Solidly) are also supported. Surplus returned to the user. Supports an optional affiliateCode (registered affiliate wallet address) forwarded to the API so the affiliate fee is paid on-chain to that address. IMPORTANT: The poolId parameter MUST come verbatim from the poolId field in the search_liquidity_pools response — do NOT construct or modify it. EXECUTION FLOW: (1) If the deposit token is non-native, send an ERC-20 approve to the router and WAIT for on-chain confirmation. (2) Call this tool again for a fresh quote (quotes expire). (3) Send the tx to the router contract: to=router, data=callData, value=value. This requires a private key or wallet signer. ⚠️ PRICE IMPACT: The response includes a priceImpact field. Agents MUST present this value to the user and request explicit confirmation before executing. ⚠️ ZERO OUTPUT: If an internal swap amount is too small, the API returns HTTP 400 with "swap amount too small: output rounds to zero". Increase the deposit amount.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
poolIdYesPool identifier from search_liquidity_pools (e.g. 'pancakeswap-v3:0x36696...')
senderNoWallet address of the sender (for simulation)
chainIdYesEVM chain ID
depositsYesTokens and amounts to deposit
tickLowerNoCustom lower tick for concentrated liquidity
tickUpperNoCustom upper tick for concentrated liquidity
affiliateCodeNoOptional affiliate wallet address registered on-chain with SwapWizard — forwarded to the API so the affiliate fee for this operation is paid to that address. Omit if you have no affiliate.

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden, and it exceeds expectations. It discloses the execution flow (approve, re-quote, send), the requirement for a private key or wallet signer, the priceImpact field requiring user confirmation, the 'swap amount too small' error case, and that quotes expire. It also notes that surplus is returned to the user. This is highly transparent behavior disclosure.

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 long but well-structured with labeled sections (EXECUTION FLOW, PRICE IMPACT, ZERO OUTPUT) and uses warning symbols. It front-loads the core purpose and API mapping. The length is justified by the tool's complexity, but it contains some redundancy (e.g., 'single-transaction' repeated) and could be slightly tighter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (7 params, no output schema, no annotations), the description covers most essential context: supported pool types, execution prerequisites, potential errors, and safety warnings. However, it does not describe the full response structure (only mentions priceImpact and implies callData/value via instructions). This is a minor gap since the tool's output is central to its use.

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%, but the description adds significant meaning beyond the schema. It emphasizes that poolId must come verbatim from search_liquidity_pools and must not be modified, which is a critical constraint not fully captured in the schema. It also elaborates on tickLower/tickUpper behavior and affiliateCode's on-chain payment logic. This adds clear value over the schema alone, though the description could have covered a few more edge cases (e.g., deposits schema semantics).

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 clearly states what the tool does with a specific verb and resource: 'Builds a single-transaction zap to enter an LP position from ANY input token.' It also differentiates from the sibling tool zap_out_of_lp_position by using 'enter' vs 'exit', and describes the exact endpoint (POST /addliquidity/quote). This leaves no ambiguity about the tool's purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides extensive usage context: it explains that the tool works with any input token, supports both CL and classic pools, and gives explicit instructions on when to provide tickLower/tickUpper (custom range) and when to omit them (default range). It also warns about quote expiry and the need for a fresh quote before transaction. However, it does not explicitly compare to alternatives like get_swap_quote or list_user_lp_positions, so it falls short of a 5.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: health check, setup guide, chain/dex list, pool discovery, pool analysis, swap quoting (with per-use-case variant), LP position listing, and single-transaction LP entry/exit. No significant overlap.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (analyze_pool, get_swap_quote, list_user_lp_positions, etc.). Even 'zap_into_lp_position' and 'zap_out_of_lp_position' maintain the pattern with verbs 'zap_into' and 'zap_out_of'.

Tool Count5/5

11 tools is well-scoped for a DeFi liquidity management server covering health, discovery, quoting, and LP operations. Each tool earns its place without redundancy.

Completeness4/5

Covers core workflows: pool discovery, analysis, swap quotes, LP position management, and single-transaction zap in/out. Missing is a direct token approval tool, but instructions for approvals are embedded in relevant tools. Minor gap but highly functional.