Skip to main content
Glama
covalenthq

GoldRush MCP Server

by covalenthq

gas_prices

Get real-time gas price estimates for blockchain transactions to optimize costs and confirmation times. Specify network and transaction type (ERC20, native tokens, or Uniswap V3).

Instructions

Get real-time gas estimates for different transaction speeds on a specific network, enabling users to optimize transaction costs and confirmation times. Requires chainName (blockchain network) and eventType (erc20, nativetokens, or uniswapv3). Optional parameter quoteCurrency allows conversion to different currencies (USD, EUR, etc). Returns estimated gas prices for low, medium, and high priority transactions for the specified event type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNameYesThe blockchain network to get gas prices for (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet').
eventTypeYesType of transaction to estimate gas for: 'erc20' for token transfers, 'nativetokens' for native transfers, 'uniswapv3' for DEX swaps.
quoteCurrencyNoCurrency to quote gas costs in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency.

Implementation Reference

  • The handler function for the "gas_prices" tool, which executes the gas price estimate request using the goldRushClient.
    async (params) => {
        try {
            const response = await goldRushClient.BaseService.getGasPrices(
                params.chainName as Chain,
                params.eventType,
                {
                    quoteCurrency: params.quoteCurrency as Quote,
                }
            );
            return {
                content: [
                    {
                        type: "text",
                        text: stringifyWithBigInt(response.data),
                    },
                ],
            };
        } catch (err) {
            return {
                content: [{ type: "text", text: `Error: ${err}` }],
                isError: true,
            };
        }
    }
  • The Zod schema defining the input parameters for the "gas_prices" tool.
    {
        chainName: z
            .enum(Object.values(ChainName) as [string, ...string[]])
            .describe(
                "The blockchain network to get gas prices for (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet')."
            ),
        eventType: z
            .enum(["erc20", "nativetokens", "uniswapv3"])
            .describe(
                "Type of transaction to estimate gas for: 'erc20' for token transfers, 'nativetokens' for native transfers, 'uniswapv3' for DEX swaps."
            ),
        quoteCurrency: z
            .enum(Object.values(validQuoteValues) as [string, ...string[]])
            .optional()
            .describe(
                "Currency to quote gas costs in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency."
            ),
    },
  • Registration of the "gas_prices" tool using server.tool within addBaseServiceTools.
    server.tool(
        "gas_prices",
        "Get real-time gas estimates for different transaction speeds on a specific network, enabling users to optimize transaction costs and confirmation times. " +
            "Requires chainName (blockchain network) and eventType (erc20, nativetokens, or uniswapv3). " +
            "Optional parameter quoteCurrency allows conversion to different currencies (USD, EUR, etc). " +
            "Returns estimated gas prices for low, medium, and high priority transactions for the specified event type.",
        {
            chainName: z
                .enum(Object.values(ChainName) as [string, ...string[]])
                .describe(
                    "The blockchain network to get gas prices for (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet')."
                ),
            eventType: z
                .enum(["erc20", "nativetokens", "uniswapv3"])
                .describe(
                    "Type of transaction to estimate gas for: 'erc20' for token transfers, 'nativetokens' for native transfers, 'uniswapv3' for DEX swaps."
                ),
            quoteCurrency: z
                .enum(Object.values(validQuoteValues) as [string, ...string[]])
                .optional()
                .describe(
                    "Currency to quote gas costs in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency."
                ),
        },
        async (params) => {
            try {
                const response = await goldRushClient.BaseService.getGasPrices(
                    params.chainName as Chain,
                    params.eventType,
                    {
                        quoteCurrency: params.quoteCurrency as Quote,
                    }
                );
                return {
                    content: [
                        {
                            type: "text",
                            text: stringifyWithBigInt(response.data),
                        },
                    ],
                };
            } catch (err) {
                return {
                    content: [{ type: "text", text: `Error: ${err}` }],
                    isError: true,
                };
            }
        }
    );
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses 'real-time' nature and return structure (low/medium/high priority estimates) which compensates for missing output schema. Could improve by mentioning data freshness guarantees or rate limits.

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

Conciseness5/5

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

Three well-structured sentences: purpose/value, required/optional inputs, and return format. Every sentence earns its place with zero redundancy. Efficient front-loading of critical information.

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?

Comprehensive for a 3-parameter tool. Excellently compensates for missing output schema by detailing return values (low/medium/high priority). Describes all inputs sufficiently. Minor gap: no error handling or data volatility warnings.

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 has 100% description coverage with detailed enums. Description restates required vs optional status and lists enum values, but adds minimal semantic value beyond what schema already provides. Baseline 3 appropriate when schema does heavy lifting.

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?

Description uses specific verb 'Get' with resource 'gas estimates' and scope 'transaction speeds on a specific network'. Clearly distinguishes from sibling tools like 'transactions_for_address' or 'block' by focusing specifically on gas optimization.

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?

Implies usage context ('optimizing transaction costs') but lacks explicit when-to-use guidance versus alternatives. Does not specify prerequisites or when NOT to use this vs other transaction-related tools in the sibling list.

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