Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

get_block_details

Retrieve detailed blockchain block information including transaction data from 70+ networks like Ethereum, Solana, and Cosmos for analysis and verification purposes.

Instructions

Get detailed block information with optional transaction list

Input Schema

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

Implementation Reference

  • Core handler function that executes the get_block_details tool by fetching block data via RPC.
    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] ); }
  • Tool registration including name, description, and input schema for get_block_details.
    { 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'], }, },
  • Helper function that handles the tool execution dispatch and formats the 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'; const result = await advancedBlockchain.getBlockDetails( blockchain, blockNumber, includeTransactions, network ); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
  • src/index.ts:91-91 (registration)
    Final server registration where transaction handlers (including get_block_details) are added to the MCP tools list.
    ...registerTransactionHandlers(server, advancedBlockchain),

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