Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_solana_block_height

Retrieve Solana blockchain block height to monitor network status and verify transaction confirmations. Specify mainnet or testnet for accurate data.

Instructions

Get the latest Solana block height

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • Defines the tool schema: name, description, and input schema (network optional). Returned by registerSolanaHandlers for MCP tool listing.
    {
      name: 'get_solana_block_height',
      description: 'Get the latest Solana block height',
      inputSchema: {
        type: 'object',
        properties: {
          network: {
            type: 'string',
            enum: ['mainnet', 'testnet'],
            description: 'Network type (defaults to mainnet)',
          },
        },
      },
    },
  • MCP tool handler logic within handleSolanaTool switch: parses args, calls SolanaService.getBlockHeight, formats response.
    case 'get_solana_block_height': {
      const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet';
    
      const result = await solanaService.getBlockHeight(network);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
        isError: !result.success,
      };
    }
  • Core service method: retrieves Solana RPC endpoint and invokes 'getBlockHeight' RPC method with no parameters.
    /**
     * Get latest block height
     */
    async getBlockHeight(
      network: 'mainnet' | 'testnet' = 'mainnet'
    ): Promise<EndpointResponse> {
      const service = this.blockchainService.getServiceByBlockchain('solana', network);
    
      if (!service) {
        return {
          success: false,
          error: `Solana service not found for ${network}`,
        };
      }
    
      return this.blockchainService.callRPCMethod(service.id, 'getBlockHeight', []);
    }
  • src/index.ts:88-101 (registration)
    Registers all tools including Solana tools via registerSolanaHandlers; tools array used for ListTools response.
    const tools: Tool[] = [
      ...registerBlockchainHandlers(server, blockchainService),
      ...registerDomainHandlers(server, domainResolver),
      ...registerTransactionHandlers(server, advancedBlockchain),
      ...registerTokenHandlers(server, advancedBlockchain),
      ...registerMultichainHandlers(server, advancedBlockchain),
      ...registerContractHandlers(server, advancedBlockchain),
      ...registerUtilityHandlers(server, advancedBlockchain),
      ...registerEndpointHandlers(server, endpointManager),
      ...registerSolanaHandlers(server, solanaService),
      ...registerCosmosHandlers(server, cosmosService),
      ...registerSuiHandlers(server, suiService),
      ...registerDocsHandlers(server, docsManager),
    ];
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 doesn't clarify if this is a read-only operation, its performance characteristics (e.g., rate limits), error conditions, or what the output looks like (e.g., numeric height). For a tool with zero annotation coverage, this is a significant gap in transparency.

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 no wasted words. It's front-loaded with the core purpose ('Get the latest Solana block height'), making it easy to parse quickly. Every part of the sentence contributes directly to understanding the tool's function.

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 high schema coverage, the description is minimally adequate. However, with no output schema and no annotations, it lacks details on return values (e.g., format of block height) and behavioral traits. For a simple read operation, this might suffice, but it leaves gaps in full contextual understanding.

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 100% description coverage, with the 'network' parameter fully documented (enum values and default). The description doesn't add any parameter-specific details beyond what the schema provides, such as explaining why network choice matters. Given the high schema coverage, a baseline score of 3 is appropriate, as the schema handles the parameter semantics adequately.

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 latest Solana block height.' It specifies the verb ('Get'), resource ('Solana block height'), and scope ('latest'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'get_solana_block' (which might return full block details), leaving room for slight ambiguity.

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 sibling tools (e.g., 'get_solana_block' for detailed block data) or any prerequisites, leaving the agent to infer usage from the name alone. This lack of contextual direction reduces effectiveness in tool selection.

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/buildwithgrove/mcp-pocket'

If you have feedback or need assistance with the MCP directory API, please join our Discord server