Skip to main content
Glama

helius_get_leader_schedule

Retrieve the leader schedule for a specific Solana epoch using the Helius API, providing details on validator assignments by slot and commitment level for blockchain operations and analysis.

Instructions

Get the leader schedule for an epoch

Input Schema

NameRequiredDescriptionDefault
commitmentNo
slotNo

Input Schema (JSON Schema)

{ "properties": { "commitment": { "enum": [ "confirmed", "finalized", "processed" ], "type": "string" }, "slot": { "type": "number" } }, "required": [], "type": "object" }

Implementation Reference

  • The core handler function implementing the 'helius_get_leader_schedule' tool. It invokes the Solana RPC getLeaderSchedule method via the Helius client connection, ignoring input parameters as per comment.
    export const getLeaderScheduleHandler = async (input: GetLeaderScheduleInput): Promise<ToolResultSchema> => { try { // getLeaderSchedule doesn't accept parameters in the real SDK const leaderSchedule = await (helius as any as Helius).connection.getLeaderSchedule(); return createSuccessResponse(`Leader schedule: ${JSON.stringify(leaderSchedule, null, 2)}`); } catch (error) { return createErrorResponse(`Error getting leader schedule: ${error instanceof Error ? error.message : String(error)}`); } }
  • Input schema definition for the 'helius_get_leader_schedule' tool, specifying optional slot and commitment parameters.
    { name: "helius_get_leader_schedule", description: "Get the leader schedule for an epoch", inputSchema: { type: "object", properties: { slot: { type: "number" }, commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] } }, required: [] } },
  • src/tools.ts:568-568 (registration)
    Registration of the handler function in the central handlers dictionary, mapping tool name to its executor.
    "helius_get_leader_schedule": getLeaderScheduleHandler,

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