Skip to main content
Glama

tapp_remove_multiple_stable_liquidity

Remove liquidity from multiple stable pool positions on Tapp Exchange. Specify pool ID, position addresses, share tokens to burn, and minimum token amounts to receive for efficient withdrawal.

Instructions

Remove liquidity from multiple STABLE positions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
poolIdYesThe ID of the stable pool
positionsYesAn array of position objects

Implementation Reference

  • The handler function for the 'tapp_remove_multiple_stable_liquidity' MCP tool, which delegates to the TappAgent's removeMultipleStableLiquidity method and formats the response.
    handler: async (agent: TappAgent, input: Record<string, any>) => { const result = await agent.removeMultipleStableLiquidity({ poolId: input.poolId, positions: input.positions }); return { status: "success", transaction: result }; },
  • Zod input schema defining the parameters: poolId and array of positions with positionAddr, mintedShare, and amounts.
    schema: { poolId: z.string().describe("The ID of the stable pool"), positions: z.array(z.object({ positionAddr: z.string().describe("The address of the individual liquidity position"), mintedShare: z.number().describe("The amount of share tokens to burn"), amounts: z.array(z.number()).describe("The minimum token amounts to receive") })).describe("An array of position objects") },
  • src/mcp/index.ts:53-53 (registration)
    Registration of the tool object in the central TappExchangeMcpTools export under the key 'RemoveMultipleStableLiquidityTool'.
    "RemoveMultipleStableLiquidityTool": RemoveMultipleStableLiquidityTool,
  • TappAgent helper method that uses the external SDK to generate transaction payload for removing multiple stable liquidity and submits it via Aptos client.
    async removeMultipleStableLiquidity(params: RemoveMultipleStableLiquidityParams): Promise<TransactionResponse> { try { const data = this.sdk.Position.removeMultipleStableLiquidity(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' }; } }

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