get_mempool_info
Retrieve Bitcoin mempool statistics including transaction count, size in bytes, and minimum relay fee to monitor network activity and transaction backlog.
Instructions
Get quick mempool stats: transaction count, size in bytes, min relay fee.
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:311-321 (handler)The implementation of the get_mempool_info tool in src/bitcoin_mcp/server.py. It fetches mempool statistics from the RPC connection and formats them as a JSON string.
def get_mempool_info() -> str: """Get quick mempool stats: transaction count, size in bytes, min relay fee.""" info = get_rpc().getmempoolinfo() return json.dumps({ "size": info["size"], "bytes": info["bytes"], "usage": info["usage"], "maxmempool": info["maxmempool"], "mempoolminfee": info["mempoolminfee"], "minrelaytxfee": info["minrelaytxfee"], })