onchain_jupiter_execute
Jupiter Swap v2 — sign and execute a previously-fetched order. Wraps POST https://api.jup.ag/swap/v2/execute. The backend signs the unsigned transaction (from onchain_jupiter_order) with the caller's Privy Solana wallet (sign-only), then forwards to Jupiter which routes and broadcasts the swap. Returns Jupiter's execution result: status ('Success' | 'Failed'), signature, slot, totalInputAmount, totalOutputAmount, swapEvents (per-AMM in/out amounts). Solana wallet must be delegated to the app first — otherwise 412 with delegate-wallet instructions.
⚠️ SAFETY — Solana swaps are irreversible on success. Before calling, show the user a summary from the corresponding onchain_jupiter_order response — input token + amount, output token + estimated amount, route, slippage, fees — and require explicit confirmation. Do not call this tool without per-write user confirmation.
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": {
"transaction": "<transaction>",
"requestId": "<requestId>"
},
"name": "onchain_jupiter_execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| requestId | Yes | requestId returned by onchain_jupiter_order. Jupiter requires it to tie the execution to the quote. | |
| transaction | Yes | Base64 unsigned transaction returned by onchain_jupiter_order in the `transaction` field. Pass it through unmodified. | |
| lastValidBlockHeight | No | Optional block height for nonce validation (use the one from the order response when available). |