Skip to main content
Glama

helius_get_slot

Retrieve the current slot of the Solana blockchain using the MCP Helius server, with optional commitment levels for accuracy. Facilitates real-time blockchain data access and transaction processing.

Instructions

Get the current slot of the Solana blockchain

Input Schema

NameRequiredDescriptionDefault
commitmentNo

Input Schema (JSON Schema)

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

Implementation Reference

  • The main handler function that implements the 'helius_get_slot' tool. It calls the Helius connection's getSlot method with the provided commitment level and returns the current slot.
    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)}`); } }
  • Defines the input schema for the 'helius_get_slot' tool, specifying optional commitment parameter.
    { 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: [] } },
  • src/tools.ts:557-557 (registration)
    Registers the getSlotHandler as the executor for the 'helius_get_slot' tool in the handlers dictionary.
    "helius_get_slot": getSlotHandler,

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