Documentation · v1 · 32 articles

Tradient Docs

MCP tools / add_liquidity

add_liquidity

PREPARE TXMCP + HTTP + SDK1 CALL

Prepare adding liquidity for a token on Uniswap v2 against ETH or USDG, locking (6 or 12 months) or burning the LP in the same transaction. Match the current pool ratio to avoid losing value.

Parameters

All parameters are sent as a JSON object.

tokenstringToken ticker or address.
tokenAmountstringAmount of the token in whole units.
pairAmountstringAmount of ETH or USDG in whole units.
pair?stringETH (default) or USDG.
lockMonths?number6 or 12, or 0 to burn. Default 12.
walletstringThe user's wallet address (0x…). Transactions are prepared for this wallet to sign.

Example request

Through MCP your AI sends the arguments below. Over HTTP, POST them to /api/v1/tools/add_liquidity.

add_liquidity({ "token": "0x…", "tokenAmount": "900000000",
  "pairAmount": "0.5", "lockMonths": 12, "wallet": "0x…" })

Example response

Prepare tools return unsigned transactions for the user's wallet. Nothing executes until it is signed.

{
  "summary": { "token": "KITTY", "lock": "12 months" },
  "transactions": [ { "description": "Allow Tradient to use your KITTY" }, { "description": "Add … and lock for 12 months the LP" } ]
}

Notes

Liquidity is added to a Uniswap v2 pool. If the pool already exists, match its current ratio — extra tokens on one side are donated to the pool.