Skip to main content
Glama
Agentic AQUA

Agentic AQUA

Official
by AquaWallet

jan3_purchase_ln_username

Purchases or updates a JAN3 Lightning username via on-chain L-BTC or USDt payment, returning a price quote first and funding the order only after user confirmation.

Instructions

Purchase / update the Lightning username for a JAN3 account with an on-chain payment (fund in L-BTC or USDt). TWO-STEP, do NOT pass confirm=true first: (1) call with confirm=false (default) to get a price quote WITHOUT spending — the server locks the price on that order; it returns display_amount (already formatted for the user, e.g. '2000 Sats' for L-BTC or '1.50 USDT' for USDt), amount_base_units (technical), amount, asset_ticker, payment_id and expires_at; SHOW display_amount to the user and get explicit consent; (2) only then call with confirm=true — it funds exactly the quoted order (same payment_id and amount) and errors if the quote expired (re-quote and re-confirm). When telling the user the price, use display_amount verbatim — never surface the raw amount/amount_base_units. Check availability first with jan3_ln_check_username. Requires an active JAN3 session (either flow).

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": {
      "email": "<email>",
      "ln_username": "<ln_username>"
    },
    "name": "jan3_purchase_ln_username"
  }
}

Input Schema

NameRequiredDescriptionDefault
assetNoFunding asset — 'L-BTC' or 'USDt'. Ask the user which they prefer; the price is quoted in that asset.L-BTC
emailYes
confirmNoFalse (default) returns a non-spending price quote; True funds the previously quoted order. Only set True after the user approves the quoted display_amount.
passwordNoDecrypts the wallet mnemonic if encrypted at rest (only needed when confirm=true).
ln_usernameYesDesired username (the local part, before the @domain).
wallet_nameNoLiquid wallet used to fund the purchase.default
password_fileNoPath to a local file containing the wallet password; keeps the password out of the conversation. Do not combine with password.
expected_amount_base_unitsNoWith confirm=true and no prior quote, the amount_base_units the user approved; the purchase aborts (nothing spent) if the current price exceeds it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so: confirm=false is explicitly non-spending and locks a server-side price, confirm=true funds exactly the quoted order, and expiry produces an error. It also discloses that expected_amount_base_units aborts the purchase with nothing spent, which is the key safety behavior for an irreversible payment.

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 critical 'TWO-STEP, do NOT pass confirm=true first' warning, then the numbered flow, then formatting rules, then prerequisites. It is dense and long for a single block, but nearly every clause prevents a distinct failure mode, so little is wasted.

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?

With no output schema available, the description compensates by enumerating the return payload fields (display_amount, amount_base_units, amount, asset_ticker, payment_id, expires_at). Combined with the two-step protocol and session prerequisite, an agent has everything needed to invoke this payment tool correctly.

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 88%, so baseline is 3; the description earns extra by explaining the two-step coupling of confirm to a specific payment_id and amount, and by telling the agent which returned fields map to user-facing price versus technical amount. The distinction between amount/amount_base_units and display_amount is meaning the schema alone does not convey.

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 ('Purchase / update the Lightning username for a JAN3 account') plus the payment rail (on-chain, L-BTC or USDt). It separates itself from the nearest sibling by requiring a prior jan3_ln_check_username call, so an agent can distinguish it from jan3_ln_check_username and jan3_enable_lightning_address without opening any schema.

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 prescribes the ordering ('do NOT pass confirm=true first'), names the prerequisite sibling ('Check availability first with jan3_ln_check_username'), and states the session precondition. Failure handling is also routed: if the quote expired, re-quote and re-confirm rather than retrying the same call.

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