Skip to main content
Glama

helius_get_block_height

Retrieve the current block height from the Solana blockchain to track network progress and verify transaction confirmations.

Instructions

Get the block height of the Solana blockchain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commitmentNo

Implementation Reference

  • The main handler function that executes the tool logic by calling helius.connection.getBlockHeight with optional commitment and returns formatted 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)}`);
      }
    }
  • MCP tool schema definition including name, description, and input schema for validation.
      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)
    Maps the tool name to its handler function in the handlers dictionary.
    "helius_get_block_height": getBlockHeightHandler,
  • TypeScript interface defining the input parameters for the getBlockHeightHandler.
    export type GetBlockHeightInput = {
      commitment?: "confirmed" | "finalized" | "processed";
    }
  • src/tools.ts:5-5 (registration)
    Import statement that brings the getBlockHeightHandler into src/tools.ts for registration.
    getBlockHeightHandler, 
Behavior2/5

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

With no annotations provided, the description carries full burden but only states what the tool does, not how it behaves. It doesn't mention whether this is a read-only operation (implied but not stated), potential rate limits, authentication requirements, error conditions, or what format the height is returned in. For a blockchain query tool with zero annotation coverage, this leaves significant behavioral gaps.

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 wasted words. It's front-loaded with the core purpose and appropriately sized for what it communicates. Every word earns its place in conveying the essential function.

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?

For a blockchain query tool with no annotations, no output schema, and incomplete parameter documentation, the description is insufficient. It states what the tool does but provides no context about return format, error handling, commitment parameter significance, or how this differs from similar blockchain status tools. The description doesn't compensate for the missing structured information.

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?

Schema description coverage is 0%, but the description doesn't mention the 'commitment' parameter at all. The schema provides an enum with three commitment levels, but the description gives no context about what commitment means or when to use different levels. With one parameter that has no description coverage, the baseline would be lower, but the parameter is optional (not required), so some leniency applies.

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 verb ('Get') and resource ('block height of the Solana blockchain'), making the purpose immediately understandable. It distinguishes from siblings like 'helius_get_slot' (which returns slot number) and 'helius_get_latest_blockhash' (which returns hash), though it doesn't explicitly mention these distinctions in the text.

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 about when to use this tool versus alternatives. While the purpose is clear, there's no mention of when this specific block height retrieval is appropriate compared to other blockchain status tools in the sibling list, nor any prerequisites or context for usage.

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