get-block-status
Check Bitcoin block confirmation status by providing a block hash to verify transaction inclusion and network validation.
Instructions
Returns status for a block
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hash | Yes | The block hash to get status for |
Implementation Reference
- src/interface/controllers/BlocksToolsController.ts:61-72 (registration)Registers the MCP tool 'get-block-status'. Defines input schema requiring a 64-character block hash, description, and handler that delegates to BlocksService.getBlockStatus, returning formatted text content.private registerGetBlockStatusHandler(): void { this.server.tool( "get-block-status", "Returns status for a block", { hash: z.string().length(64).describe("The block hash to get status for"), }, async ({ hash }) => { const text = await this.blocksService.getBlockStatus({ hash }); return { content: [{ type: "text", text }] }; } );
- BlocksService.getBlockStatus: Fetches block status from request service and formats the IBlockStatusResponse using formatResponse.async getBlockStatus({ hash }: IHashParameter): Promise<string> { const data = await this.requestService.getBlockStatus({ hash }); return formatResponse<IBlockStatusResponse>("Block Status", data);
- Core implementation in BlocksRequestService.getBlockStatus: Makes an API request to the endpoint `block/${hash}/status` using IApiClient.makeRequest.async getBlockStatus({ hash }: { hash: string }): Promise<IBlockStatusResponse | null> { return this.client.makeRequest<IBlockStatusResponse>(`block/${hash}/status`);