Skip to main content
Glama

helius_get_epoch_info

Retrieve current epoch details from Solana, including epoch number, slot index, and start slot, with optional commitment level.

Instructions

Get information about the current epoch

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commitmentNo

Implementation Reference

  • getEpochInfoHandler: The actual implementation that calls connection.getEpochInfo() and returns the epoch info.
    export const getEpochInfoHandler = async (input: GetEpochInfoInput): Promise<ToolResultSchema> => {
      try {
        const epochInfo = await (helius as any as Helius).connection.getEpochInfo(input.commitment);
        return createSuccessResponse(`Epoch info: ${JSON.stringify(epochInfo, null, 2)}`);
      } catch (error) {
        return createErrorResponse(`Error getting epoch info: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • GetEpochInfoInput type definition with optional commitment parameter.
    export type GetEpochInfoInput = {
      commitment?: "confirmed" | "finalized" | "processed";
    }
  • src/tools.ts:220-230 (registration)
    Tool registration entry: defines name 'helius_get_epoch_info', description, and inputSchema with optional commitment.
    {
      name: "helius_get_epoch_info",
      description: "Get information about the current epoch",
      inputSchema: {
        type: "object",
        properties: {
          commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] }
        },
        required: []
      }
    },
  • src/tools.ts:566-566 (registration)
    Maps the tool name 'helius_get_epoch_info' to getEpochInfoHandler in the handler lookup object.
    "helius_get_epoch_info": getEpochInfoHandler,
  • createErrorResponse and createSuccessResponse helper functions used by the handler.
    export const createErrorResponse = (message: string): ToolResultSchema => {
      return {
        content: [{
          type: "text",
          text: message
        }],
        isError: true
      };
    };
    
    /**
     * Utility function to create a success response
     * @param message The success message
     * @returns A ToolResultSchema with the success message
     */
    export const createSuccessResponse = (message: string): ToolResultSchema => {
      return {
        content: [{
          type: "text",
          text: message
        }],
        isError: false
      };
    };
Behavior1/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It only states that it 'gets information', with no mention of mutability, authorization requirements, rate limits, or what the response entails. This is insufficient.

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

Conciseness3/5

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

The description is a single sentence, which is concise, but lacks necessary detail. While there is no fluff, the brevity sacrifices completeness. A bit more structure or expansion would improve it.

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

Completeness2/5

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

Given there is one optional parameter, no output schema, and no annotations, the description is too sparse. It doesn't explain what the returned information includes, how to interpret the commitment parameter, or any behavior details. The tool is underspecified for an AI agent to use correctly.

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

Parameters1/5

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

The schema has 0% description coverage for its single parameter 'commitment'. The description does not explain what 'commitment' means or how the enum values affect the result. The description adds no value beyond the raw 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 clearly states the tool retrieves information about the current epoch, using the specific verb 'Get' and resource 'epoch info'. It distinguishes from the sibling tool 'helius_get_epoch_schedule', which returns the schedule rather than current info.

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?

There is no guidance on when to use this tool versus alternatives like 'helius_get_epoch_schedule' or others. No when-to-use, when-not-to-use, or context provided.

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