prepare_swap
Prepare unsigned, reviewed swap calldata for local signing on Base Aerodrome Slipstream, Base PancakeSwap V3, the Base agent swap guard, or a Solana Loopscale vault deposit. Use it when the user wants an executable transaction bound to a reviewed pool and policy. Do not use it to sign, submit or route arbitrary calldata, and do not skip the matching safety gate. Returns the unsigned transaction envelope (to/value/calldata), reviewed profile, quote and, where supported, a signed decision. Deprecated alias: prefer trade_guard with op "prepare_swap". Removed on 2027-01-06.
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": {
"venue": "<venue>",
"amount_in": "<amount_in>"
},
"name": "prepare_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vault | No | ||
| venue | Yes | Reviewed execution venue | |
| policy | No | ||
| wallet | No | ||
| amount_in | Yes | Exact input amount as a decimal string | |
| direction | No | ||
| recipient | No | ||
| asset_mint | No | ||
| input_mint | No | Solana base58 mint sold; required for venue=solana_jupiter | |
| profile_id | No | ||
| loan_symbol | No | ||
| output_mint | No | Solana base58 mint bought; required for venue=solana_jupiter | |
| min_lp_amount | No | ||
| max_slippage_bps | No | ||
| principal_amount | No | ||
| collateral_symbol | No | ||
| collateral_value_usd | No | ||
| deadline_unix_seconds | No | ||
| source_decision_price_usd | No | ||
| destination_decision_price_usd | No |