Skip to main content
Glama

helius_get_block_height

Retrieve the current block height of Solana to track blockchain progress or synchronize operations.

Instructions

Get the block height of the Solana blockchain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commitmentNo

Implementation Reference

  • Handler function that executes the getBlockHeight logic by calling Helius SDK's connection.getBlockHeight and returning a success or error response.
    export const getBlockHeightHandler = async (input: GetBlockHeightInput): Promise<ToolResultSchema> => {
      try {
        const blockHeight = await (helius as any as Helius).connection.getBlockHeight(input.commitment);
        return createSuccessResponse(`Block height: ${blockHeight}`);
      } catch (error) {
        return createErrorResponse(`Error getting block height: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • Input type definition for GetBlockHeight, accepting an optional commitment parameter.
    export type GetBlockHeightInput = {
      commitment?: "confirmed" | "finalized" | "processed";
    }
  • src/tools.ts:45-55 (registration)
    Registration of the 'helius_get_block_height' tool in the tools array with its name, description, and input schema.
    {
      name: "helius_get_block_height",
      description: "Get the block height of the Solana blockchain",
      inputSchema: {
        type: "object",
        properties: {
          commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] }
        },
        required: []
      }
    },
  • src/tools.ts:551-551 (registration)
    Mapping of the tool name 'helius_get_block_height' to its handler function in the handlers dictionary.
    "helius_get_block_height": getBlockHeightHandler,
  • Mock implementation of getBlockHeight for testing, returning a fixed block height of 123456789.
    getBlockHeight: async () => {
      return 123456789;
    },
Behavior2/5

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

No annotations are present, so the description carries full responsibility. It does not disclose behavioral traits such as read-only nature, authorization needs, or rate limits. The simple 'Get' verb implies a read operation, but no further details are given.

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 single sentence is concise but lacks structure and additional context. It is not well-organized to aid an agent; it merely restates the tool's purpose without elaboration.

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 the simplicity of the tool (one optional parameter, no output schema), the description still falls short. It does not explain the return value, the effect of the 'commitment' parameter, or typical use cases, leaving the agent uninformed.

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 input schema includes a parameter 'commitment' with enum values, but the description provides no explanation of its meaning or usage. With 0% schema description coverage, this is a critical omission.

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 action ('Get') and resource ('block height of the Solana blockchain'), matching the tool name. However, it does not differentiate from siblings like `helius_get_slot` or `helius_get_latest_blockhash`.

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?

No guidance is provided on when to use this tool versus alternatives. The description lacks any context about prerequisites, recommended commitment levels, or relationships to other tools.

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