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.6/5.0
Behavior5/5

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

Given no annotations, the description fully discloses behavior: it is a mutation (POST), requires approvals, returns a quote that expires, needs private key/wallet signer, handles price impact, and can error with 'swap amount too small'. It also explains the inclusion of intermediate swaps, price-range setup, and surplus return.

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 relatively long but well-structured, starting with API mapping, core feature, CL support, execution flow, and warnings. Most sentences add value, though some repetition ('any input token' restated) could be trimmed. Still, it remains focused and useful.

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?

For a complex tool with no output schema or annotations, the description covers purpose, parameters, execution steps, error conditions, and warnings. It mentions priceImpact in the response but could elaborate on the full response structure. Still, it provides sufficient context for an agent to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions, but the description adds significant extra meaning: explains poolId must be verbatim from search result, tickLower/tickUpper usage for CL pools, deposits token address format (0x0000...0000 for native), and affiliateCode purpose. This goes well beyond the schema.

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 the tool maps to POST /addliquidity/quote and builds a single-transaction zap to enter an LP position from any input token. It distinguishes from siblings like zap_out_of_lp_position and get_swap_quote by emphasizing that the deposit token does not have to be a pool underlying token and that it handles all intermediate swaps plus LP mint in one transaction.

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?

Provides extensive guidance on when to use (e.g., for entering LP positions, supporting both CL and classic pools), execution flow (approvals, fresh quotes, sending tx), and important constraints (poolId must be verbatim from search_liquidity_pools). It does not explicitly state when not to use it or compare to alternatives like get_swap_quote, but the context is very clear.

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.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: pool analysis, health check, quotes (standard and clean), setup guide, chain/DEX info, LP position listing, pool search, and zap in/out. No two tools overlap in functionality.

Naming Consistency4/5

All tool names use snake_case, but the verb prefixes are not uniform: some use 'get_*', others use 'analyze_', 'check_', 'list_', 'search_', 'zap_'. While still clear, a more consistent prefix pattern would improve predictability.

Tool Count5/5

11 tools cover the full scope of a DeFi liquidity management server: discovery, analysis, quoting, entry/exit, and auxiliary info. No redundant tools, and the count is well within the optimal range.

Completeness5/5

The tool surface covers all essential operations for liquidity management: pool search and analysis, swap quotes, position listing, and single-transaction zap in/out. No critical gaps are evident.

Resources