Skip to main content
Glama

helius_get_epoch_schedule

Retrieve the epoch schedule for Solana blockchain to understand timing and slot distribution across epochs.

Instructions

Get the epoch schedule

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commitmentNo

Implementation Reference

  • The core handler function that executes the tool logic by calling getEpochSchedule on the Helius Solana connection and formatting the response.
    export const getEpochScheduleHandler = async (input: GetEpochScheduleInput): Promise<ToolResultSchema> => { try { // getEpochSchedule doesn't accept any parameters in the real SDK const epochSchedule = await (helius as any as Helius).connection.getEpochSchedule(); return createSuccessResponse(`Epoch schedule: ${JSON.stringify(epochSchedule, null, 2)}`); } catch (error) { return createErrorResponse(`Error getting epoch schedule: ${error instanceof Error ? error.message : String(error)}`); } }
  • The MCP tool schema defining the name, description, and input validation schema.
    { name: "helius_get_epoch_schedule", description: "Get the epoch schedule", inputSchema: { type: "object", properties: { commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] } }, required: [] } },
  • src/tools.ts:567-567 (registration)
    Registration of the tool name to its handler function in the handlers dictionary.
    "helius_get_epoch_schedule": getEpochScheduleHandler,
  • TypeScript type definition for the handler input, matching the tool schema.
    export type GetEpochScheduleInput = { 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