Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_block_details

Retrieve detailed blockchain block information, including optional transaction data, to analyze network activity and verify transactions across supported networks.

Instructions

Get detailed block information with optional transaction list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockchainYesBlockchain name
blockNumberYesBlock number (number or "latest", "earliest", "pending")
includeTransactionsNoInclude full transaction objects (default: false)
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • MCP tool handler for get_block_details: extracts arguments, performs safety check for large responses, calls service, and formats response.
    case 'get_block_details': {
      const blockchain = args?.blockchain as string;
      const blockNumber = args?.blockNumber as string | number;
      const includeTransactions = (args?.includeTransactions as boolean) || false;
      const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet';
    
      // SAFETY CHECK: Block queries with full transactions
      const safetyCheck = checkBlockQuery(
        'eth_getBlockByNumber',
        [blockNumber, includeTransactions]
      );
      
      if (!safetyCheck.safe) {
        return {
          content: [
            {
              type: 'text',
              text: `⛔ UNSAFE BLOCK QUERY BLOCKED\n\n` +
                    `Reason: ${safetyCheck.reason}\n\n` +
                    `Suggestion: ${safetyCheck.suggestion}\n\n` +
                    `This protection prevents session crashes from large responses.`,
            },
          ],
          isError: true,
        };
      }
    
      const result = await advancedBlockchain.getBlockDetails(
        blockchain,
        blockNumber,
        includeTransactions,
        network
      );
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
        isError: !result.success,
      };
    }
  • Input schema and tool metadata definition for get_block_details tool.
    {
      name: 'get_block_details',
      description: 'Get detailed block information with optional transaction list',
      inputSchema: {
        type: 'object',
        properties: {
          blockchain: {
            type: 'string',
            description: 'Blockchain name',
          },
          blockNumber: {
            description: 'Block number (number or "latest", "earliest", "pending")',
          },
          includeTransactions: {
            type: 'boolean',
            description: 'Include full transaction objects (default: false)',
          },
          network: {
            type: 'string',
            enum: ['mainnet', 'testnet'],
            description: 'Network type (defaults to mainnet)',
          },
        },
        required: ['blockchain', 'blockNumber'],
      },
    },
  • Core implementation: retrieves blockchain service and calls eth_getBlockByNumber RPC method with proper block parameter formatting.
    async getBlockDetails(
      blockchain: string,
      blockNumber: string | number,
      includeTransactions: boolean = false,
      network: 'mainnet' | 'testnet' = 'mainnet'
    ): Promise<EndpointResponse> {
      const service = this.blockchainService.getServiceByBlockchain(blockchain, network);
    
      if (!service) {
        return {
          success: false,
          error: `Blockchain service not found: ${blockchain} (${network})`,
        };
      }
    
      const blockParam = typeof blockNumber === 'number'
        ? '0x' + blockNumber.toString(16)
        : blockNumber;
    
      return this.blockchainService.callRPCMethod(
        service.id,
        'eth_getBlockByNumber',
        [blockParam, includeTransactions]
      );
    }
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 'detailed block information' and an 'optional transaction list', but lacks critical details such as rate limits, authentication requirements, error handling, or whether this is a read-only operation (implied by 'Get' but not explicit). For a tool with no annotations, 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 ('Get detailed block information') and adds a key optional feature ('with optional transaction list'). There is no wasted language, making it highly concise and well-structured for quick comprehension.

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 complexity (blockchain data retrieval with 4 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'detailed block information' includes, how transactions are formatted if included, or potential limitations (e.g., supported blockchains). For a tool with no structured behavioral or output details, the description should provide more context to be fully helpful.

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 four parameters (blockchain, blockNumber, includeTransactions, network). The description adds minimal value beyond the schema, only implying that 'includeTransactions' controls the transaction list. Since schema coverage is high, the baseline score of 3 is appropriate, as the description doesn't significantly enhance parameter understanding.

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 detailed block information with optional transaction list'. It specifies the verb ('Get'), resource ('detailed block information'), and an optional feature ('transaction list'). However, it doesn't explicitly differentiate from sibling tools like 'get_blockchain_service' or 'get_cosmos_block', which might have overlapping functionality.

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 prerequisites, exclusions, or comparisons to sibling tools (e.g., 'get_cosmos_block' for Cosmos-specific blocks or 'get_solana_block' for Solana). This leaves the agent with minimal context for 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