Keywords: Stellar, XLM, Soroban, Lumen, USDC, Stellar DEX, Horizon, Stellar Expert, Reflector oracle, x402, MPP, micropayments, Stellar wallet, pay-per-call, agent tools, search, research, screenshot, scrape, image generation, stocks, crypto prices, weather, domain check
XLMTools gives an AI agent 21 tools — 7 paid via USDC micropayments on Stellar, 14 free. It works in two modes: prefer MCP if available, fall back to the xlm CLI otherwise.
This skill assumes the agent host grants Bash (for the xlm CLI fallback) and WebFetch (for runtime discovery). Without those, only MCP tools are usable.
If the user needs to install XLMTools:
# Standalone CLI (universal — works with any agent host that has Bash)
npm install -g @xlmtools/cli
# MCP server (optional fast-path for Claude Code, Cursor, Cline, OpenClaw, etc.)
claude mcp add xlmtools npx @xlmtools/mcp
On first run, XLMTools auto-generates a Stellar testnet wallet at ~/.xlmtools/config.json, funds it with XLM via Stellar's friendbot, and adds a USDC trustline — fully automatic. The user only needs to grab testnet USDC from faucet.circle.com to use paid tools.
If neither MCP nor CLI is installed, tell the user which command to run — don't try to proceed.
mcp__xlmtools__* are in your tool list, call them directly. They handle payment automatically and benefit from response caching.xlm via the Bash tool. Same wallet, same backend, same payment flow.https://api.xlmtools.com/.well-known/xlmtools.json (JSON manifest) or https://api.xlmtools.com/llms.txt (plain text) for service metadata. If those URLs are unreachable (the hackathon demo may not be deployed yet), fall back to this SKILL.md file — every tool, price, and command documented here is authoritative.XLMTools is for external data and actions, not general reasoning. Skip it entirely when:
research for things you can write from training data.search needed.Rule of thumb: If the user's question could have been answered using only the assistant's brain, don't use XLMTools. If the answer depends on "what's happening right now" or "what's at this URL", use XLMTools.
mcp__xlmtools__* tools exist, use them — they're faster and cached. Only use xlm CLI as fallback.xlm --help before guessing CLI syntax. The global help lists every tool, its positional args, and its flags. Do not read the CLI source — --help is the source of truth. (Per-tool help like xlm search --help is not currently supported.)search, stocks, youtube, scrape): say the cost inline with the call. Example: "I'll use search ($0.003 USDC) to get news about Stellar." Do NOT pause for approval.research, screenshot, image): propose the call and STOP. Example: "I'd like to use research ($0.010 USDC) for this. OK to proceed?" Wait for user approval before firing.https://stellar.expert/explorer/testnet/tx/.[cached — no charge] as emitted by the cache helper. If you make the same call twice in a row, the second is free.crypto instead of stocks), a cheaper tool (search $0.003 instead of research $0.010), or answering from training data if the question allows it.research ($0.010). Want me to proceed?"User: "What's the current price of Bitcoin and what are people saying about Stellar lately?"
Agent reasoning:
crypto (free)search ($0.003, Mention mode — inline cost)Agent action:
I'll get the BTC price (free) and search for recent Stellar news ($0.003 USDC).
Calls mcp__xlmtools__crypto(ids="bitcoin") and mcp__xlmtools__search(query="Stellar blockchain news", count=5) in parallel.
Agent response to user:
> Bitcoin price: $67,432 (+2.3% 24h)
>
> Recent Stellar news:
> 1. Stellar Foundation announces Q2 roadmap
> 2. Soroban TPS benchmarks hit 5,000
> 3. MPP micropayments go live on testnet
>
> Paid $0.003 USDC for the search. Transaction: a3f9c28d…b8e14d7c
Notice: the free crypto call didn't need cost disclosure. The paid search did. The tx hash is linked at the bottom and is a full 64-char hex (Stellar tx hashes are always 64 hex chars).
| User asks about... | Tool | Cost |
|---|---|---|
| --- | --- | --- |
| Current BTC/ETH/crypto price | crypto | Free |
| "What's the latest news about X?" | search | $0.003 |
| "Research topic X for me" (multi-source) | research | $0.010 |
| Stock price (AAPL, TSLA, etc.) | stocks | $0.001 |
| Weather in a city | weather | Free |
| "Is this domain available?" | domain | Free |
| YouTube videos about X | youtube | $0.002 |
| "Screenshot this URL" | screenshot | $0.010 |
| "Extract text from this webpage" | scrape | $0.002 |
| "Generate an image of X" | image | $0.040 |
| Stellar DEX orderbook for XLM/USDC | dex-orderbook | Free |
| OHLCV candlesticks for a Stellar pair | dex-candles | Free |
| Recent DEX trades | dex-trades | Free |
| "Quote me a swap from A to B" | swap-quote | Free |
| Info about a Stellar asset | stellar-asset | Free |
| Balances/signers for a Stellar account | stellar-account | Free |
| Liquidity pool data | stellar-pools | Free |
| Reflector oracle price for BTC/ETH/fiat | oracle-price | Free |
| "Show me my wallet" | wallet | Free |
| "What XLMTools tools are available?" | tools | Free |
| "Set a spending cap" (MCP only) | budget | Free |
| Tool | Price | Params | Description |
|---|---|---|---|
| --- | --- | --- | --- |
search | $0.003 | query, count (1-20, def 10) | Web + news search |
research | $0.010 | query, num_results (1-20, def 5) | Deep multi-source research |
youtube | $0.002 | query or id (one required) | Video search or lookup |
screenshot | $0.010 | url, format (png/jpg/webp, def png) | Capture a URL screenshot |
scrape | $0.002 | url | Clean text extraction |
image | $0.040 | prompt, size (1024x1024/1024x1792/1792x1024, def 1024x1024) | AI image generation |
stocks | $0.001 | symbol | Real-time stock quotes |
| Tool | Params | Description |
|---|---|---|
| --- | --- | --- |
crypto | ids, vs_currency (def usd) | Crypto prices from CoinGecko |
weather | location | Current weather for any city |
domain | name | Domain availability check |
wallet | — | Your Stellar wallet address + balance |
tools | — | List all 21 XLMTools tools |
budget (MCP only) | action (set/check/clear), amount | Session spending cap |
dex-orderbook | pair, limit (1-200, def 10) | Stellar DEX orderbook |
dex-candles | pair, resolution (1m/5m/15m/1h/1d/1w, def 1h), limit (1-200, def 20) | OHLCV candles |
dex-trades | pair, limit (1-200, def 10), trade_type (all/orderbook/liquidity_pool, def all) | Recent DEX trades |
swap-quote | from, to, amount, mode (send/receive, def send) | Best swap path |
stellar-asset | asset | Asset supply, trustlines |
stellar-account | address | Account balances and signers |
stellar-pools | asset (optional), limit (1-200, def 10) | Liquidity pool data |
oracle-price | asset, feed (crypto/fiat/dex, def crypto) | Reflector oracle price |
When MCP is unavailable, use xlm via Bash:
# Free tools
xlm crypto bitcoin,ethereum,stellar
xlm weather Lagos
xlm wallet
xlm oracle-price BTC
xlm dex-orderbook XLM/USDC --limit 5
# Paid tools
xlm search "Stellar MPP micropayments" --count 5
xlm stocks AAPL
xlm research "Soroban smart contracts" --num-results 3
xlm image "a stingray gliding over a coral reef at dusk" --size 1024x1024
# Help
xlm --help
Output is JSON. Pipe to jq for filtering:
xlm crypto bitcoin | jq '.bitcoin.usd'
Every paid response ends with a line like:
---
Payment: $0.003 USDC · tx/a3f9c28d71e0... · stellar testnet
The tx_hash is a real 64-character Stellar transaction hash. Users can verify any call at https://stellar.expert/explorer/testnet/tx/. Always surface the tx hash to the user when showing results from a paid tool.
The budget tool is MCP-only. In MCP mode, call mcp__xlmtools__budget with:
action: "set" + amount: 2.00 — cap spending at $2 for the sessionaction: "check" — see remaining balanceaction: "clear" — remove the capScoping:
xlm invocation is a fresh process, a per-call cap has no meaning there. If you need a cap in CLI mode, track spend externally by parsing the tx hash footer of each response.These are the hard rules. If you are about to break one, stop and reconsider.
research, screenshot, image). Never skip either.crypto (free) before stocks ($0.001). search ($0.003) before research ($0.010) unless the user explicitly wants a deep dive.mcp__xlmtools__* tools exist? Use them. They're cached.mcp__xlmtools__budget reports a low cap, pause and ask the user before continuing.If you delegate work to a forked subagent (e.g. via context: fork), this skill does not automatically travel with it. The subagent may call paid tools without the cost-confirmation rules above. Either preload this skill into the subagent explicitly, or handle paid calls from the parent context only.
Good response pattern:
> Here's what I found about [topic] from XLMTools search:
>
> [results...]
>
> Paid $0.003 USDC. Transaction: a3f9c28d…
Include the transaction link so the user can verify the payment on-chain.
"Command not found: xlm" — User needs to install: npm install -g @xlmtools/cli
"Account not found" / payment errors — Wallet needs funding. Direct user to https://faucet.circle.com for testnet USDC. XLM is auto-funded via friendbot on first wallet creation — but if the wallet already exists and is out of XLM, it won't re-fund. In that case, ask the user to visit https://lab.stellar.org/account/fund manually.
"Unknown tool: budget" (in CLI mode) — The CLI doesn't implement budget. Budget is MCP-only. Use an MCP-compatible host, or track spend externally.
"Budget limit reached" — Only appears in MCP mode. Ask user to either clear the budget (mcp__xlmtools__budget with action: "clear") or raise the cap (action: "set" with a higher amount).
MCP tools not appearing — User may need to install XLMTools as an MCP server: claude mcp add xlmtools npx @xlmtools/mcp. Fall back to CLI mode in the meantime if xlm is installed.
API server unreachable — XLMTools tools require the API server to be running. If every call hangs or times out, the API is either down or unreachable. Report to the user and stop retrying.
"Is this site up / accessible?" — There's no dedicated uptime tool. Closest approximation: domain (checks if DNS resolves) or scrape (fails loudly if the site is down, returns content if it's up). Note: domain does WHOIS availability, not HTTP reachability — a registered domain could still be offline.
共 1 个版本
暂无安全检测报告