Prepare a direct Uniswap V3 swap (bypasses LiFi aggregator). Use this ONLY when the user explicitly asks for Uniswap — otherwise default to prepare_swap which compares routes across venues. Same-chain only (Uniswap V3 is not a bridge). Auto-picks the best pool fee tier (100/500/3000/10000 bps) by...
AI agents call prepare_uniswap_swap to permanently remove resources in VaultPilot MCP — typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.
| Parameter | Type | Required | Description |
|---|---|---|---|
chain | string | Yes | |
amount | string | Yes | Human-readable decimal amount, NOT raw wei/base units. Example: "1.5" for 1.5 USDC, "0.01" for 0.01 ETH. Interpreted as fromToken input by default; set `amountS |
wallet | string | Yes | |
feeTier | number | — | Optional fee-tier override (100 / 500 / 3000 / 10000 bps). When omitted, QuoterV2 is queried across all four tiers and the best-pricing pool is picked. |
toToken | object | Yes | |
fromToken | object | Yes | |
amountSide | string | — | Which side of the swap `amount` refers to. "from" (default) = exact-in: spend exactly `amount` of fromToken, receive a variable output. "to" = exact-out: receiv |
slippageBps | integer | — | Slippage tolerance in basis points (50 = 0.5%). Default 50. Hard-capped at 500 (5%); > 100 requires `acknowledgeHighSlippage: true` to prevent MEV sandwiching. |
toTokenDecimals | integer | — | Optional decimals hint for toToken if on-chain lookup fails. Native is 18. |
fromTokenDecimals | integer | — | Optional decimals hint for fromToken if on-chain lookup fails. Native is 18. |
acknowledgeHighSlippage | boolean | — | Opt-in flag required when slippageBps > 100. Forces explicit acknowledgement of unusually-high slippage. |
Parameters from the server's own tool schema.
An AI agent that decides to call prepare_uniswap_swap doesn't hesitate, doesn't double-check, and doesn't stop at one. Whatever it removes from VaultPilot MCP is gone — there is no undo for destructive operations.
Risk signalsHigh parameter count (11 properties)
Attacks that exploit this kind of access
Prepare a direct Uniswap V3 swap (bypasses LiFi aggregator). Use this ONLY when the user explicitly asks for Uniswap — otherwise default to prepare_swap which compares routes across venues. Same-chain only (Uniswap V3 is not a bridge). Auto-picks the best pool fee tier (100/500/3000/10000 bps) by quoting all four against QuoterV2 and choosing the one with the best price; pass feeTier to override. Supports ERC-20 <-> ERC-20, native-in (ETH -> ERC-20), and native-out (ERC-20 -> ETH). Both exact-in and exact-out. Returns an unsigned tx (with a reset+approve chain when the router needs allowance) that send_transaction can forward to Ledger Live. Single-hop only in v1 — multi-hop routes through an intermediate asset (e.g. via WETH) fall back to prepare_swap. It is categorised as a Destructive tool in the VaultPilot MCP MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.
prepare_uniswap_swap accepts 11 parameters: chain, amount, wallet, feeTier, toToken, fromToken, amountSide, slippageBps, toTokenDecimals, fromTokenDecimals, acknowledgeHighSlippage. Required: chain, amount, wallet, toToken, fromToken. The full parameter table on this page comes from the server's own tool schema.
Register the VaultPilot MCP server in PolicyLayer and add a rule for prepare_uniswap_swap: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches VaultPilot MCP. Nothing to install.
prepare_uniswap_swap is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the prepare_uniswap_swap rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for prepare_uniswap_swap. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
prepare_uniswap_swap is provided by the VaultPilot MCP server (vaultpilot-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.