Skip to main content
Glama

Fresh Bitcoin price (30 sats L402 or $0.025 USDC x402)

get_btc_price_fresh
Read-only

Fresh BTC spot in USD/EUR with 24h change, cached at most 10 seconds — use this instead of btc_price when you need a tighter quote (btc_price is 10 sats and cached 60 seconds). Upstream gold-api.com typically prints about every 30 seconds; this tier returns the latest print within 10 seconds of it landing. Price: 30 sats (Lightning) or $0.025 USDC on Base (x402). Sample (illustrative, not live): {"status":"success","endpoint":"btc_price_fresh","data":{"price_usd":97500.0,"price_eur":90120.5,"change_24h_percent":1.23,"source":"gold-api.com","stale":false,"age_seconds":4.2,"timestamp":"2026-11-16T18:00:00Z"},"metadata":{"cost_sats":30}} Pay: Call it, get HTTP 402 (or MCP payment_required) with a Lightning invoice and macaroon, pay the invoice, then retry with Authorization: L402 <macaroon>:<preimage>. Or pay in USDC on Base via x402: sign the 402's x402 requirement (PAYMENT-REQUIRED header, or accepts in the JSON body) and retry with the PAYMENT-SIGNATURE (x402 v2) or X-PAYMENT (v1) header; only a 200 is settled.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_btc_price_fresh"
  }
}

Input Schema

NameRequiredDescriptionDefault
x402_paymentNoOptional x402 payment (USDC on Base): base64 PaymentPayload (v2, or v1 X-PAYMENT format) signed for accepts[0] of this tool's payment_required result. Alternative to params._meta['x402/payment']. Omit both to receive the payment requirements.
l402_credentialNoOptional L402 credential '<macaroon>:<preimage_hex>' (or 'L402 <macaroon>:<preimage>') from a paid invoice or an active subscription. Omit it to receive the Lightning invoice and macaroon.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say readOnlyHint and openWorldHint; the description adds substantial context beyond that: a 10-second cache ceiling, the upstream print cadence of gold-api.com, and the full paid-request lifecycle (402 response, Lightning invoice and macaroon, retry with L402 header, or x402 signatures with only a 200 meaning settled). These are exactly the operational traits an agent needs before calling a paid endpoint.

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

Conciseness3/5

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

The leading sentence is well front-loaded and the payment steps are ordered, but the block is dense and long, and the 30 sats / $0.025 USDC pricing is stated twice (title and body). The illustrative sample justifies its space given there is no output schema, but the run-on payment paragraph could be tightened.

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, the sample response supplies the return shape (price_usd, price_eur, change_24h_percent, source, stale, age_seconds, timestamp, cost_sats) and the freshness fields. Combined with the cache behavior and full payment flow, nothing an agent needs to invoke or interpret this tool is missing.

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 schema already defines both optional payment parameters and the omit-to-get-requirements behavior; baseline would be 3. The description adds value by naming the concrete retry headers (Authorization: L402, PAYMENT-SIGNATURE, X-PAYMENT) and where the x402 requirement appears, clarifying how these credentials are actually produced and used.

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 resource and payload (fresh BTC spot in USD/EUR with 24h change) plus the distinguishing trait (cached at most 10 seconds). It explicitly contrasts with the sibling get_btc_price by cache window and price, so an agent can choose without opening either 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?

Gives an explicit decision rule: 'use this instead of btc_price when you need a tighter quote,' and quantifies the trade-off (10s vs 60s cache, 30 sats vs 10 sats). No alternative is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources