Skip to main content
Glama
tamago-labs

Tapp Exchange MCP Server

by tamago-labs

tapp_get_pools

Retrieve a paginated list of pools on Tapp Exchange, filtered by type or sorted by TVL, to manage and analyze decentralized exchange liquidity.

Instructions

Get a paginated list of available pools on Tapp Exchange, optionally filtered by type and sorted by TVL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoThe page number to fetch (defaults to 1)
sizeNoNumber of items per page (defaults to 10)
sortByNoField to sort by (defaults to 'tvl')
typeNoPool type filter: 'AMM', 'CLMM', or 'STABLE'

Implementation Reference

  • The MCP tool handler for 'tapp_get_pools'. It invokes TappAgent.getPools with input params and formats the response with status, pools data, and pagination metadata.
    handler: async (agent: TappAgent, input: Record<string, any>) => {
        const pools = await agent.getPools(input);
        return {
            status: "success",
            pools,
            pagination: {
                page: input.page || 1,
                size: input.size || 10,
                total: pools.length
            }
        };
    },
  • Zod-based input schema defining optional parameters: page, size, sortBy, and type for filtering and paginating pools.
    schema: {
        page: z.number().optional().describe("The page number to fetch (defaults to 1)"),
        size: z.number().optional().describe("Number of items per page (defaults to 10)"),
        sortBy: z.string().optional().describe("Field to sort by (defaults to 'tvl')"),
        type: z.string().optional().describe("Pool type filter: 'AMM', 'CLMM', or 'STABLE'")
    },
  • src/mcp/index.ts:25-58 (registration)
    Aggregation object TappExchangeMcpTools that includes the GetPoolsTool (named 'tapp_get_pools' internally), imported and used for MCP server registration.
    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
    };
  • src/index.ts:20-52 (registration)
    Dynamic registration of all tools from TappExchangeMcpTools to the MCP server using server.tool(), passing name, description, schema, and wrapped handler.
    for (const [_key, tool] of Object.entries(TappExchangeMcpTools)) {
        server.tool(tool.name, tool.description, tool.schema, async (params: any): Promise<any> => {
            try {
                // Execute the handler with the params directly
                const result = await tool.handler(agent, params);
    
                // Format the result as MCP tool response
                return {
                    content: [
                        {
                            type: "text",
                            text: JSON.stringify(result, null, 2),
                        },
                    ],
                };
            } catch (error) {
                console.error("error", error);
                // Handle errors in MCP format
                return {
                    isError: true,
                    content: [
                        {
                            type: "text",
                            text:
                                error instanceof Error
                                    ? error.message
                                    : "Unknown error occurred",
                        },
                    ],
                };
            }
        })
    }
  • TappAgent.getPools method delegated to by the tool handler, which calls the external TappSDK's Pool.getPools implementation.
    async getPools(params: {
        page?: number;
        size?: number;
        sortBy?: string;
        type?: string;
    }): Promise<TappPool[]> {
        const pools = await this.sdk.Pool.getPools(params as any);
        return pools;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions pagination and optional filtering/sorting, which is useful, but lacks critical behavioral details: it doesn't specify if this is a read-only operation (implied by 'Get' but not explicit), what authentication might be required, rate limits, error conditions, or the structure of returned data. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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 that front-loads the core purpose ('Get a paginated list of available pools') and includes key modifiers ('optionally filtered by type and sorted by TVL'). There's zero waste—every word contributes to understanding the tool's scope and capabilities without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (4 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the basic purpose and parameter hints but lacks details on behavioral aspects (e.g., read-only nature, authentication, rate limits) and output structure. Without annotations or output schema, the agent must infer these from context, leaving gaps in operational understanding.

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 all parameters well-documented in the schema (page, size, sortBy, type with defaults and options). The description adds minimal value beyond the schema by mentioning filtering by type and sorting by TVL, but doesn't provide additional semantics like parameter interactions or usage examples. Baseline 3 is appropriate as 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 ('Get a paginated list') and resource ('available pools on Tapp Exchange'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'tapp_get_pool_info' (which likely gets details for a single pool) or 'tapp_get_positions' (which might focus on user positions rather than all pools). The purpose is clear but lacks sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through 'optionally filtered by type and sorted by TVL,' suggesting this tool is for browsing pools with filtering/sorting capabilities. However, it doesn't explicitly state when to use this versus alternatives like 'tapp_get_pool_info' (for single pool details) or 'tapp_get_positions' (for user-specific data). No explicit when-not-to-use guidance or named alternatives are provided.

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