helius_get_epoch_schedule
Retrieve the Solana epoch schedule, specifying commitment level for confirmed or finalized data.
Instructions
Get the epoch schedule
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "helius_get_epoch_schedule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commitment | No |
Implementation Reference
- src/tools.ts:231-240 (registration)Registration of the 'helius_get_epoch_schedule' tool with its name, description, and input schema. Imported from handlers/helius.ts.
{ name: "helius_get_epoch_schedule", description: "Get the epoch schedule", inputSchema: { type: "object", properties: { commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] } }, required: [] } - src/handlers/helius.ts:281-289 (handler)Handler function getEpochScheduleHandler that calls connection.getEpochSchedule() to fetch epoch schedule data and returns it as a formatted string.
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/handlers/helius.types.ts:134-136 (schema)Type definition GetEpochScheduleInput with optional commitment parameter.
export type GetEpochScheduleInput = { commitment?: "confirmed" | "finalized" | "processed"; } - src/tools.ts:20-20 (helper)Import statement for getEpochScheduleHandler from ./handlers/helius.js.
getEpochScheduleHandler, - src/handlers/helius.ts:18-18 (helper)Import of GetEpochScheduleInput type from helius.types.
GetEpochScheduleInput,