New Your team’s decisions, in one playbook every coding agent works from. Never answer your agent twice

zap_out_of_lp_position

Maps to POST /removeliquidity/quote. Builds a single-transaction zap to exit an LP position into ANY output token — you can withdraw into any token, not just the pool's underlying tokens. SwapWizard handles LP burn, fee collection, and intermediate swaps in a single transaction. Supports an optio...

SERVERSwapwizard SOURCE@swapwizard/mcp-server
Critical RISK CLASS
Category Financial
Parameters 104 required
Recommended Approval-gatedsee the rule below
Registry record Grade D, identity unverified Pull the record →

This record as markdown: /tools/defire-business-swapwizard-mcp/zap-out-of-lp-position.md

What zap_out_of_lp_position does on Swapwizard

AI agents use zap_out_of_lp_position to commit financial operations through Swapwizard, usually the final step of a payment, billing, or trading workflow. A call moves real money.

ParameterTypeRequiredDescription
poolId string Pool identifier from search_liquidity_pools — pass if available.
sender string Yes Wallet address of the position owner.
chainId integer Yes EVM chain ID
dexName string DEX project name from list_user_lp_positions (e.g. 'Uniswap V3', 'PancakeSwap V3', 'curve-dex').
percent integer Percentage of position to remove (default: 100). For classic LP pools (UniV2, Solidly, Curve, Balancer) use 99 instead of 100 to avoid reverts from LP balance r
nftManager string NFT position manager contract address from list_user_lp_positions. Required for CL positions (Uniswap V3/V4, PancakeSwap V3/Infinity CL, SushiSwap V3, Algebra).
positionId string Yes Position identifier from list_user_lp_positions. For CL positions: NFT token ID. For classic pools: LP token contract address.
withdrawals array Yes Tokens to receive after removal
affiliateCode string Optional affiliate wallet address registered on-chain with SwapWizard — forwarded to the API so the affiliate fee for this operation is paid to that address. Om
liquidityKind string Liquidity kind from list_user_lp_positions (e.g. UNIV3, UNIV4, ALGEBRA, SLIPSTREAM, PCS_INF_CL, CURVE, UNIV2, SOLIDLY).

Parameters from the server's own tool schema.

Why zap_out_of_lp_position is rated Critical

This tool executes on-chain DeFi transactions that burn LP positions, collect fees, and perform token swaps — all of which move financial assets. Misuse could result in irreversible loss of user funds across 5 EVM chains, making it a Financial/critical risk tool.

From the tool's definition 'zap to exit an LP position', 'LP burn, fee collection, and intermediate swaps in a single transaction', 'POST /removeliquidity/quote', 'DeFi execution layer for AI agents - swap, zap in/out of LP'

Risk signalsHandles credentials or secrets (withdrawals[].token) · High parameter count (11 properties)

Questions about zap_out_of_lp_position

What does the zap_out_of_lp_position tool do? +

Maps to POST /removeliquidity/quote. Builds a single-transaction zap to exit an LP position into ANY output token — you can withdraw into any token, not just the pool's underlying tokens. SwapWizard handles LP burn, fee collection, and intermediate swaps in a single transaction. Supports an optional affiliateCode (registered affiliate wallet address) forwarded to the API so the affiliate fee is paid on-chain to that address. REQUIRED WORKFLOW: First call list_user_lp_positions, then pass the returned fields (positionId, nftManager, dexName, liquidityKind) here along with sender, poolId, and withdrawals. EXECUTION FLOW: (1) APPROVE — For NFT-based positions, call setApprovalForAll(router, true) on the nftManager contract (do NOT use approve(router, tokenId)). For PCS Infinity BIN, call approveForAll(router, true). For classic LP pools (Curve, Balancer, Uniswap V2, Solidly), approve the LP token as a standard ERC-20. (2) WAIT for the approve tx to be confirmed on-chain. (3) Call this tool again for a fresh quote (quotes expire). (4) 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. It is categorised as a Financial tool in the Swapwizard MCP Server, which means it involves financial transactions. Block by default and require explicit approval.

What parameters does zap_out_of_lp_position accept? +

zap_out_of_lp_position accepts 10 parameters: poolId, sender, chainId, dexName, percent, nftManager, positionId, withdrawals, affiliateCode, liquidityKind. Required: sender, chainId, positionId, withdrawals. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on zap_out_of_lp_position? +

Register the Swapwizard MCP server in PolicyLayer and add a rule for zap_out_of_lp_position: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Swapwizard. Nothing to install.

What risk level is zap_out_of_lp_position? +

zap_out_of_lp_position is a Financial tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.

Can I rate-limit zap_out_of_lp_position? +

Yes. Add a rate_limit block to the zap_out_of_lp_position rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block zap_out_of_lp_position completely? +

Set action: deny in the PolicyLayer policy for zap_out_of_lp_position. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides zap_out_of_lp_position? +

zap_out_of_lp_position is provided by the Swapwizard MCP server (@swapwizard/mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

More on Swapwizard, and thousands of servers like it.

// THE MCP REGISTRY

PolicyLayer tracks 44,603 MCP servers and 515,000+ tools.

Every server has a live record: who publishes it, whether it answers without auth, its risk grade, every tool classified, the recommended policy. This page is one line of Swapwizard's. Pull the full record:

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.