get-mempool-info
Retrieve real-time Bitcoin mempool data to monitor transaction status and network activity for blockchain analysis.
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' tool on the MCP server with a handler that calls MempoolService to get info and returns formatted text 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 }] }; } ); }
- Inline handler function for the 'get-mempool-info' tool that delegates to service and structures MCP response.async () => { const text = await this.mempoolService.getMempoolInfo(); return { content: [{ type: "text", text }] }; }
- TypeScript interface defining the structure of mempool info response data used by the tool.export interface IMempoolInfoResponse { count: number; vsize: number; total_fee: number; }
- Application service method that fetches raw mempool info and formats it for the tool response.async getMempoolInfo(): Promise<string> { const data = await this.requestService.getMempoolInfo(); return formatResponse<IMempoolInfoResponse>("Mempool Info", data); }
- Infrastructure service method performing the HTTP request to the mempool API endpoint.async getMempoolInfo(): Promise<IMempoolInfoResponse | null> { return this.client.makeRequest<IMempoolInfoResponse>(`mempool`); }