Skip to main content
Glama

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
NameRequiredDescriptionDefault
poolIdYesThe ID of the CLMM pool
positionsYesAn array of position objects

Implementation Reference

  • 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 }; }, };
  • 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,
  • Type import for RemoveMultipleCLMMLiquidityParams used in agent method. (Actual type defs in src/types/index.ts)
    RemoveMultipleCLMMLiquidityParams, RemoveSingleStableLiquidityParams, RemoveMultipleStableLiquidityParams,

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tamago-labs/tapp-exchange-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server