get_chain_status
Retrieve current blockchain status such as block height and chain ID for the Penumbra network to monitor and verify chain activity.
Instructions
Get current chain status including block height and chain ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:219-249 (handler)The private async getChainStatus() method implements the core logic for the get_chain_status tool, returning a mock ChainStatus object with height, chainId, timestamp, and blockHash.private async getChainStatus() { try { // TODO: Implement actual chain status query const mockStatus: ChainStatus = { height: "1000000", chainId: CONFIG.chain.chainId, timestamp: new Date().toISOString(), blockHash: "0x..." }; return { content: [ { type: 'text', text: JSON.stringify(mockStatus, null, 2), }, ], }; } catch (error: unknown) { const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred'; return { content: [ { type: 'text', text: `Error fetching chain status: ${errorMessage}`, }, ], isError: true, }; } }
- src/index.ts:104-112 (registration)Tool registration in the ListToolsRequestSchema handler, defining the name, description, and input schema (empty object) for get_chain_status.{ name: 'get_chain_status', description: 'Get current chain status including block height and chain ID', inputSchema: { type: 'object', properties: {}, required: [], }, },
- src/index.ts:159-160 (registration)Dispatch logic in the CallToolRequestSchema handler that calls getChainStatus() when the tool name is 'get_chain_status'.case 'get_chain_status': return await this.getChainStatus();
- src/index.ts:51-56 (schema)TypeScript interface defining the structure of the chain status response returned by the tool.interface ChainStatus { height: string; chainId: string; timestamp: string; blockHash: string; }