get_indexed_transaction
Retrieve enriched Bitcoin transaction details with resolved addresses, spent/unspent status, and block context from blockchain indexers.
Instructions
Get enriched transaction details from the blockchain indexer.
Unlike analyze_transaction (which uses raw RPC), this returns resolved input addresses, spent/unspent status for each output, and block context. Falls back to mempool.space when the indexer is unavailable.
Args: txid: Transaction ID (64-character hex string)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| txid | Yes |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/bitcoin_mcp/server.py:1583-1603 (handler)The handler function `get_indexed_transaction` that fetches enriched transaction details using an indexed API with a fallback to mempool.space.
def get_indexed_transaction(txid: str) -> str: """Get enriched transaction details from the blockchain indexer. Unlike analyze_transaction (which uses raw RPC), this returns resolved input addresses, spent/unspent status for each output, and block context. Falls back to mempool.space when the indexer is unavailable. Args: txid: Transaction ID (64-character hex string) """ result = _query_indexed_api(f"tx/{txid}") if "error" not in result: return json.dumps(result) # Fallback to mempool.space data = _query_mempool_space(f"tx/{txid}") if isinstance(data, dict) and "error" in data: return json.dumps(data) if isinstance(data, dict): data["source"] = "mempool.space" return json.dumps(data)