get_clean_quote
Maps to POST /quote with excludePositions=true. Shortcut to get_swap_quote that prices the swap as if the caller's own LP position were not in the pool, for concentrated-liquidity positions in the active tick range. Use when an agent holds a significant position in the pool it is about to trade a...
This record as markdown: /tools/defire-business-swapwizard-mcp/get-clean-quote.md
What get_clean_quote does on Swapwizard
AI agents use get_clean_quote to commit financial operations through Swapwizard, usually the final step of a payment, billing, or trading workflow. A call moves real money.
| Parameter | Type | Required | Description |
|---|---|---|---|
side | string | Yes | Quote direction |
owner | string | Yes | Wallet address whose LP positions will be excluded from pool state during quoting |
amount | string | Yes | Amount as stringified uint256 in token decimals |
rpcUrl | string | — | Custom RPC endpoint URL for position discovery. |
chainId | integer | Yes | EVM chain ID (e.g. 56 for BSC) |
tokenIn | string | Yes | Input token address (0x0000...0000 for native coin) |
tokenOut | string | Yes | Output token address |
slippageBps | integer | — | Slippage tolerance in basis points (default: 100 = 1%) |
affiliateCode | string | — | Optional affiliate wallet address registered on-chain with SwapWizard — forwarded to the API so the affiliate fee for this operation is paid to that address. Om |
Parameters from the server's own tool schema.
Why get_clean_quote is rated Critical
This tool generates executable swap quotes with callData/value fields on a DeFi platform. While it appears to be a quoting step, the description explicitly states it returns 'router/callData/value execution fields' identical to get_swap_quote, which is directly used for on-chain swap execution involving real financial assets across AMMs.
From the tool's definition 'swap', 'prices the swap', 'execution fields as get_swap_quote', 'router/callData/value execution fields', 'DeFi execution layer for AI agents - swap, zap in/out of LP, route across AMMs on 5 EVM chains'
Attacks that exploit this kind of access
The rule that runs get_clean_quote safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Swapwizard, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For get_clean_quote, this is the rule to start with:
Any call to get_clean_quote is blocked until a human approves it. The rest of the server keeps working.
The button opens the PolicyLayer dashboard: create your workspace, connect Swapwizard, apply this rule, and every get_clean_quote call is checked against it from then on.
Questions about get_clean_quote
Maps to POST /quote with excludePositions=true. Shortcut to get_swap_quote that prices the swap as if the caller's own LP position were not in the pool, for concentrated-liquidity positions in the active tick range. Use when an agent holds a significant position in the pool it is about to trade against (rebalancing, exit, treasury sizing) and needs a quote unaffected by its own liquidity. Returns the same router/callData/value execution fields as get_swap_quote, and likewise supports an optional affiliateCode (registered affiliate wallet address) forwarded to the API. EXECUTION FLOW: same as get_swap_quote — approve (wait for confirmation), fresh quote, then send tx to the router contract (requires private key or wallet signer). ⚠️ PRICE IMPACT: The response includes a priceImpact field. Agents MUST present this value to the user and request explicit confirmation before executing. ⚠️ ZERO OUTPUT: If the swap amount is too small relative to the token pair price ratio, the API returns HTTP 400 with "swap amount too small: output rounds to zero for this pair". Increase the amount or use a different pair. It is categorised as a Financial tool in the Swapwizard MCP Server, which means it involves financial transactions. Block by default and require explicit approval.
get_clean_quote accepts 9 parameters: side, owner, amount, rpcUrl, chainId, tokenIn, tokenOut, slippageBps, affiliateCode. Required: side, owner, amount, chainId, tokenIn, tokenOut. The full parameter table on this page comes from the server's own tool schema.
Register the Swapwizard MCP server in PolicyLayer and add a rule for get_clean_quote: 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 Swapwizard. Nothing to install.
get_clean_quote is a Financial 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 get_clean_quote 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 get_clean_quote. 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.
get_clean_quote is provided by the Swapwizard MCP server (@swapwizard/mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Swapwizard, and thousands of servers like it.
Across the catalogue