analyze_next_block
Predict Bitcoin's next block details including transactions, weight utilization, miner revenue, fee percentiles, and top-fee transactions for blockchain analysis.
Instructions
Predict next block: transactions, weight utilization, miner revenue, fee percentiles, top-fee txs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/bitcoin_mcp/server.py:575-585 (handler)Tool registration and handler for `analyze_next_block`. It delegates to `_analyze_next_block` (imported from `bitcoinlib_rpc.nextblock`) and formats the output for JSON.
@mcp.tool() def analyze_next_block() -> str: """Predict next block: transactions, weight utilization, miner revenue, fee percentiles, top-fee txs.""" data = _analyze_next_block(get_rpc()) # Convert tuples to lists for JSON serialization if "top_5" in data: data["top_5"] = [ {"txid": txid, "fee_rate": rate, "fee_sats": fee} for txid, rate, fee in data["top_5"] ] return json.dumps(data)