Skip to main content
Glama

helius_get_slot

Retrieve the current Solana blockchain slot number to track transaction progress and verify network status, with optional commitment level selection for accuracy.

Instructions

Get the current slot of the Solana blockchain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commitmentNo

Implementation Reference

  • The main handler function getSlotHandler that executes the tool logic by calling the Solana RPC getSlot method via Helius connection.
    export const getSlotHandler = async (input: GetSlotInput): Promise<ToolResultSchema> => { try { const slot = await (helius as any as Helius).connection.getSlot(input.commitment); return createSuccessResponse(`Current slot: ${slot}`); } catch (error) { return createErrorResponse(`Error getting slot: ${error instanceof Error ? error.message : String(error)}`); } }
  • src/tools.ts:557-557 (registration)
    Registration of the handler function in the handlers dictionary mapping tool name to its handler.
    "helius_get_slot": getSlotHandler,
  • Tool definition including name, description, and input schema for validation in the tools array.
    { name: "helius_get_slot", description: "Get the current slot of the Solana blockchain", inputSchema: { type: "object", properties: { commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] } }, required: [] }
  • TypeScript type definition for the input parameters of the getSlotHandler.
    export type GetSlotInput = { 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