Build unsigned swap transaction (quoteResponse / userPublicKey)
build_swap_transactionSame unsigned transaction as build_swap, for agents that already pass a quoteResponse and a userPublicKey (also accepted: walletAddress, taker, recipient). Use only after get_swap_quote (or get_quote), when the user wants the transaction and has given their own wallet address; read it back first. Pass the whole result of get_swap_quote as quoteResponse. If it has expired (about 15 seconds), get a fresh one. Returns swapTransaction (a base64 v0 transaction) and lastValidBlockHeight on Solana, or transaction and any approvals (sign those first) on EVM chains, plus the fields build_swap returns. Other common swap options (priority fee, wrap/unwrap, compute-unit settings) are accepted and ignored. The transaction is real and live. This server does not sign, execute or broadcast anything and never accepts a key: userPublicKey is an address only, and no API key is needed on Solana or EVM chains. If a build is refused or rate limited, give the user the openInHelmSwapUrl link from the quote instead. Not financial advice.
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": {
"quoteResponse": "<quoteResponse>",
"userPublicKey": "<userPublicKey>"
},
"name": "build_swap_transaction"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Optional. Taken from quoteResponse when omitted. | |
| quoteResponse | Yes | The whole object returned by get_swap_quote. Must include quoteTicket. | |
| userPublicKey | Yes | The user's wallet address that will sign (Solana base58 or EVM 0x). Address only, never a private key. Alias: walletAddress, taker, recipient. |