Skip to main content
Glama
tamago-labs

Tapp Exchange MCP Server

by tamago-labs

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,
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Add liquidity' implies a write/mutation operation, the description doesn't disclose critical behavioral aspects like required permissions, whether this is a transaction that costs gas/fees, potential for slippage, or what happens to existing liquidity positions. For a financial operation with 7 required parameters, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized and front-loaded with the essential information, making every word earn its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex financial operation with 7 required parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what 'adding liquidity' means operationally, what the tool returns, potential risks, or how it differs from similar sibling tools. The context demands more comprehensive guidance for safe and correct usage.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all 7 parameters thoroughly. The description doesn't add any parameter semantics beyond what's in the schema - it doesn't explain relationships between parameters (e.g., how minPrice/maxPrice define the range, how isMaxAmountB affects amountB calculation, or how fee relates to pool selection). Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Add liquidity') and target resource ('existing CLMM pool'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate this tool from its sibling 'tapp_create_clmm_pool_and_add_liquidity' which suggests a similar function but with pool creation included.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With multiple sibling tools for adding liquidity (CLMM, AMM, stable) and creating pools with liquidity, there's no indication of when this specific tool is appropriate versus 'tapp_create_clmm_pool_and_add_liquidity' or other liquidity addition methods.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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