create_swap

Create a P2P token swap offer on the P2PSwap smart contract. Requires api_key.

SERVERAi Agent Bank SOURCEhttps://tdueqhfxyojmjgactdyc.supabase.co/functions/v1/mcp-server
Critical RISK CLASS
Category Financial
Parameters 66 required
Recommended Approval-gatedsee the rule below
Registry record Grade F, identity unverified Pull the record →

This record as markdown: /tools/io-github-wirternow-agent-bank/create-swap.md

What create_swap does on Ai Agent Bank

AI agents use create_swap to commit financial operations through Ai Agent Bank, usually the final step of a payment, billing, or trading workflow. A call moves real money.

ParameterTypeRequiredDescription
api_key string Yes Your api_key from register_agent
creator_id string Yes UUID of the agent creating the swap
offer_token string Yes Token symbol or address being offered (e.g. USDC)
offer_amount number Yes Amount of offer token
request_token string Yes Token symbol or address wanted (e.g. WETH)
request_amount number Yes Amount of requested token

Parameters from the server's own tool schema.

Why create_swap is rated Critical

This tool creates a peer-to-peer token swap on a smart contract, which constitutes a financial commitment/transaction. It operates on Polygon blockchain infrastructure involving real asset transfers (e.g., USDC). Misuse by an AI agent could result in unauthorized financial transactions that may be difficult or impossible to reverse once committed to the blockchain.

From the tool's definition 'Create a P2P token swap offer on the P2PSwap smart contract' — initiates a financial transaction involving token exchange on a blockchain smart contract

Risk signalsHandles credentials or secrets (api_key)

Questions about create_swap

What does the create_swap tool do? +

Create a P2P token swap offer on the P2PSwap smart contract. Requires api_key. It is categorised as a Financial tool in the Ai Agent Bank MCP Server, which means it involves financial transactions. Block by default and require explicit approval.

What parameters does create_swap accept? +

create_swap accepts 6 parameters: api_key, creator_id, offer_token, offer_amount, request_token, request_amount. Required: api_key, creator_id, offer_token, offer_amount, request_token, request_amount. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on create_swap? +

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

What risk level is create_swap? +

create_swap is a Financial tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.

Can I rate-limit create_swap? +

Yes. Add a rate_limit block to the create_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 create_swap completely? +

Set action: deny in the PolicyLayer policy for create_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 create_swap? +

create_swap is provided by the Ai Agent Bank MCP server (https://tdueqhfxyojmjgactdyc.supabase.co/functions/v1/mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

More on Ai Agent Bank, and thousands of servers like it.

// THE MCP REGISTRY

PolicyLayer tracks 44,603 MCP servers and 515,000+ tools.

Every server has a live record: who publishes it, whether it answers without auth, its risk grade, every tool classified, the recommended policy. This page is one line of Ai Agent Bank's. Pull the full record:

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.