Skip to main content
Glama
tamago-labs

Tapp Exchange MCP Server

by tamago-labs

tapp_create_amm_pool_and_add_liquidity

Create an Automated Market Maker (AMM) pool and provide initial liquidity by specifying token addresses, fee structure, and token amounts for decentralized trading on Tapp Exchange.

Instructions

Create an AMM 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
tokenAddressYesAn array of token addresses

Implementation Reference

  • The MCP tool handler function that validates input, calls the TappAgent method, and returns the transaction result.
    handler: async (agent: TappAgent, input: Record<string, any>) => {
        const result = await agent.createAMMPoolAndAddLiquidity({
            tokenAddress: input.tokenAddress,
            fee: input.fee,
            amounts: input.amounts
        });
        return {
            status: "success",
            transaction: result
        };
    },
  • Zod schema defining the input parameters for the tool: token addresses, fee, and initial amounts.
    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")
    },
  • src/mcp/index.ts:38-38 (registration)
    The tool is registered in the TappExchangeMcpTools object, imported from liquidity-tools.
    "CreateAMMPoolAndAddLiquidityTool": CreateAMMPoolAndAddLiquidityTool,
  • TappAgent method that generates the transaction payload using the Tapp SDK and submits it via Aptos client.
    async createAMMPoolAndAddLiquidity(params: CreateAMMPoolAndAddLiquidityParams): Promise<TransactionResponse> {
        try {
            const data = this.sdk.Position.createAMMPoolAndAddLiquidity(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 states the tool creates a pool and adds liquidity, implying a write/mutation operation, but doesn't disclose critical behavioral traits like permissions needed, transaction costs, irreversible changes, rate limits, or what happens on failure. For a complex financial operation with no 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?

Extremely concise single sentence with zero waste. It's front-loaded with the core action and efficiently communicates the dual purpose 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?

For a complex financial tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns, error conditions, or important behavioral context. Given the sibling tools involve different pool types (AMM/CLMM/stable) and this is a mutation operation, more guidance is needed.

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 fully documented in the schema. The description doesn't add any meaning beyond what the schema provides (e.g., no clarification on token address format, fee units, or amount precision). Baseline 3 is appropriate when the schema does the heavy lifting.

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 an AMM pool and add initial liquidity') with a specific verb and resource. It distinguishes from siblings like 'tapp_create_clmm_pool_and_add_liquidity' by specifying 'AMM' type, but doesn't explicitly differentiate from other pool creation tools beyond the naming convention.

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 on when to use this tool versus alternatives like 'tapp_create_clmm_pool_and_add_liquidity' or 'tapp_create_stable_pool_and_add_liquidity'. The description implies it's for initial pool setup with liquidity, but lacks explicit context about AMM vs CLMM vs stable pool types or prerequisites.

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