Skip to main content
Glama
jan3dev

Agentic AQUA

by jan3dev

sideswap_execute_swap

Execute a Liquid atomic swap on SideSwap after confirming the quote. Locally verifies the swap against the agreed terms and aborts if the balance change does not match, protecting against a hostile server.

Instructions

Execute a Liquid atomic swap on SideSwap. Both directions are supported via send_bitcoins: True = L-BTC → asset (default), False = asset → L-BTC. The PSET returned by SideSwap is verified locally against the agreed quote BEFORE signing — the swap is aborted if the wallet's net balance change does not exactly match (refusing to sign protects against a hostile server). The fee tolerance is pinned to L-BTC, so on the asset → L-BTC direction the asset side is checked at strict equality. Order is persisted at every step for crash recovery. ALWAYS call sideswap_quote first and confirm the price with the user before invoking this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asset_idYesNon-L-BTC Liquid asset (e.g. USDt). The L-BTC side is always the policy asset.
passwordNoPassword to decrypt mnemonic (if encrypted at rest)
send_amountYesSend amount in sats (L-BTC if send_bitcoins, else asset)
wallet_nameNoLiquid wallet to sign withdefault
send_bitcoinsNoTrue = send L-BTC to receive asset; False = send asset to receive L-BTC
min_recv_amountNoOptional floor on the dealer's recv_amount in sats. Pass the recv_amount the user just confirmed in sideswap_quote — if the rate moved between preview and execution and the dealer offers less, the swap is rejected before signing.
flexible_small_amountNoWhen True, accept dealer-rounded send_amount up to ±3000 sats from what was requested. SideSwap's mkt::* dealer rounds internally; small swaps (e.g. 5k–25k sats) often come back at a slightly different amount. Off by default — strict equality is safer at scale.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears full responsibility. It discloses critical behaviors: local PSET verification against quote, abort on balance mismatch, fee tolerance pinned to L-BTC, order persistence for crash recovery, and strict equality check on asset side for asset→L-BTC direction. These details are essential for safe usage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is relatively concise, with a clear structure starting with the core action, then direction, then safety mechanisms, then prerequisite. Each sentence adds value, though it could be slightly more streamlined without losing essential details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a swap execution tool with 7 parameters and no annotations, the description covers all key aspects: direction, verification, failure conditions, persistence, and prerequisite. It is complete enough for safe usage without external documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so a baseline of 3. The description adds value beyond the schema by explaining behavioral implications of parameters (e.g., send_bitcoins direction logic, flexible_small_amount tolerance, min_recv_amount as a floor check). It enriches the understanding of how parameters interact with the swap execution.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Execute a Liquid atomic swap on SideSwap.' It specifies both directions via the send_bitcoins parameter and distinguishes itself from siblings like sideswap_quote by mandating its prior use.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states the prerequisite: 'ALWAYS call sideswap_quote first and confirm the price with the user.' This provides clear guidance on when to invoke this tool versus alternatives, and explains the direction parameter effectively.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jan3dev/agentic-aqua'

If you have feedback or need assistance with the MCP directory API, please join our Discord server