Skip to main content
Glama

helius_get_leader_schedule

Retrieve the leader schedule for a specific Solana blockchain epoch to identify validator nodes responsible for block production.

Instructions

Get the leader schedule for an epoch

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slotNo
commitmentNo

Implementation Reference

  • The handler function that implements the core logic for the 'helius_get_leader_schedule' tool by calling the Solana RPC getLeaderSchedule method via the Helius client.
    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)}`);
      }
    }
  • The 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)
    The registration of the tool name to its handler function in the handlers dictionary.
    "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