Skip to main content
Glama

tapp_get_positions

Retrieve a paginated list of liquidity positions for a specific user address on Tapp Exchange, enabling efficient tracking of decentralized exchange activities on the Aptos blockchain.

Instructions

Get a paginated list of liquidity positions for a user address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoThe page number for pagination (defaults to 1)
sizeNoThe number of results per page (defaults to 10)
userAddrNoThe user's wallet address to fetch positions for (defaults to current agent address)

Implementation Reference

  • MCP tool handler for 'tapp_get_positions': calls TappAgent.getPositions with input params and returns formatted response with pagination info.
    handler: async (agent: TappAgent, input: Record<string, any>) => { const positions = await agent.getPositions({ userAddr: input.userAddr, page: input.page || 1, size: input.size || 10 }); return { status: "success", positions, pagination: { page: input.page || 1, size: input.size || 10, total: positions.length } }; },
  • Input schema validation using Zod for the tapp_get_positions tool parameters: userAddr (optional), page (optional), size (optional).
    schema: { userAddr: z.string().optional().describe("The user's wallet address to fetch positions for (defaults to current agent address)"), page: z.number().optional().describe("The page number for pagination (defaults to 1)"), size: z.number().optional().describe("The number of results per page (defaults to 10)") },
  • src/mcp/index.ts:56-56 (registration)
    Registration of the GetPositionsTool (tapp_get_positions) in the central TappExchangeMcpTools export object.
    "GetPositionsTool": GetPositionsTool,
  • src/mcp/index.ts:23-23 (registration)
    Import of GetPositionsTool from position-tools.ts for registration in MCP tools.
    import { GetPositionsTool, CollectFeeTool } from "./tapp/position-tools";
  • TappAgent.getPositions method called by the tool handler: resolves user address and delegates to SDK Position.getPositions.
    async getPositions(params: { userAddr?: string; page?: number; size?: number; }): Promise<TappPosition[]> { const userAddr = params.userAddr || await this.getAddress(); const positions = await this.sdk.Position.getPositions({ ...params, userAddr }); return positions; }

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