Skip to main content
Glama

Gas prices on Base, Ethereum, Arbitrum, Optimism, Polygon

gas
Read-only

Gas prices on Base (default), Ethereum, Arbitrum, Optimism, Polygon or Solana, or chain=all for every chain at once: the base fee and slow, normal and fast priority fees, the latest block, and what a plain transfer and an ERC-20 transfer cost in native token and USD. EVM figures come from eth_feeHistory over the last 20 blocks; Solana from recent prioritization fees. Cached 15 seconds. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.

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"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNobase (default), ethereum, arbitrum, optimism, polygon, solana or all

Output Schema

NameRequiredDescriptionDefault
blockNo
chainNo
sourceNo
transferNo
checkedAtNo
costBasisNo
disclaimerNo
baseFeeGweiNo
nativeSymbolNo
erc20TransferNo
nativePriceUsdNo
priorityFeeGweiNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "baseFeeGwei": {},
      +    "block": {},
      +    "chain": {},
      +    "checkedAt": {},
      +    "costBasis": {},
      +    "disclaimer": {},
      +    "erc20Transfer": {},
      +    "nativePriceUsd": {},
      +    "nativeSymbol": {},
      +    "priorityFeeGwei": {},
      +    "source": {},
      +    "transfer": {}
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld annotations: discloses data provenance (eth_feeHistory over 20 blocks, Solana recent prioritization fees), a 15-second cache, the $0.002 per-call price, the x402/USDC payment mechanism, and that failed calls are free. That is exactly the kind of cost and freshness context an agent needs before calling.

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?

Front-loaded with the resource and scope, then provenance, then cost. Dense but every clause carries information; nothing is redundant with the title or schema.

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?

One optional parameter, an output schema present, and the description still covers scope, defaults, data source, freshness, and billing. Nothing needed to invoke it correctly is missing.

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?

Schema coverage is 100% and the single parameter is already described, so the baseline is 3. The description adds value by confirming 'base' is the default and that 'all' is a special aggregate value with its own behavior, which the enum-less schema does not convey.

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 the exact resource (gas prices per chain), enumerates the chains, and names the payload fields (base fee, slow/normal/fast priority fees, latest block, transfer costs). An agent knows precisely what it gets back without opening the output schema.

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?

Explicitly says Base is the default and that chain=all returns every chain at once, which is real usage guidance. It does not state when to prefer another tool (e.g. a BTC fee tool) or when this tool is inappropriate, so it stops short of full when/when-not guidance.

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.

Resources