Build a prefilled swap link
build_swap_linkBuild a SwapChan deep link that opens swapchan.com with the swap card prefilled and auto-quoted, plus a permanent, unguessable short link (swapchan.com/s/, random id, swap links do not expire). Accepts chain names or ids, token symbols or addresses, a decimal amount or "max" (needs owner), optional recipient (cross-VM) and ref (partner id, keeps attribution). Scheme: https://swapchan.com/swap?fromChain=&fromToken=&amount=&toChain=&toToken=&recipient=&ref=. Pass items[] instead to get ONE batch link that steps through several swaps. Use this whenever you want to hand the user a one-click swap. Result includes display markdown with chan images: show it to the user. How to combine this with the other tools: swapchan_playbook (workflows: find-money, best-swap, rebalance, revoke-approvals, bridge-stuck, token-safety, recover-old-wallet).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "build_swap_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Partner id for 5 bp attribution | |
| items | No | Batch: several swaps behind one link | |
| owner | No | Wallet address, required when amount is "max" | |
| amount | No | Decimal amount in fromToken units, or "max" | |
| toChain | No | Chain id (1, 8453, 42161, 10, 137, 56, 43114, 59144, 534352, 792703809 Solana, 8253038 Bitcoin, 728126428 Tron) or name (eth, base, arbitrum, optimism, polygon, bnb, avalanche, linea, scroll, solana, bitcoin, tron). | |
| toToken | No | ||
| fromChain | No | Chain id (1, 8453, 42161, 10, 137, 56, 43114, 59144, 534352, 792703809 Solana, 8253038 Bitcoin, 728126428 Tron) or name (eth, base, arbitrum, optimism, polygon, bnb, avalanche, linea, scroll, solana, bitcoin, tron). | |
| fromToken | No | ||
| recipient | No |