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";
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Get') but lacks details on permissions, rate limits, error handling, or response format. For a blockchain query tool, this omission is significant, as users need to understand reliability and constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero waste: 'Get the current slot of the Solana blockchain.' It's front-loaded and appropriately sized for a simple tool, making it easy to parse without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one optional parameter) and lack of annotations or output schema, the description is minimally adequate. It states the purpose but misses behavioral details and parameter context. For a blockchain tool, this leaves gaps in understanding how to interpret results or handle the 'commitment' parameter effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has one parameter ('commitment') with an enum but 0% schema description coverage. The description doesn't mention parameters at all, failing to explain what 'commitment' means or its impact on the slot retrieval. However, with only one parameter and high schema structure (enum provided), the baseline is 3, as the schema partially compensates.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get the current slot of the Solana blockchain.' It uses a specific verb ('Get') and resource ('current slot'), distinguishing it from siblings like 'helius_get_block_height' or 'helius_get_epoch_info' that retrieve different blockchain metrics. However, it doesn't explicitly differentiate from all siblings, such as those fetching account or transaction data, which slightly limits precision.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention scenarios like monitoring blockchain progress, verifying transaction inclusion, or comparing with other tools like 'helius_get_block_height' for related data. Without such context, users must infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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