Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

latest_block

Retrieve the most recent block data from Arbitrum Nitro nodes using a specified RPC URL. Monitor chain activity and health efficiently with this essential tool for developers and node operators.

Instructions

Get the latest block information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rpcUrlNoThe RPC URL of the chain (optional if default is set)

Implementation Reference

  • src/index.ts:928-941 (registration)
    Tool registration and input schema definition for 'latest_block' in the listTools response
    { name: "latest_block", description: "Get the latest block information", inputSchema: { type: "object" as const, properties: { rpcUrl: { type: "string", description: "The RPC URL of the chain (optional if default is set)", }, }, required: [], },
  • Main MCP handler for 'latest_block' tool: resolves RPC, instantiates client, calls getLatestBlock, returns JSON response
    case "latest_block": { const rpcUrl = await this.resolveRpcUrl( (args.rpcUrl as string) || (args.chainName as string) ); const chainDataClient = new ArbitrumChainClient(rpcUrl); const latestBlock = await chainDataClient.getLatestBlock(); return { content: [ { type: "text", text: JSON.stringify(latestBlock, null, 2), }, ], };
  • Core implementation of latest block retrieval via eth_getBlockByNumber RPC call at 'latest' block with transaction details disabled
    async getLatestBlock(): Promise<any> { return await this.makeRpcCall("eth_getBlockByNumber", ["latest", false]); }

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/dewanshparashar/arbitrum-mcp'

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