swap_txn
Build unsigned token swap transactions on PactFi and return a base64 transaction group for signing via UluWalletMCP; auto-discover a pool if no pool ID is given.
Instructions
Build unsigned transactions to swap tokens on PactFi. Returns base64-encoded transaction group for signing via UluWalletMCP. Finds the best pool automatically if poolAppId is not specified.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"fromToken": "<fromToken>",
"toToken": "<toToken>",
"amount": "<amount>",
"sender": "<sender>"
},
"name": "swap_txn"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount to swap in human-readable units | |
| sender | Yes | Sender wallet address | |
| toToken | Yes | Token symbol to swap to | |
| slippage | No | Slippage tolerance in percent (default 0.5) | |
| fromToken | Yes | Token symbol to swap from (e.g. ALGO, USDC) | |
| poolAppId | No | Pool application ID (optional — auto-discovered from token symbols) |