Skip to main content
Glama

get_gas_prices

Retrieve current gas prices for Ethereum, Base, Polygon, and Arbitrum. Returns slow, standard, and fast tiers in gwei with estimated USD cost.

Instructions

Get current gas prices across multiple chains: Ethereum, Base, Polygon, and Arbitrum. Returns slow/standard/fast tiers in gwei and estimated USD cost. Costs 0.001 USDC per call (x402 micropayment on Base).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:259-270 (registration)
    Tool registration in the TOOLS array: defines the tool name 'get_gas_prices', its description, and input schema (no parameters required).
    {
      name: 'get_gas_prices',
      description:
        'Get current gas prices across multiple chains: Ethereum, Base, Polygon, and Arbitrum. ' +
        'Returns slow/standard/fast tiers in gwei and estimated USD cost. ' +
        'Costs 0.001 USDC per call (x402 micropayment on Base).',
      inputSchema: {
        type: 'object',
        properties: {},
        required: [],
      },
    },
  • Input schema for get_gas_prices: an empty object with no required parameters.
    inputSchema: {
      type: 'object',
      properties: {},
      required: [],
    },
  • Handler for get_gas_prices: calls the API endpoint '/api/gas-tracker' with no parameters via the callApi helper, then formats the result.
    case 'get_gas_prices':
      result = await callApi('/api/gas-tracker');
      break;
Behavior3/5

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

Discloses a notable behavioral trait: costs 0.001 USDC per call via x402 micropayment on Base. However, without annotations, it does not cover other aspects like rate limits or error handling.

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?

Two concise sentences with no wasted words. Front-loaded with main action and key details.

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?

For a parameterless tool with no output schema and no annotations, the description provides essential information (chains, tiers, cost). Could be more detailed on output structure, but sufficient for basic usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters in schema, so description does not need to add parameter info. Baseline 4 is appropriate.

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?

Clearly states it gets current gas prices across multiple specific chains (Ethereum, Base, Polygon, Arbitrum) and specifies output tiers (slow/standard/fast) and units (gwei, USD cost). Distinct from sibling tools.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives, nor when not to use it. Lacks any usage context.

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/fernsugi/x402-api-mcp-server'

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