Skip to main content
Glama

Start USDC to BSV swap

swap_asset_to_bsv
Destructive

Buys BSV with USDC on Base through a non-custodial atomic swap, locking USDC until settlement or refund. Use it to convert Base USDC to BSV while keeping keys local.

Instructions

Buy BSV with this kit's USDC on Base through a non-custodial atomic swap with the counterparty. This moves funds: it locks USDC on Base, so get a quote with get_quote first and confirm it with the person directing you. Pass quote_id (or the quote object) to use that quote's terms, or min_bsv_out as a floor; if the quote has expired, the kit gets a new one and goes ahead only if it pays at least min_bsv_out, or 99% of the old quote. Returns at once with swap_id, stage, expected_minutes and the settlement mode; then call wait_for_swap until done is true. Refused while another swap is in progress or spending is stopped. If a swap cannot finish, the USDC comes back to the kit. speed is the buyer’s explicit choice; standard is the default. Fast mode makes the kit reveal its secret against an unconfirmed BSV lock. If the counterparty double-spends that lock, you can lose the swap amount. It is available only when both sides agree and the amount is at most $25; otherwise the swap waits for one BSV confirmation.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "from_asset": "<from_asset>",
      "amount_in": "<amount_in>"
    },
    "name": "swap_asset_to_bsv"
  }
}

Input Schema

NameRequiredDescriptionDefault
quoteNoOptional: the whole quote object from get_quote, instead of quote_id. Its route, pair and amount_in must match this request.
speedNoOptional buyer choice. standard (default) waits for one BSV confirmation. fast reveals the secret against an unconfirmed BSV lock, and applies only when both sides agree and the amount is at most $25.
quote_idNoOptional quote_id from get_quote. Uses that quote's terms while it is valid.
amount_inYesUSDC to spend, in atomic units as a decimal string ("25000000" = 25 USDC). Must equal the amount_in of the quote you pass.
deliver_toNoOptional BSV mainnet address (P2PKH, starting with 1) to receive the BSV. Without it the BSV stays in this kit (see wallet_info; withdraw_bsv moves it later). With it, the kit sends the claimed BSV there automatically, for one more small fee (about 400 sats).
from_assetYesAsset you pay with. Must be "USDC" (USDC on Base).
min_bsv_outNoOptional floor for the BSV received, in satoshis as a decimal string ("100000000" = 1 BSV). Required when neither quote_id nor quote is given.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.2.22
    • changedInput schema / properties / amount_in / description
      Previous value: -"Amount of from_asset in atomic units (decimal string)."New value: +"USDC to spend, in atomic units as a decimal string (\"25000000\" = 25 USDC). Must equal the amount_in of the quote you pass."
    • changedInput schema / properties / deliver_to / description
      Previous value: -"Optional destination BSV address. Confirmed BSV is swept there automatically."New value: +"Optional BSV mainnet address (P2PKH, starting with 1) to receive the BSV. Without it the BSV stays in this kit (see wallet_info; withdraw_bsv moves it later). With it, the kit sends the claimed BSV there automatically, for one more small fee (about 400 sats)."
    • changedInput schema / properties / from_asset / description
      Previous value: -"Asset to convert into BSV: USDC or BSV (phase 1 supports USDC → BSV only) (not BSV itself)"New value: +"Asset you pay with. Must be \"USDC\" (USDC on Base)."
    • changedInput schema / properties / min_bsv_out / description
      Previous value: -"Optional minimum BSV output in sats."New value: +"Optional floor for the BSV received, in satoshis as a decimal string (\"100000000\" = 1 BSV). Required when neither quote_id nor quote is given."
    • changedInput schema / properties / quote / description
      Previous value: -"Optional: a quote object returned by get_quote, to lock its terms (bound to route + pair + amount_in)."New value: +"Optional: the whole quote object from get_quote, instead of quote_id. Its route, pair and amount_in must match this request."
    • changedInput schema / properties / quote_id / description
      Previous value: -"Quote id returned by get_quote."New value: +"Optional quote_id from get_quote. Uses that quote's terms while it is valid."
    • changedInput schema / properties / speed / description
      Previous value: -"Optional buyer choice. standard (default) waits for one BSV confirmation. fast permits an unconfirmed-lock reveal only when both sides agree and the amount is at most $25."New value: +"Optional buyer choice. standard (default) waits for one BSV confirmation. fast reveals the secret against an unconfirmed BSV lock, and applies only when both sides agree and the amount is at most $25."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Far exceeds the annotations: it discloses that funds are locked on Base, that USDC is returned if a swap cannot finish, the expedited-quote fallback rule (>= min_bsv_out or 99% of the old quote), and the concrete fast-mode risk ('if the counterparty double-spends that lock, you can lose the swap amount') plus its $25 cap and mutual-agreement requirement.

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?

Front-loaded with the fund-moving nature and the quote-first rule, then the return/next-step, then constraints, then the risk disclosure. Dense but purposeful; some sentences are long and pack multiple clauses, which slightly slows scanning.

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?

For a destructive, open-world, non-idempotent swap with 7 params and no output schema, it covers the missing return shape (swap_id, stage, expected_minutes, settlement mode), failure/refund behavior, preconditions, and risk. Nothing an agent needs to call this safely is absent.

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 the baseline is 3, but the description adds behavior the schema does not: what happens when the quote has expired, the 99% fallback floor, and the choice between passing quote_id versus the whole quote object. The speed parameter's tradeoff is expanded in prose beyond the enum description.

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?

States a specific verb and resource chain: 'Buy BSV with this kit's USDC on Base through a non-custodial atomic swap with the counterparty.' It clearly separates this from the sibling quote/status tools by noting that get_quote is a prerequisite and wait_for_swap is the follow-up.

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?

Gives explicit sequencing (quote first, confirm with the person directing you, then wait_for_swap until done is true) and explicit refusal conditions ('refused while another swap is in progress or spending is stopped'). Alternatives are named rather than implied.

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