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
| Name | Required | Description | Default |
|---|---|---|---|
| commitment | No |
Implementation Reference
- src/handlers/helius.ts:150-157 (handler)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,
- src/tools.ts:114-123 (schema)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: [] }
- src/handlers/helius.types.ts:77-79 (schema)TypeScript type definition for the input parameters of the getSlotHandler.export type GetSlotInput = { commitment?: "confirmed" | "finalized" | "processed"; }