Skip to main content
Glama
tamago-labs

Tapp Exchange MCP Server

by tamago-labs

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

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

With no annotations, the description carries full burden but only states the action without behavioral details. It doesn't disclose that this is a destructive write operation (implied by 'Remove'), potential transaction costs, authorization needs, or what happens to the removed liquidity. More context on risks or outcomes is needed.

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 with zero waste—it directly states the tool's purpose without fluff. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 destructive tool with no annotations and no output schema, the description is incomplete. It lacks crucial context like what 'remove liquidity' entails (e.g., burning shares, receiving tokens), potential side effects, or error conditions. More detail is needed given the complexity and risk involved.

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 parameters are well-documented in the schema. The description adds no additional meaning beyond implying 'multiple positions' via the tool name, but doesn't explain parameter relationships or usage. Baseline 3 is appropriate as the schema handles documentation.

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 ('Remove liquidity') and target ('from multiple CLMM positions'), which is specific and distinguishes it from single-position removal tools. However, it doesn't explicitly differentiate from 'tapp_remove_multiple_amm_liquidity' or 'tapp_remove_multiple_stable_liquidity' beyond the CLMM specification in the name.

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 on when to use this tool versus alternatives like 'tapp_remove_single_clmm_liquidity' or other removal tools. The description lacks context about prerequisites, such as needing existing positions, or when batch removal is preferred over single operations.

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