Skip to main content
Glama

helius_get_epoch_info

Retrieve current Solana blockchain epoch details including slot information and block production data to monitor network status and timing.

Instructions

Get information about the current epoch

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commitmentNo

Implementation Reference

  • The main handler function that executes the tool logic by calling the Helius RPC connection.getEpochInfo method with the provided commitment level and returns the epoch information.
    export const getEpochInfoHandler = async (input: GetEpochInfoInput): Promise<ToolResultSchema> => { try { const epochInfo = await (helius as any as Helius).connection.getEpochInfo(input.commitment); return createSuccessResponse(`Epoch info: ${JSON.stringify(epochInfo, null, 2)}`); } catch (error) { return createErrorResponse(`Error getting epoch info: ${error instanceof Error ? error.message : String(error)}`); } }
  • The tool schema definition including name, description, and input schema for the helius_get_epoch_info tool.
    { name: "helius_get_epoch_info", description: "Get information about the current epoch", inputSchema: { type: "object", properties: { commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] } }, required: [] } },
  • src/tools.ts:566-566 (registration)
    Registration of the 'helius_get_epoch_info' tool mapping its name to the getEpochInfoHandler function in the handlers dictionary.
    "helius_get_epoch_info": getEpochInfoHandler,
  • TypeScript type definition for the input parameters of the getEpochInfoHandler.
    export type GetEpochInfoInput = { commitment?: "confirmed" | "finalized" | "processed"; }

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/dcSpark/mcp-server-helius'

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