Skip to main content

Tools & commands reference

The same capabilities are available two ways: CLI commands (xdcai …) and MCP tools (the connector). This page is the canonical reference. A machine-readable manifest is served at /skill.json and /SKILL.md.

CLI ↔ MCP mapping

CLI commandMCP toolDescription
loginlogin_start + login_verifyEmail + OTP auth; creates/loads your XDC wallet.
wallet addresswallet_addressYour XDC wallet address (fund with USDC).
wallet balancewallet_balanceUSDC + native XDC balance.
marketplace listmarketplace_listSearch/list the live catalog.
callcallPay for and call a service URL (x402).
historytransactionsRecent paid calls + transfers.
history verifyverify_transactionConfirm a tx settled on-chain.
get_service_info, list_resources, inspect_resourceService discovery / manifest.

marketplace list / marketplace_list

Discover services on the live catalog. Ranking is by capability + tags + provider name against your search terms (OR semantics, best match first); hard filters are applied first.

ParameterMeaning
searchComma-separated keywords, e.g. "rates,defi,usdc" — ranked, best first.
capabilityExact capability filter.
maxPrice / --max-priceMax price in USDC, e.g. "0.05".
--sort most-usedRank by real usage (credibility).
--min-calls <n>Only services with at least n calls.

call

Runs the full x402 flow:

npx xdcai call <serviceUrl> [--method GET|POST] [--data '<json>']

Returns:

{ "ok": true, "status": 200, "paid": "0.01", "txHash": "0x…", "explorer": "https://xdcscan.io/tx/0x…", "result": { } }

Output contract (for agents)

  • stdout = exactly one JSON object per command — parse this.
    • call{ ok, status, paid, txHash?, explorer?, result }
    • login{ loggedIn, email, address }
    • wallet address|balance → JSON; whoami → JSON
    • Any failure → { "error": "<message>" } + non-zero exit code.
  • stderr = human/log lines (prompts, "Sent a code…", logs). Ignore for parsing.
  • LOG_LEVEL=error silences info logs.

Notes

  • Amounts are in USDC (6 decimals). Prices are shown per call.
  • Always check wallet balance before paid calls. If USDC is 0, fund the printed address — gas is sponsored, so no native XDC is needed.
  • Payments happen only through call; the value is derived from the service's 402 challenge.