Skip to main content
Glama
tamago-labs

Tapp Exchange MCP Server

by tamago-labs

tapp_remove_multiple_amm_liquidity

Remove liquidity from multiple AMM positions on Tapp Exchange by specifying pool ID, position addresses, share tokens to burn, and minimum token amounts.

Instructions

Remove liquidity from multiple AMM positions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
poolIdYesThe ID of the pool
positionsYesAn array of position objects

Implementation Reference

  • Defines the core MCP tool 'tapp_remove_multiple_amm_liquidity' including name, description, input schema (Zod validation), and handler function that delegates to TappAgent.removeMultipleAMMLiquidity and returns the transaction response.
    export const RemoveMultipleAMMLiquidityTool: McpTool = {
        name: "tapp_remove_multiple_amm_liquidity",
        description: "Remove liquidity from multiple AMM positions",
        schema: {
            poolId: z.string().describe("The ID of the 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 token0"),
                minAmount1: z.number().describe("Minimum amount token1")
            })).describe("An array of position objects")
        },
        handler: async (agent: TappAgent, input: Record<string, any>) => {
            const result = await agent.removeMultipleAMMLiquidity({
                poolId: input.poolId,
                positions: input.positions
            });
            return {
                status: "success",
                transaction: result
            };
        },
    };
  • src/mcp/index.ts:25-58 (registration)
    Registers RemoveMultipleAMMLiquidityTool (tool name 'tapp_remove_multiple_amm_liquidity') in the main TappExchangeMcpTools export object, which is used by the MCP server.
    export const TappExchangeMcpTools = {
        // Pool Management Tools
        "GetPoolsTool": GetPoolsTool,
        "GetPoolInfoTool": GetPoolInfoTool,
    
        // Swap Tools
        "GetSwapEstimateTool": GetSwapEstimateTool,
        "GetSwapRouteTool": GetSwapRouteTool,
        "SwapAMMTool": SwapAMMTool,
        "SwapCLMMTool": SwapCLMMTool,
        "SwapStableTool": SwapStableTool,
    
        // Pool Creation and Initial Liquidity Tools
        "CreateAMMPoolAndAddLiquidityTool": CreateAMMPoolAndAddLiquidityTool,
        "CreateCLMMPoolAndAddLiquidityTool": CreateCLMMPoolAndAddLiquidityTool,
        "CreateStablePoolAndAddLiquidityTool": CreateStablePoolAndAddLiquidityTool,
    
        // Add Liquidity Tools
        "AddAMMLiquidityTool": AddAMMLiquidityTool,
        "AddCLMMLiquidityTool": AddCLMMLiquidityTool,
        "AddStableLiquidityTool": AddStableLiquidityTool,
    
        // Remove Liquidity Tools
        "RemoveSingleAMMLiquidityTool": RemoveSingleAMMLiquidityTool,
        "RemoveMultipleAMMLiquidityTool": RemoveMultipleAMMLiquidityTool,
        "RemoveSingleCLMMLiquidityTool": RemoveSingleCLMMLiquidityTool,
        "RemoveMultipleCLMMLiquidityTool": RemoveMultipleCLMMLiquidityTool,
        "RemoveSingleStableLiquidityTool": RemoveSingleStableLiquidityTool,
        "RemoveMultipleStableLiquidityTool": RemoveMultipleStableLiquidityTool,
    
        // Position Management Tools
        "GetPositionsTool": GetPositionsTool,
        "CollectFeeTool": CollectFeeTool
    };
  • Implements TappAgent.removeMultipleAMMLiquidity: calls tapp-sdk to generate transaction payload and submits it using Aptos SDK, handling success/error response.
    async removeMultipleAMMLiquidity(params: RemoveMultipleAMMLiquidityParams): Promise<TransactionResponse> {
        try {
            const data = this.sdk.Position.removeMultipleAMMLiquidity(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'
            };
        }
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'Remove liquidity' which implies a destructive write operation, but fails to disclose critical behavioral traits such as required permissions, transaction costs, irreversible effects, or error handling, leaving significant gaps for safe agent use.

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 wasted words. It is front-loaded with the core action and target, making it easy to parse quickly, though it could benefit from more detail given the tool's complexity.

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?

Given the tool's destructive nature (implied by 'Remove'), lack of annotations, no output schema, and complex parameters involving financial transactions, the description is incomplete. It doesn't address safety, return values, or operational context, making it inadequate for informed agent use.

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 both parameters ('poolId' and 'positions') and their nested fields. The description adds no additional meaning beyond the schema, such as explaining the relationship between parameters or providing usage examples, meeting the baseline for high schema coverage.

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

Purpose3/5

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

The description states the action ('Remove liquidity') and target ('multiple AMM positions'), which is clear but basic. It doesn't distinguish itself from sibling tools like 'tapp_remove_multiple_clmm_liquidity' or 'tapp_remove_single_amm_liquidity' beyond the 'multiple AMM' phrasing, leaving ambiguity about when to choose this over alternatives.

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. With siblings like 'tapp_remove_single_amm_liquidity' and other 'remove_multiple_*' variants, the description lacks context on prerequisites, use cases, or comparisons, offering no help in tool selection.

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