Skip to main content
Glama

Call any verified data API through BitTuitive (sats or USDC)

call_routed_api

Use this when you want data from another paid API without handling its invoice: pay ONE BitTuitive invoice (sats, or the same all-in price in USDC via x402) and BitTuitive pays the upstream, calls it and returns its JSON in data plus routing (upstream, score, fee). Pass endpoint_id (from list_routable_apis) or data_type and/or q for the best pick with automatic fallback. Cost: upstream price + routing fee max(20%, 3 sats). Side effect: spends your payment on the upstream call; if every upstream fails you get a 24h credit token to pass as credit. If the result is status 'running', repeat the identical call to collect it. Pay by calling without a credential, paying the Lightning invoice or the USDC amount, then retrying with l402_credential=':' or x402_payment. One payment buys one response. Details: https://api.bittuitive.ai/pay. Example: call_routed_api(data_type="bitcoin", q="mempool fees") Informational only; not financial, investment, legal or tax advice; provided as-is, with no warranty; verify before acting. https://api.bittuitive.ai/disclaimer.

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": "call_routed_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoBest-pick mode: keywords, e.g. 'air quality'.
creditNo24h credit token from an earlier failed routed call (instead of paying).
paramsNoOptional query parameters forwarded to the upstream API.
data_typeNoBest-pick mode: category.
endpoint_idNoScoreboard id from list_routable_apis.
x402_paymentNox402 payment (USDC on Base): base64 PaymentPayload signed for accepts[0] of the payment_required result. Alternative to l402_credential; also accepted in params._meta['x402/payment'].
l402_credentialNoL402 credential '<macaroon>:<preimage_hex>' from a paid invoice (or an active subscription). Omit it on the first call to receive the Lightning invoice and macaroon.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the spend side effect, the exact price formula ('upstream price + routing fee max(20%, 3 sats)'), the 24h credit token on total upstream failure, the async 'running' polling contract, and 'One payment buys one response'. The full payment dance (call without credential → pay invoice/USDC → retry with l402_credential or x402_payment) is spelled out, which annotations like openWorldHint cannot convey.

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 core purpose is front-loaded, which is good, but the body is a dense semicolon-chained block mixing payment flow, pricing, retry semantics, a URL, and boilerplate legal disclaimer. The disclaimer and example URL are defensible but the sequence of operational facts could be split into scannable lines.

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 7-parameter, open-world, paid, possibly-async tool with no output schema, the description covers what the agent needs: return keys (`data`, `routing` with upstream/score/fee), cost, failure compensation, auth handshake, and the 'running' repeat rule. Little that would cause a wrong call is left unexplained.

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?

With 100% schema coverage the baseline is 3, and the description earns above that by explaining the sequencing that the schema alone doesn't: omitting l402_credential on the first call is how you obtain the invoice, and `credit` substitutes for payment after a failed routed call. The `params` forwarding object is not elaborated beyond its schema text, which keeps it from a 5.

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: pay one BitTuitive invoice and BitTuitive 'pays the upstream, calls it and returns its JSON in `data` plus `routing`'. The named return keys and the explicit contrast with 'handling its invoice' yourself make it distinguishable from the direct per-API siblings like get_btc_data or get_weather.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear triggering condition ('Use this when you want data from another paid API without handling its invoice') and explains both selection modes: endpoint_id 'from list_routable_apis' for a known target versus data_type and/or q for best pick with automatic fallback. It also tells the agent what to do on a 'running' status and on total failure (pass `credit`). No explicit when-not or sibling-level exclusion is stated, keeping it just short of a 5.

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