Skip to main content
Glama

EVM gas fees and USD transaction costs (6 chains)

chain_gas
Read-only

Live gas fees and estimated USD transaction costs on Base, Ethereum, Arbitrum, OP Mainnet, Polygon and Avalanche: base fee and next-block estimate, priority fee p25/p50/p75 over 10 blocks, gas price, 10-block base-fee trend, suggested max fee, and USD cost of a native transfer, ERC-20 transfer and swap (upper-bound rollup L1 fees included), plus the cheapest chain per action. Sources: JSON-RPC via PublicNode (public RPC fallback); prices from on-chain Uniswap v3 pools. Price: $0.002 per successful call, paid in USDC with x402 v2; failed calls and calls that match nothing 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": "chain_gas"
  }
}

Input Schema

NameRequiredDescriptionDefault
speedNoPriority-fee level used for suggested fees and costs: slow (p25), standard (p50) or fast (p75). Default standard.
chainsNoComma-separated chains by name or chain id: base (8453), ethereum (1), arbitrum (42161), optimism (10), polygon (137), avalanche (43114). Default: all six.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description goes well beyond them by disclosing the cost model ($0.002 per successful call, USDC via x402 v2), that failed or unmatched calls are free, the data sources (PublicNode JSON-RPC with fallback, Uniswap v3 pools for prices), and that rollup L1 fees are upper-bound. That is exactly the pricing and reliability context an agent needs before spending money on a call.

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

Conciseness4/5

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

Purpose and chain scope are front-loaded and the pricing/source details are appended where they belong. The middle sentence is a long run-on inventory of return fields, which is dense but each item carries information an agent would otherwise have to discover by calling.

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?

With no output schema, the description carries the full burden of describing return values and does so field by field, plus sources, fallback behavior, pricing, and failure-charging rules. For a zero-required-parameter read tool of this complexity, nothing material is left unspecified.

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 coverage is 100%, so both parameters are already documented, including the slow/standard/fast to p25/p50/p75 mapping and the chain-name-to-id list. The description adds only marginal framing (costs are 'upper-bound', six-chain default) beyond what the schema states, so the 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 verb and resource ('Live gas fees and estimated USD transaction costs') and enumerates both the chains covered and the exact return fields (base fee, priority fee p25/p50/p75, suggested max fee, USD cost of transfer/ERC-20/swap). That level of specificity clearly separates it from siblings like token_price or chain_calldata_decode.

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 scope implies usage (gas estimation and cross-chain cost comparison) and the 'cheapest chain per action' output hints at comparison use cases, but there is no explicit when-to-use statement, no exclusions, and no routing to alternatives such as token_price. An agent can infer the fit, but must do the inference itself.

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