Skip to main content
Glama
tamago-labs

Tapp Exchange MCP Server

by tamago-labs

tapp_create_clmm_pool_and_add_liquidity

Create a CLMM pool on Tapp Exchange, define trading fees, and add initial liquidity with specified token amounts, price range, and initial price.

Instructions

Create a CLMM pool and add initial liquidity

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountsYesThe initial token amounts
feeYesThe fee traders will pay to use your pool's liquidity
initialPriceYesStarting price for liquidity
isMaxAmountBYesWhether the second token amount (amountB) is flexible based on slippage
maxPriceYesThe upper bound price of the liquidity range
minPriceYesThe lower bound price of the liquidity range
tokenAddressYesAn array of token addresses

Implementation Reference

  • Primary definition and registration of the McpTool named 'tapp_create_clmm_pool_and_add_liquidity' including schema and inline handler
    export const CreateCLMMPoolAndAddLiquidityTool: McpTool = {
        name: "tapp_create_clmm_pool_and_add_liquidity",
        description: "Create a CLMM pool and add initial liquidity",
        schema: {
            tokenAddress: z.array(z.string()).describe("An array of token addresses"),
            fee: z.number().describe("The fee traders will pay to use your pool's liquidity"),
            amounts: z.array(z.number()).describe("The initial token amounts"),
            initialPrice: z.number().describe("Starting price for liquidity"),
            minPrice: z.number().describe("The lower bound price of the liquidity range"),
            maxPrice: z.number().describe("The upper bound price of the liquidity range"),
            isMaxAmountB: z.boolean().describe("Whether the second token amount (amountB) is flexible based on slippage")
        },
        handler: async (agent: TappAgent, input: Record<string, any>) => {
            const result = await agent.createCLMMPoolAndAddLiquidity({
                tokenAddress: input.tokenAddress,
                fee: input.fee,
                amounts: input.amounts,
                initialPrice: input.initialPrice,
                minPrice: input.minPrice,
                maxPrice: input.maxPrice,
                isMaxAmountB: input.isMaxAmountB
            });
            return {
                status: "success",
                transaction: result
            };
        },
    };
  • Core handler logic in TappAgent that creates the CLMM pool and adds liquidity by calling the Tapp SDK and submitting the transaction
    async createCLMMPoolAndAddLiquidity(params: CreateCLMMPoolAndAddLiquidityParams): Promise<TransactionResponse> {
        try {
            const data = this.sdk.Position.createCLMMPoolAndAddLiquidity(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'
            };
        }
    }
  • Zod input schema for the tool parameters
    schema: {
        tokenAddress: z.array(z.string()).describe("An array of token addresses"),
        fee: z.number().describe("The fee traders will pay to use your pool's liquidity"),
        amounts: z.array(z.number()).describe("The initial token amounts"),
        initialPrice: z.number().describe("Starting price for liquidity"),
        minPrice: z.number().describe("The lower bound price of the liquidity range"),
        maxPrice: z.number().describe("The upper bound price of the liquidity range"),
        isMaxAmountB: z.boolean().describe("Whether the second token amount (amountB) is flexible based on slippage")
    },
  • src/mcp/index.ts:39-39 (registration)
    Final registration of the tool in the main TappExchangeMcpTools export object
    "CreateCLMMPoolAndAddLiquidityTool": CreateCLMMPoolAndAddLiquidityTool,
  • MCP tool handler that extracts input and calls the TappAgent method
    handler: async (agent: TappAgent, input: Record<string, any>) => {
        const result = await agent.createCLMMPoolAndAddLiquidity({
            tokenAddress: input.tokenAddress,
            fee: input.fee,
            amounts: input.amounts,
            initialPrice: input.initialPrice,
            minPrice: input.minPrice,
            maxPrice: input.maxPrice,
            isMaxAmountB: input.isMaxAmountB
        });
        return {
            status: "success",
            transaction: result
        };
    },
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral information. It doesn't disclose whether this is a write operation (implied by 'create' but not explicit), what permissions are needed, potential costs/gas fees, whether the operation is reversible, or what happens on failure. For a complex financial operation with 7 required parameters, this is inadequate.

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.

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 tool with 7 required parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what CLMM means, doesn't provide usage context versus sibling tools, and offers no behavioral transparency about this being a write operation with potential financial implications.

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 parameters thoroughly. The description adds no additional parameter context beyond what's in the schema. The baseline of 3 is appropriate when the schema does all the parameter documentation work.

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 ('Create a CLMM pool and add initial liquidity'), specifying both pool creation and liquidity addition. It distinguishes this from sibling tools like 'tapp_create_amm_pool_and_add_liquidity' by specifying CLMM type, but doesn't explain what CLMM means or how it differs from AMM/stable pools.

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?

No guidance is provided about when to use this tool versus alternatives. With sibling tools like 'tapp_create_amm_pool_and_add_liquidity' and 'tapp_create_stable_pool_and_add_liquidity', the description should explain when CLMM is appropriate versus AMM or stable pools, but it offers no such context.

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