Skip to main content
Glama
buildwithgrove

Grove's MCP Server for Pocket Network

search_logs

Search blockchain event logs by address and topics across multiple networks to analyze smart contract interactions and transaction patterns.

Instructions

Search event logs by address and topics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockchainYesBlockchain name
filterYesLog filter with fromBlock, toBlock, address, topics
networkNoNetwork type (defaults to mainnet)

Implementation Reference

  • Core handler implementation for search_logs: calls eth_getLogs RPC on the blockchain service with the provided filter.
    async searchLogs( blockchain: string, filter: { fromBlock?: string; toBlock?: string; address?: string | string[]; topics?: (string | string[] | null)[]; }, 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})`, }; } return this.blockchainService.callRPCMethod( service.id, 'eth_getLogs', [filter] ); }
  • MCP tool handler case for 'search_logs' in handleTransactionTool: extracts parameters and delegates to AdvancedBlockchainService.searchLogs.
    case 'search_logs': { const blockchain = args?.blockchain as string; const filter = args?.filter as any; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await advancedBlockchain.searchLogs(blockchain, filter, network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
  • Input schema definition for the search_logs tool, specifying parameters blockchain, filter, and network.
    { name: 'search_logs', description: 'Search event logs by address and topics', inputSchema: { type: 'object', properties: { blockchain: { type: 'string', description: 'Blockchain name', }, filter: { type: 'object', description: 'Log filter with fromBlock, toBlock, address, topics', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['blockchain', 'filter'], }, },
  • The tools array in registerTransactionHandlers includes search_logs for registration with the MCP server.
    return 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