tapp_collect_fee
Collect fees from a specific liquidity position within a pool on Tapp Exchange. Input pool ID and position address to manage earnings.
Instructions
Collect fees from a specific liquidity position in a given pool
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| poolId | Yes | The address of the pool from which to collect fees | |
| positionAddr | Yes | The address of the liquidity position |
Implementation Reference
- src/mcp/tapp/position-tools.ts:38-47 (handler)The handler function for the 'tapp_collect_fee' tool. It takes agent and input, calls agent.collectFee with poolId and positionAddr, and returns a success response with the transaction result.handler: async (agent: TappAgent, input: Record<string, any>) => { const result = await agent.collectFee({ poolId: input.poolId, positionAddr: input.positionAddr }); return { status: "success", transaction: result }; },
- src/mcp/tapp/position-tools.ts:34-37 (schema)Input schema using Zod for the 'tapp_collect_fee' tool, defining required string parameters poolId and positionAddr.schema: { poolId: z.string().describe("The address of the pool from which to collect fees"), positionAddr: z.string().describe("The address of the liquidity position") },
- src/mcp/index.ts:57-57 (registration)Registration of the CollectFeeTool into the TappExchangeMcpTools object, which aggregates all MCP tools."CollectFeeTool": CollectFeeTool