Skip to main content
Glama

helius_get_slot

Retrieve the current slot number of the Solana blockchain. Specify commitment level for confirmed, finalized, or processed states.

Instructions

Get the current slot of the Solana blockchain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commitmentNo

Implementation Reference

  • Main handler function for helius_get_slot. Calls connection.getSlot() with optional commitment parameter and returns the current Solana slot number.
    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)}`);
      }
    }
  • Input type definition for GetSlotInput with optional commitment field.
    export type GetSlotInput = {
      commitment?: "confirmed" | "finalized" | "processed";
    }
  • Output type definition for GetSlotOutput.
    export type GetSlotOutput = {
      slot: number;
    }
  • src/tools.ts:114-124 (registration)
    Tool schema registration defining name, description, and inputSchema for helius_get_slot.
    {
      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)
    Handler registration mapping 'helius_get_slot' to getSlotHandler in the handlers export.
    "helius_get_slot": getSlotHandler,
Behavior2/5

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

No annotations provided, so the description bears full responsibility. It only states the action without disclosing read-only behavior, impact of the commitment parameter, or that it is a safe, non-destructive call. More detail on what 'current slot' means and how commitment affects the result is needed.

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?

One sentence with no wasted words. The key information is front-loaded and easily understood.

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?

For a simple query tool with one optional parameter and no output schema, the description provides the essential purpose. However, it omits behavioral notes (e.g., read-only, idempotent) that would aid an agent in correct invocation.

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 single optional parameter 'commitment' has an enum with self-explanatory values ('confirmed', 'finalized', 'processed'), so the schema coverage of 0% is partially mitigated. However, the description adds no additional meaning beyond the schema.

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

Purpose5/5

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

The description 'Get the current slot of the Solana blockchain' uses a specific verb ('Get') and resource ('current slot'), clearly distinguishing it from sibling tools that deal with assets, accounts, transactions, etc.

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

Usage Guidelines3/5

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

No explicit guidance on when to use this tool versus alternatives. However, the simplicity of the tool and clear naming imply its purpose. A brief mention of context (e.g., 'Use this to check the latest slot') would improve clarity.

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