Skip to main content
Glama

Gas prices across chains

gas_price
Read-only

Fetches current gas prices in gwei across Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain and Avalanche with the latest block number, so you can pick the cheapest chain or time a transaction.

Instructions

Current gas price on Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain and Avalanche, in gwei, with the latest block number. Use it to pick the cheapest chain or time a transaction. Costs $0.001 per call.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "gas_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainsNoChains. Default: all (ethereum, base, arbitrum, optimism, polygon, bsc, avalanche).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

readOnlyHint already declares the safety profile, so the description's job is to add context — and it does: the unit (gwei), the inclusion of the latest block number, and an explicit '$0.001 per call' cost. The main undisclosed behavior is whether the price is a legacy gas price or an EIP-1559 base-fee/priority-fee breakdown, which matters for timing a transaction.

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?

A single front-loaded sentence that packs the resource, chain scope, unit, return payload, usage guidance, and cost with no filler. Nothing is repeated and nothing needs reordering.

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 read-only, zero-required-parameter tool with no output schema, the description covers what is returned (per-chain gwei values plus block number), default scope, and cost — enough to call it correctly. The remaining ambiguity about gas-price metric type is the only meaningful gap.

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% and the sole optional 'chains' parameter already documents its default and allowed values. The description restates the chain list, which corroborates the default but adds no new semantics such as casing requirements or error behavior for an unsupported chain name. Baseline 3 applies.

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 a specific resource (current gas price), enumerates the seven supported chains, gives the unit (gwei), and notes the accompanying block number. This is far more specific than 'returns gas prices' and lets an agent distinguish it from a token-price sibling like crypto_price.

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

Usage Guidelines4/5

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

'Use it to pick the cheapest chain or time a transaction' gives concrete selection contexts, which is more than most definitions offer. It stops short of stating when NOT to use it or naming an explicit alternative for token or fee-value lookups, so it falls short of a 5.

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