Skip to main content
Glama

analyze_transaction

Decode and analyze Bitcoin transactions to examine inputs, outputs, fee rates, SegWit/Taproot flags, and detect inscriptions using a transaction hash.

Instructions

Decode and analyze a transaction: inputs, outputs, fee rate, SegWit/Taproot flags, inscription detection.

Args: txid: Transaction hash (64 hex characters). Local nodes need txindex=1 for confirmed txs; the hosted API handles this automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
txidYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `analyze_transaction` tool handler in `src/bitcoin_mcp/server.py`, which delegates the logic to the `_analyze_transaction` function imported from `bitcoinlib_rpc.transactions`.
    def analyze_transaction(txid: str) -> str:
        """Decode and analyze a transaction: inputs, outputs, fee rate, SegWit/Taproot flags, inscription detection.
    
        Args:
            txid: Transaction hash (64 hex characters). Local nodes need txindex=1 for confirmed txs; the hosted API handles this automatically.
        """
        analysis = _analyze_transaction(get_rpc(), txid)
        return analysis.model_dump_json()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Bortlesboat/bitcoin-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server