Skip to main content
Glama
covalenthq

GoldRush MCP Server

by covalenthq

block_heights

Retrieve block heights and timestamps for historical blockchain analysis by specifying a date range and blockchain network.

Instructions

Commonly used to get all the block heights within a particular date range. Requires chainName (blockchain network), startDate (YYYY-MM-DD format), and endDate (YYYY-MM-DD or 'latest'). Optional pagination parameters include pageSize (default 10) and pageNumber (default 0). Returns block heights, timestamps, and related data for blocks within the specified date range, useful for historical analysis and time-based blockchain queries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNameYesThe blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet').
startDateYesStart date for the query in YYYY-MM-DD format (e.g., '2023-01-01').
endDateYesEnd date for the query in YYYY-MM-DD format or 'latest' for current date.
pageSizeNoNumber of block heights to return per page. Default is 10, maximum is 100.
pageNumberNoPage number for pagination, starting from 0. Default is 0.

Implementation Reference

  • The "block_heights" tool definition and handler implementation in BaseService.ts. It registers the tool with the MCP server, defines the input schema using Zod, and executes the logic by calling 'goldRushClient.BaseService.getBlockHeightsByPage'.
    server.tool(
        "block_heights",
        "Commonly used to get all the block heights within a particular date range. " +
            "Requires chainName (blockchain network), startDate (YYYY-MM-DD format), and endDate (YYYY-MM-DD or 'latest'). " +
            "Optional pagination parameters include pageSize (default 10) and pageNumber (default 0). " +
            "Returns block heights, timestamps, and related data for blocks within the specified date range, " +
            "useful for historical analysis and time-based blockchain queries.",
        {
            chainName: z
                .enum(Object.values(ChainName) as [string, ...string[]])
                .describe(
                    "The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet')."
                ),
            startDate: z
                .string()
                .describe(
                    "Start date for the query in YYYY-MM-DD format (e.g., '2023-01-01')."
                ),
            endDate: z
                .union([z.string(), z.literal("latest")])
                .describe(
                    "End date for the query in YYYY-MM-DD format or 'latest' for current date."
                ),
            pageSize: z
                .number()
                .optional()
                .default(10)
                .describe(
                    "Number of block heights to return per page. Default is 10, maximum is 100."
                ),
            pageNumber: z
                .number()
                .optional()
                .default(0)
                .describe(
                    "Page number for pagination, starting from 0. Default is 0."
                ),
        },
        async (params) => {
            try {
                const response =
                    await goldRushClient.BaseService.getBlockHeightsByPage(
                        params.chainName as Chain,
                        params.startDate,
                        params.endDate,
                        {
                            pageSize: params.pageSize,
                            pageNumber: params.pageNumber,
                        }
                    );
                return {
                    content: [
                        {
                            type: "text",
                            text: stringifyWithBigInt(response.data),
                        },
                    ],
                };
            } catch (err) {
                return {
                    content: [{ type: "text", text: `Error: ${err}` }],
                    isError: true,
                };
            }
        }
    );
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It discloses pagination behavior (mentioning pageSize/pageNumber) and return data structure ('block heights, timestamps, and related data'). However, misses rate limits, maximum date ranges, data freshness, or error behavior for invalid chains/dates.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Appropriately structured with purpose first, followed by required/optional parameters and return value. Four sentences efficiently cover the tool's function. Minor redundancy with schema descriptions is acceptable given lack of output schema and annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 100% schema coverage and no output schema, the description adequately compensates by describing return values ('block heights, timestamps, and related data') and pagination. Sufficient for a 5-parameter read-only query tool, though could mention maximum result limits.

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?

Schema description coverage is 100%, establishing baseline 3. The description paraphrases parameter requirements and formats but adds no semantic meaning beyond the schema (e.g., no guidance on reasonable pageSize values or date range constraints).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States specific verb ('get') and resource ('block heights') with clear scope ('within a particular date range'). The date-range focus distinguishes it from sibling tools like 'block' or 'transactions_for_block' which likely query by specific identifiers rather than temporal ranges.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides implied usage context ('Commonly used to', 'useful for historical analysis and time-based blockchain queries') but lacks explicit when-to-use guidance or named alternatives. Does not clarify when to use this versus the 'block' tool for single-block lookups.

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

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