Skip to main content
Glama
tamago-labs

Tapp Exchange MCP Server

by tamago-labs

tapp_add_amm_liquidity

Add liquidity to an AMM pool by specifying the pool ID and amounts of token A and token B. Facilitates enhanced liquidity provision on Tapp Exchange via the Aptos blockchain.

Instructions

Add liquidity to an existing AMM pool

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountAYesThe amount of token A to add as liquidity
amountBYesThe amount of token B to add as liquidity
poolIdYesThe ID of the AMM pool

Implementation Reference

  • The handler function that executes the tapp_add_amm_liquidity tool logic by calling TappAgent.addAMMLiquidity with parsed input parameters.
    handler: async (agent: TappAgent, input: Record<string, any>) => {
        const result = await agent.addAMMLiquidity({
            poolId: input.poolId,
            amountA: input.amountA,
            amountB: input.amountB
        });
        return {
            status: "success",
            transaction: result
        };
    },
  • Zod schema defining the input parameters for the tapp_add_amm_liquidity tool: poolId, amountA, and amountB.
    schema: {
        poolId: z.string().describe("The ID of the AMM pool"),
        amountA: z.number().describe("The amount of token A to add as liquidity"),
        amountB: z.number().describe("The amount of token B to add as liquidity")
    },
  • src/mcp/index.ts:42-45 (registration)
    Registration of the AddAMMLiquidityTool (tapp_add_amm_liquidity) in the main TappExchangeMcpTools export object.
    // Add Liquidity Tools
    "AddAMMLiquidityTool": AddAMMLiquidityTool,
    "AddCLMMLiquidityTool": AddCLMMLiquidityTool,
    "AddStableLiquidityTool": AddStableLiquidityTool,
  • TappAgent.addAMMLiquidity method: generates transaction payload via Tapp SDK and submits it via Aptos client. Called by the tool handler.
    async addAMMLiquidity(params: AddAMMLiquidityParams): Promise<TransactionResponse> {
        try {
            const data = this.sdk.Position.addAMMLiquidity(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'
            };
        }
    }
  • Complete McpTool object definition for tapp_add_amm_liquidity, including name, description, schema, and handler.
    export const AddAMMLiquidityTool: McpTool = {
        name: "tapp_add_amm_liquidity",
        description: "Add liquidity to an existing AMM pool",
        schema: {
            poolId: z.string().describe("The ID of the AMM pool"),
            amountA: z.number().describe("The amount of token A to add as liquidity"),
            amountB: z.number().describe("The amount of token B to add as liquidity")
        },
        handler: async (agent: TappAgent, input: Record<string, any>) => {
            const result = await agent.addAMMLiquidity({
                poolId: input.poolId,
                amountA: input.amountA,
                amountB: input.amountB
            });
            return {
                status: "success",
                transaction: result
            };
        },
    };
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 states this is an 'add' operation (implying mutation/write), but doesn't disclose critical behavioral traits: whether this requires specific permissions, if it's irreversible, what happens to existing liquidity, potential fees, rate limits, or what the response looks like. For a financial transaction tool with zero annotation coverage, 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 with zero wasted words. It's appropriately sized for a tool with three parameters and gets straight to the point without unnecessary elaboration.

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 this is a financial transaction tool with no annotations and no output schema, the description is incomplete. It doesn't explain what happens after adding liquidity (e.g., receipt of LP tokens, position updates), doesn't mention error conditions, and provides minimal behavioral context. For a tool that modifies financial positions, this leaves significant gaps.

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%, with clear parameter descriptions in the schema itself. The tool description adds no additional parameter semantics beyond what's already documented in the schema (poolId, amountA, amountB). This meets the baseline expectation when schema coverage is complete.

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 ('to an existing AMM pool'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'tapp_create_amm_pool_and_add_liquidity' which creates a new pool versus adding to an existing one, or from other liquidity addition tools for different pool types (CLMM, stable).

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. It doesn't mention prerequisites (e.g., needing an existing pool), when to choose AMM over CLMM or stable pools, or when to use this versus the 'create_and_add' variants. Without this context, agents must infer usage from tool names alone.

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