get-mempool-info
Retrieve real-time Bitcoin mempool data to analyze transaction activity and network status. Access detailed information for insights into pending transactions and blockchain behavior.
Instructions
Returns mempool info
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/interface/controllers/MempoolToolsController.ts:16-25 (registration)Registers the "get-mempool-info" MCP tool. The inline handler calls MempoolService.getMempoolInfo() and returns the formatted text as MCP content.private registerGetMempoolHandler(): void { this.server.tool( "get-mempool-info", "Returns mempool info", async () => { const text = await this.mempoolService.getMempoolInfo(); return { content: [{ type: "text", text }] }; } ); }
- Interface defining the structure of mempool info response (count, vsize, total_fee).export interface IMempoolInfoResponse { count: number; vsize: number; total_fee: number; }
- MempoolService method that fetches raw mempool info from request service and formats it using formatResponse.async getMempoolInfo(): Promise<string> { const data = await this.requestService.getMempoolInfo(); return formatResponse<IMempoolInfoResponse>("Mempool Info", data); }
- Makes HTTP request to the 'mempool' API endpoint to retrieve raw mempool info data.async getMempoolInfo(): Promise<IMempoolInfoResponse | null> { return this.client.makeRequest<IMempoolInfoResponse>(`mempool`); }