Skip to main content
Glama

Gas Fees

gas_fees
Read-only

Live EIP-1559 gas fees (slow/standard/fast tiers) plus USD cost per transaction type (transfer, ERC-20 transfer, swap, NFT mint) for Base, Ethereum, Arbitrum, Optimism and Polygon. Aggregated from public RPC nodes – no API key. Pay per call with USDC or USDT on Base via x402. 3 free calls per wallet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNobase | ethereum | arbitrum | optimism | polygon (default base).base
walletNoYour EVM wallet address (0x...). Unlocks the free tier (3 free calls per wallet).
api_keyNoOptional AMR enterprise API key.
x_paymentNoOptional signed x402 payment payload (base64 JSON) for USDC/USDT on Base.
max_age_secondsNoMax cache age (default 10).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYes
tiersYes
tokenNoToken actually used for payment (USDC, USDT or FREE).USDC
trendYes
routingYesHow the request was routed (provider, fallback, cache, latency).
chain_idYes
cost_usdcYesPrice charged in stablecoin units (USDC/USDT 1:1); 0 on the free tier.
fetched_atNoUTC timestamp when the data was fetched.
block_numberYes
native_tokenYes
base_fee_gweiYes
gas_price_gweiYes
native_price_usdNo
freshness_secondsYesAge of the underlying data in seconds (0 = fetched live).
gas_units_assumedYes
x_payment_responseNoBase64-encoded x402 settlement receipt (mirrors the X-PAYMENT-RESPONSE header). Only present when the call was paid with `x_payment`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "Response for ``POST /gas-fees``.",
      +  "properties": {
      +    "base_fee_gwei": {
      +      "title": "Base Fee Gwei",
      +      "type": "number"
      +    },
      +    "block_number": {
      +      "title": "Block Number",
      +      "type": "integer"
      +    },
      +    "chain": {
      +      "title": "Chain",
      +      "type": "string"
      +    },
      +    "chain_id": {
      +      "title": "Chain Id",
      +      "type": "integer"
      +    },
      +    "cost_usdc": {
      +      "description": "Price charged in stablecoin units (USDC/USDT 1:1); 0 on the free tier.",
      +      "title": "Cost Usdc",
      +      "type": "number"
      +    },
      +    "fetched_at": {
      +      "description": "UTC timestamp when the data was fetched.",
      +      "format": "date-time",
      +      "title": "Fetched At",
      +      "type": "string"
      +    },
      +    "freshness_seconds": {
      +      "description": "Age of the underlying data in seconds (0 = fetched live).",
      +      "title": "Freshness Seconds",
      +      "type": "integer"
      +    },
      +    "gas_price_gwei": {
      +      "title": "Gas Price Gwei",
      +      "type": "number"
      +    },
      +    "gas_units_assumed": {
      +      "additionalProperties": {
      +        "type": "integer"
      +      },
      +      "title": "Gas Units Assumed",
      +      "type": "object"
      +    },
      +    "native_price_usd": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "title": "Native Price Usd"
      +    },
      +    "native_token": {
      +      "title": "Native Token",
      +      "type": "string"
      +    },
      +    "routing": {
      +      "description": "How the request was routed (provider, fallback, cache, latency).",
      +      "properties": {
      +        "cache_hit": {
      +          "default": false,
      +          "description": "True if the result was served from cache.",
      +          "title": "Cache Hit",
      +          "type": "boolean"
      +        },
      +        "fallback_used": {
      +          "default": false,
      +          "description": "True if the primary provider failed and a fallback served the result.",
      +          "title": "Fallback Used",
      +          "type": "boolean"
      +        },
      +        "latency_ms": {
      +          "default": 0,
      +          "description": "End-to-end routing latency in milliseconds.",
      +          "title": "Latency Ms",
      +          "type": "integer"
      +        },
      +        "provider": {
      +          "description": "Name of the upstream provider that served the result.",
      +          "title": "Provider",
      +          "type": "string"
      +        },
      +        "providers_tried": {
      +          "description": "Providers attempted, in order.",
      +          "items": {
      +            "type": "string"
      +          },
      +          "title": "Providers Tried",
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "provider"
      +      ],
      +      "title": "RoutingMeta",
      +      "type": "object"
      +    },
      +    "tiers": {
      +      "additionalProperties": true,
      +      "title": "Tiers",
      +      "type": "object"
      +    },
      +    "token": {
      +      "default": "USDC",
      +      "description": "Token actually used for payment (USDC, USDT or FREE).",
      +      "title": "Token",
      +      "type": "string"
      +    },
      +    "trend": {
      +      "title": "Trend",
      +      "type": "string"
      +    },
      +    "x_payment_response": {
      +      "description": "Base64-encoded x402 settlement receipt (mirrors the X-PAYMENT-RESPONSE header). Only present when the call was paid with `x_payment`.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "chain",
      +    "chain_id",
      +    "native_token",
      +    "block_number",
      +    "base_fee_gwei",
      +    "gas_price_gwei",
      +    "trend",
      +    "tiers",
      +    "gas_units_assumed",
      +    "freshness_seconds",
      +    "cost_usdc",
      +    "routing"
      +  ],
      +  "type": "object"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / chain / default
      Added value: +"base"
    • addedInput schema / properties / max_age_seconds / default
      Added value: +10
    • changedInput schema / properties / wallet / description
      Previous value: -"Your EVM wallet address (0x...). Unlocks the free tier (3 calls per wallet)."New value: +"Your EVM wallet address (0x...). Unlocks the free tier (3 free calls per wallet)."
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already mark the tool as read-only and open-world. The description adds meaningful operational context beyond those annotations: data source is public RPC nodes, no API key is required, calls are paid via x402 with USDC/USDT, and each wallet gets 3 free calls. It does not address cache/max-age behavior, but the schema covers the parameter.

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?

The description is two dense sentences that front-load the core output, then add operational and billing essentials. There is no fluff or repetition, and every clause earns its place.

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

Completeness5/5

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

An output schema exists, so return-value details are covered separately. The description supplies the chains, fee tiers, transaction types, payment mechanism, and free-tier threshold, leaving no critical invocation context missing.

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%, so the schema already documents all five parameters. The description adds chain and billing context but does not significantly deepen parameter semantics beyond what the schema provides. Baseline 3 is appropriate.

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

Purpose4/5

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

The description clearly identifies the resource and outputs: live EIP-1559 gas fees across tiers and USD costs per transaction type for five chains. The domain is specific enough to distinguish it from sibling market/price tools, though it lacks an explicit verb like 'returns' or 'fetches'.

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?

The use case is inferable from the gas-fee focus and listed transaction types, but the description gives no explicit when-to-use guidance, exclusions, or alternatives. An agent must infer that this is the tool for current gas fee estimates rather than, say, historical price data.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.