Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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();
  • TypeScript interface defining the structure of the chain status response returned by the tool.
    interface ChainStatus { height: string; chainId: string; timestamp: string; blockHash: string; }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bmorphism/penumbra-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server