accept_swap
Accept an open P2P token swap offer. Requires api_key.
This record as markdown: /tools/io-github-wirternow-agent-bank/accept-swap.md
What accept_swap does on Ai Agent Bank
AI agents use accept_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.
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | Yes | Your api_key from register_agent |
swap_id | string | Yes | UUID of the swap to accept |
agent_id | string | Yes | UUID of the agent accepting the swap |
Parameters from the server's own tool schema.
Why accept_swap is rated Critical
This tool executes a peer-to-peer token swap, which directly moves financial assets between parties. It commits to a financial transaction involving token exchange, placing it firmly in the Financial category. The blast radius is critical as an AI agent could accept malicious or unfavorable swap offers, resulting in irreversible loss of funds.
From the tool's definition Accept an open P2P token swap offer
Risk signalsHandles credentials or secrets (api_key)
Attacks that exploit this kind of access
The rule that runs accept_swap safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Ai Agent Bank, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For accept_swap, this is the rule to start with:
Any call to accept_swap is blocked until a human approves it. The rest of the server keeps working.
The button opens the PolicyLayer dashboard: create your workspace, connect Ai Agent Bank, apply this rule, and every accept_swap call is checked against it from then on.
Questions about accept_swap
Accept an open P2P token swap offer. 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.
accept_swap accepts 3 parameters: api_key, swap_id, agent_id. Required: api_key, swap_id, agent_id. The full parameter table on this page comes from the server's own tool schema.
Register the Ai Agent Bank MCP server in PolicyLayer and add a rule for accept_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.
accept_swap 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 accept_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 accept_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.
accept_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.
Across the catalogue