build_swap

Build a NON-CUSTODIAL ERC20 swap plan (approve → Permit2 sign → router.swap) for the caller to sign + broadcast. No broadcast.

Server Agent https://fluxiq.xyz/api/mcp
Category Execute
Risk class High
Parameters 65 required

What build_swap does on Agent

AI agents invoke build_swap to trigger actions in Agent. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.

ParameterTypeRequiredDescription
chainId integer Yes EVM chain id (mainnet = 1 in v1).
tokenIn string Yes ERC20 input token (native ETH is not supported).
amountIn string Yes Amount in base units (integer string, e.g. USDC 6dp).
tokenOut string Yes ERC20 output token.
recipient string Yes Recipient / payer address (the wallet that signs + receives).
slippageBps integer Optional slippage budget in basis points (0–10000).

Parameters from the server's own tool schema.

Why build_swap needs a policy

build_swap triggers real processes with real consequences. An agent gone sideways doesn't fire it once — it starts dozens of builds, sends mass notifications, or burns through compute before anyone looks up.

Questions about build_swap

What does the build_swap tool do? +

Build a NON-CUSTODIAL ERC20 swap plan (approve → Permit2 sign → router.swap) for the caller to sign + broadcast. No broadcast. It is categorised as a Execute tool in the Agent MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

What parameters does build_swap accept? +

build_swap accepts 6 parameters: chainId, tokenIn, amountIn, tokenOut, recipient, slippageBps. Required: chainId, tokenIn, amountIn, tokenOut, recipient. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on build_swap? +

Register the Agent MCP server in PolicyLayer and add a rule for build_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 Agent. Nothing to install.

What risk level is build_swap? +

build_swap is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit build_swap? +

Yes. Add a rate_limit block to the build_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.

How do I block build_swap completely? +

Set action: deny in the PolicyLayer policy for build_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.

What MCP server provides build_swap? +

build_swap is provided by the Agent MCP server (https://fluxiq.xyz/api/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// THE FULL RECORD

build_swap is one line of Agent's registry record.

The record carries the whole server: verified identity, auth posture, risk grade, every tool classified, recommended policy — re-checked continuously.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.