Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_solana_block

Retrieve Solana blockchain block data with transaction details for network analysis and verification using Grove's MCP Server.

Instructions

Get Solana block information with optional transactions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slotYesBlock slot number
includeTransactionsNoInclude full transaction details (default: false)
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • Core handler function that executes the logic for fetching a Solana block by slot, optionally including transactions, via RPC call.
    async getBlock(
      slot: number,
      includeTransactions: boolean = false,
      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}`,
        };
      }
    
      const params: any = [
        slot,
        {
          encoding: 'json',
          transactionDetails: includeTransactions ? 'full' : 'signatures',
          maxSupportedTransactionVersion: 0,
        },
      ];
    
      return this.blockchainService.callRPCMethod(service.id, 'getBlock', params);
    }
  • MCP tool dispatch handler that extracts arguments and calls the SolanaService.getBlock method.
    case 'get_solana_block': {
      const slot = args?.slot as number;
      const includeTransactions = (args?.includeTransactions as boolean) || false;
      const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet';
    
      const result = await solanaService.getBlock(slot, includeTransactions, network);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
        isError: !result.success,
      };
    }
  • Input schema definition for the get_solana_block tool, specifying parameters like slot, includeTransactions, and network.
    {
      name: 'get_solana_block',
      description: 'Get Solana block information with optional transactions',
      inputSchema: {
        type: 'object',
        properties: {
          slot: {
            type: 'number',
            description: 'Block slot number',
          },
          includeTransactions: {
            type: 'boolean',
            description: 'Include full transaction details (default: false)',
          },
          network: {
            type: 'string',
            enum: ['mainnet', 'testnet'],
            description: 'Network type (defaults to mainnet)',
          },
        },
        required: ['slot'],
      },
    },
  • src/index.ts:88-101 (registration)
    Collects all tools including Solana tools via registerSolanaHandlers for ListToolsRequestHandler.
    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),
    ];
  • src/index.ts:114-126 (registration)
    Routes tool execution to the appropriate handler, including handleSolanaTool for get_solana_block.
    let result =
      (await handleBlockchainTool(name, args, blockchainService)) ||
      (await handleDomainTool(name, args, domainResolver)) ||
      (await handleTransactionTool(name, args, advancedBlockchain)) ||
      (await handleTokenTool(name, args, advancedBlockchain)) ||
      (await handleMultichainTool(name, args, advancedBlockchain)) ||
      (await handleContractTool(name, args, advancedBlockchain)) ||
      (await handleUtilityTool(name, args, advancedBlockchain)) ||
      (await handleEndpointTool(name, args, endpointManager)) ||
      (await handleSolanaTool(name, args, solanaService)) ||
      (await handleCosmosTool(name, args, cosmosService)) ||
      (await handleSuiTool(name, args, suiService)) ||
      (await handleDocsTool(name, args, 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 mentions 'optional transactions' but doesn't explain what 'block information' includes, potential rate limits, authentication needs, or error conditions. For a read operation with no structured safety hints, 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, efficient sentence that front-loads the core purpose without unnecessary details. It avoids redundancy and wastes no words, making it easy to parse quickly. This is an example of optimal conciseness for a straightforward tool.

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 lack of annotations and output schema, the description is incomplete. It doesn't specify what 'block information' entails, how results are structured, or any behavioral traits like pagination or error handling. For a tool with three parameters and no structured output, more context is needed to guide effective use.

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, clearly documenting all parameters (slot, includeTransactions, network). The description adds minimal value beyond the schema, only implying the optional nature of transactions. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't enhance parameter understanding significantly.

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 Solana block information with optional transactions.' It specifies the verb ('Get'), resource ('Solana block information'), and optional feature ('with optional transactions'). However, it doesn't explicitly differentiate from sibling tools like 'get_solana_block_height' or 'get_block_details,' which reduces clarity in a crowded toolset.

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. With many sibling tools (e.g., 'get_solana_block_height,' 'get_block_details'), there's no indication of context, prerequisites, or exclusions. This leaves the agent to infer usage based on tool names alone, which is insufficient for optimal 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