Skip to main content
Glama
covalenthq

GoldRush MCP Server

by covalenthq

block

Retrieve detailed blockchain block data including timestamp, transaction count, miner information, and size by specifying chain network and block number.

Instructions

Commonly used to fetch and render a single block for a block explorer.Requires chainName (blockchain network) and blockHeight (block number). Returns comprehensive block data including timestamp, transaction count, size, miner information, and other blockchain-specific details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNameYesThe blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet').
blockHeightYesThe block number to retrieve. Can be a specific block number or 'latest' for the most recent block.

Implementation Reference

  • The handler function for the 'block' tool, which calls goldRushClient.BaseService.getBlock.
    async (params) => {
        try {
            const response = await goldRushClient.BaseService.getBlock(
                params.chainName as Chain,
                params.blockHeight
            );
            return {
                content: [
                    {
                        type: "text",
                        text: stringifyWithBigInt(response.data),
                    },
                ],
            };
        } catch (err) {
            return {
                content: [{ type: "text", text: `Error: ${err}` }],
                isError: true,
            };
  • Registration of the 'block' tool with its schema definition using Zod.
    server.tool(
        "block",
        "Commonly used to fetch and render a single block for a block explorer." +
            "Requires chainName (blockchain network) and blockHeight (block number). " +
            "Returns comprehensive block data including timestamp, transaction count, size, " +
            "miner information, and other blockchain-specific details.",
        {
            chainName: z
                .enum(Object.values(ChainName) as [string, ...string[]])
                .describe(
                    "The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet')."
                ),
            blockHeight: z
                .string()
                .describe(
                    "The block number to retrieve. Can be a specific block number or 'latest' for the most recent block."
                ),
        },

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/covalenthq/goldrush-mcp-server'

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