Skip to main content
Glama
tamago-labs

Tapp Exchange MCP Server

by tamago-labs

tapp_add_stable_liquidity

Add token amounts to an existing stable pool on Tapp Exchange using the pool ID and specified token quantities to enhance liquidity.

Instructions

Add liquidity to an existing stable pool

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountsYesAn array of token amounts
poolIdYesThe ID of the stable pool

Implementation Reference

  • Defines the main handler function for the 'tapp_add_stable_liquidity' tool, including input schema validation with Zod and execution logic that delegates to TappAgent.addStableLiquidity method.
    export const AddStableLiquidityTool: McpTool = {
        name: "tapp_add_stable_liquidity",
        description: "Add liquidity to an existing stable pool",
        schema: {
            poolId: z.string().describe("The ID of the stable pool"),
            amounts: z.array(z.number()).describe("An array of token amounts")
        },
        handler: async (agent: TappAgent, input: Record<string, any>) => {
            const result = await agent.addStableLiquidity({
                poolId: input.poolId,
                amounts: input.amounts
            });
            return {
                status: "success",
                transaction: result
            };
        },
    };
  • src/mcp/index.ts:45-45 (registration)
    Registers the AddStableLiquidityTool in the central TappExchangeMcpTools object, making it available as an MCP tool.
    "AddStableLiquidityTool": AddStableLiquidityTool,
  • Core helper method in TappAgent that generates the transaction payload using the external Tapp SDK and submits it via Aptos client, handling success/error responses.
    async addStableLiquidity(params: AddStableLiquidityParams): Promise<TransactionResponse> {
        try {
            const data = this.sdk.Position.addStableLiquidity(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 schema defining the input parameters for the tool: poolId (string) and amounts (array of numbers).
    schema: {
        poolId: z.string().describe("The ID of the stable pool"),
        amounts: z.array(z.number()).describe("An array of token amounts")
    },
  • src/mcp/index.ts:9-22 (registration)
    Import statement that brings in the AddStableLiquidityTool for registration in the MCP tools.
    import {
        CreateAMMPoolAndAddLiquidityTool,
        CreateCLMMPoolAndAddLiquidityTool,
        CreateStablePoolAndAddLiquidityTool,
        AddAMMLiquidityTool,
        AddCLMMLiquidityTool,
        AddStableLiquidityTool,
        RemoveSingleAMMLiquidityTool,
        RemoveMultipleAMMLiquidityTool,
        RemoveSingleCLMMLiquidityTool,
        RemoveMultipleCLMMLiquidityTool,
        RemoveSingleStableLiquidityTool,
        RemoveMultipleStableLiquidityTool
    } from "./tapp/liquidity-tools";
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 the action is to 'Add liquidity,' implying a write/mutation operation, but lacks details on permissions, side effects (e.g., token transfers, fees), rate limits, or what happens on failure. This is a significant gap for a financial tool with potential risks.

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, clear sentence with zero wasted words. It is front-loaded with the core action and resource, making it highly efficient and easy to parse for an agent.

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 complexity of a financial liquidity operation, no annotations, and no output schema, the description is incomplete. It lacks critical behavioral details (e.g., transaction implications, error handling) and doesn't guide usage relative to siblings, leaving the agent under-informed for safe and effective tool invocation.

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 'amounts') adequately. The description adds no additional meaning beyond implying 'amounts' correspond to tokens in the pool, but doesn't specify format (e.g., order matching pool tokens) or constraints, 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.

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 stable pool'), which is specific and distinguishes it from creation tools. However, it doesn't explicitly differentiate from other liquidity addition tools like 'tapp_add_amm_liquidity' or 'tapp_add_clmm_liquidity' beyond the 'stable' qualifier, which is implied but not contrasted.

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 mentions 'existing stable pool' but doesn't specify prerequisites (e.g., pool must exist) or compare to sibling tools like 'tapp_create_stable_pool_and_add_liquidity' for new pools, leaving the agent to infer usage 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