tapp_get_pool_info
Retrieve detailed information about a specific liquidity pool by providing its ID, using the tool from Tapp Exchange MCP Server to support pool management and trading operations.
Instructions
Get detailed information about a specific pool by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| poolId | Yes | The pool ID to get information for |
Implementation Reference
- src/mcp/tapp/pool-tools.ts:34-40 (handler)The handler function for the 'tapp_get_pool_info' MCP tool, which retrieves pool information via the TappAgent and returns formatted response.handler: async (agent: TappAgent, input: Record<string, any>) => { const poolInfo = await agent.getPoolInfo(input.poolId); return { status: "success", pool: poolInfo }; },
- src/mcp/tapp/pool-tools.ts:31-33 (schema)Zod schema defining the input parameter 'poolId' for the tool.schema: { poolId: z.string().describe("The pool ID to get information for") },
- src/mcp/index.ts:28-28 (registration)Registration of the GetPoolInfoTool in the central TappExchangeMcpTools object."GetPoolInfoTool": GetPoolInfoTool,
- src/index.ts:20-52 (registration)Dynamic MCP server.tool() registration loop that registers 'tapp_get_pool_info' using its 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", }, ], }; } }) }
- src/agent/index.ts:230-233 (helper)TappAgent helper method called by the tool handler to fetch pool info from the SDK.async getPoolInfo(poolId: string): Promise<TappPool> { const info = await this.sdk.Pool.getInfo(poolId); return info; }