transactions_create_swap
Creates a human-approvable swap proposal that sells an exact token amount for another, fetching the quote and building calls; optionally bridges to a destination chain.
Instructions
Create a proposal, for a human signer to approve, that sells an exact amount of one token for another, like the swap form in the web app. Pass destinationChainId to receive buyToken on another chain, which bridges the swap. The server fetches the quote and builds the calls. Specify amount in human-readable sellToken units (e.g. '100' for 100 USDC). Returns the proposal with the quoted buy amount and a signUrl.
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": {
"account": "<account>",
"chainId": "<chainId>",
"sellToken": "<sellToken>",
"buyToken": "<buyToken>",
"amount": "<amount>"
},
"name": "transactions_create_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memo | No | Optional memo for the transaction (max 500 chars) | |
| amount | Yes | The amount of sellToken to sell, in human-readable units (e.g., '100' for 100 USDC) | |
| account | Yes | The smart account address to create the proposal from (0x-prefixed, 40 hex chars) | |
| chainId | Yes | The chain ID where the account sells sellToken; the proposal runs on this chain (e.g., 1 for Ethereum, 8453 for Base) | |
| buyToken | Yes | The token received on destinationChainId (use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH). An Earn token deposits into that vault and is allowed only when the recipient is an account in this workspace | |
| property | No | String key/value overlays for properties; repeatable. Splits on the first '='. Example: --property invoice=INV-42 | |
| recipient | No | Address that receives buyToken. Defaults to the account. Any other address adds a transfer to the proposal | |
| sellToken | Yes | The token the account sells on chainId (use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH). An Earn token withdraws from that Earn position | |
| workspace | No | Workspace alias to run this command in (see `splits auth workspaces`). Overrides SPLITS_WORKSPACE and the active workspace. | |
| properties | No | Optional custom JSON metadata. Total minified ≤ 500 chars. Used as the base; any --property overlays are applied on top. To load from a file, use shell substitution: --properties "$(cat props.json)" | |
| slippageBps | No | Slippage tolerance in basis points (1 to 10000). Defaults to the web app's swap form default for the pair: 10 for two stablecoins, 50 for stablecoins and major assets, 150 otherwise | |
| destinationChainId | No | The chain ID where buyToken is received. Defaults to chainId. A different chain bridges the swap, like the web app swap form with another destination chain |