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
| Name | Required | Description | Default |
|---|---|---|---|
| commitment | No |
Implementation Reference
- src/handlers/helius.ts:281-289 (handler)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)}`); } }
- src/tools.ts:231-241 (schema)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,
- src/handlers/helius.types.ts:134-136 (schema)TypeScript type definition for the handler input, matching the tool schema.export type GetEpochScheduleInput = { commitment?: "confirmed" | "finalized" | "processed"; }