swap_build_cbor
Build an unsigned aggregated swap transaction CBOR for Cardano, returning the bytes a user's wallet must sign before submission.
Instructions
Build an unsigned transaction CBOR for an aggregated swap. Returns the transaction CBOR that needs to be signed by the user's wallet.
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": {
"tokenInAmount": "<tokenInAmount>",
"slippage": "<slippage>",
"tokenIn": "<tokenIn>",
"tokenOut": "<tokenOut>",
"userAddress": "<userAddress>"
},
"name": "swap_build_cbor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tokenIn | Yes | Input token identifier. Use 'lovelace' for ADA, or 'policyId.assetNameHex' format for native tokens | |
| slippage | Yes | Slippage tolerance percentage (e.g., 0.5 for 0.5%) | |
| tokenOut | Yes | Output token details | |
| userAddress | Yes | Cardano wallet address (bech32 format, starts with 'addr1') | |
| tokenInAmount | Yes | Amount of input token to swap (in smallest unit) | |
| blacklisted_dexes | No | List of DEX names to exclude from routing (e.g., ['Minswap', 'SundaeSwap']) |