Skip to main content
Glama

tapp_add_clmm_liquidity

Add liquidity to a Concentrated Liquidity Market Maker (CLMM) pool on Tapp Exchange by specifying pool ID, token amounts, fee tier, price range, and slippage flexibility.

Instructions

Add liquidity to an existing CLMM pool

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountAYesThe amount of token A to add
amountBYesThe amount of token B to add
feeYesThe fee tier of the pool
isMaxAmountBYesWhether the second token amount (amountB) is flexible based on slippage
maxPriceYesThe maximum price of the liquidity range
minPriceYesThe minimum price of the liquidity range
poolIdYesThe unique identifier of the CLMM pool

Implementation Reference

  • MCP tool handler that validates input, calls TappAgent.addCLMMLiquidity, and returns transaction result.
    handler: async (agent: TappAgent, input: Record<string, any>) => { const result = await agent.addCLMMLiquidity({ poolId: input.poolId, amountA: input.amountA, amountB: input.amountB, fee: input.fee, isMaxAmountB: input.isMaxAmountB, minPrice: input.minPrice, maxPrice: input.maxPrice }); return { status: "success", transaction: result }; },
  • Zod schema defining the input parameters for the tapp_add_clmm_liquidity tool.
    schema: { poolId: z.string().describe("The unique identifier of the CLMM pool"), amountA: z.number().describe("The amount of token A to add"), amountB: z.number().describe("The amount of token B to add"), fee: z.number().describe("The fee tier of the pool"), isMaxAmountB: z.boolean().describe("Whether the second token amount (amountB) is flexible based on slippage"), minPrice: z.number().describe("The minimum price of the liquidity range"), maxPrice: z.number().describe("The maximum price of the liquidity range")
  • src/mcp/index.ts:44-44 (registration)
    Registration of the AddCLMMLiquidityTool (named tapp_add_clmm_liquidity) in the central TappExchangeMcpTools object.
    "AddCLMMLiquidityTool": AddCLMMLiquidityTool,
  • TappAgent helper method that generates and submits the add CLMM liquidity transaction using the Tapp SDK.
    async addCLMMLiquidity(params: AddCLMMLiquidityParams): Promise<TransactionResponse> { try { const data = this.sdk.Position.addCLMMLiquidity(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' }; } }
  • TypeScript interface reference for AddCLMMLiquidityParams used in TappAgent.
    AddCLMMLiquidityParams,

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