tapp_remove_multiple_clmm_liquidity
Remove liquidity from multiple Concentrated Liquidity Market Maker (CLMM) positions on Tapp Exchange. Specify pool ID, position addresses, share amounts, and minimum token outputs for efficient liquidity management.
Instructions
Remove liquidity from multiple CLMM positions
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| poolId | Yes | The ID of the CLMM pool | |
| positions | Yes | An array of position objects |
Implementation Reference
- src/mcp/tapp/liquidity-tools.ts:226-248 (handler)MCP tool definition including name, description, input schema (Zod), and handler function that calls TappAgent.removeMultipleCLMMLiquidity and returns transaction result.export const RemoveMultipleCLMMLiquidityTool: McpTool = { name: "tapp_remove_multiple_clmm_liquidity", description: "Remove liquidity from multiple CLMM positions", schema: { poolId: z.string().describe("The ID of the CLMM pool"), positions: z.array(z.object({ positionAddr: z.string().describe("The address of the liquidity position"), mintedShare: z.number().describe("The amount of share tokens to burn"), minAmount0: z.number().describe("Minimum amount of token0"), minAmount1: z.number().describe("Minimum amount of token1") })).describe("An array of position objects") }, handler: async (agent: TappAgent, input: Record<string, any>) => { const result = await agent.removeMultipleCLMMLiquidity({ poolId: input.poolId, positions: input.positions }); return { status: "success", transaction: result }; }, };
- src/agent/index.ts:506-525 (helper)TappAgent method implementing the core logic: calls SDK to generate transaction payload and submits it via Aptos transaction client.async removeMultipleCLMMLiquidity(params: RemoveMultipleCLMMLiquidityParams): Promise<TransactionResponse> { try { const data = this.sdk.Position.removeMultipleCLMMLiquidity(params); const response = await this.aptos.transaction.submit.simple({ sender: this.account.accountAddress, data: data } as any); return { hash: response.hash, success: true }; } catch (error) { return { hash: '', success: false, error: error instanceof Error ? error.message : 'Unknown error' }; } }
- src/mcp/index.ts:51-51 (registration)Registers the RemoveMultipleCLMMLiquidityTool in the central TappExchangeMcpTools export object."RemoveMultipleCLMMLiquidityTool": RemoveMultipleCLMMLiquidityTool,
- src/agent/index.ts:28-30 (schema)Type import for RemoveMultipleCLMMLiquidityParams used in agent method. (Actual type defs in src/types/index.ts)RemoveMultipleCLMMLiquidityParams, RemoveSingleStableLiquidityParams, RemoveMultipleStableLiquidityParams,