Skip to main content
Glama

evm_get_base_fee

Retrieve current EIP-1559 base fee and historical trend for a chosen EVM chain to estimate transaction costs and time gas usage.

Instructions

Get EIP-1559 base fee trends with historical analysis.

CRITICAL RULES:

  • Read-only operation

  • Base fee adjusts each block automatically

  • Cannot be controlled by users

  • Required for all EIP-1559 transactions

  • Rises with congestion, falls when empty

PARAMETERS:

  • chain: EVM chain (required)

  • blockCount: Blocks for trend (optional, default: 6)

EXAMPLES: ✅ Check current base fee: {chain: "ethereum"} ✅ Analyze 20 block trend: {chain: "polygon", blockCount: 20}

SUPPORTED EVM CHAINS (7 networks): • ethereum (Sepolia) - EIP-1559 enabled, ~12s blocks, moderate gas costs • polygon (Amoy) - Low fees, fast finality (~2s), layer 2 • avalanche (Fuji C-Chain) - Sub-second finality, dynamic fees • bsc (BNB Testnet) - 3s blocks, low gas costs, Binance ecosystem • arbitrum (Sepolia) - Optimistic rollup, low fees, Ethereum security • base (Sepolia) - Coinbase layer 2, EIP-1559, low fees • worldchain (World Sepolia) - World Network testnet, EIP-1559

CRITICAL GAS CONSIDERATIONS:

  • Ethereum: High gas costs, use gas oracle for timing

  • Polygon/BSC: Very low gas, safe for frequent transactions

  • Arbitrum/Base: L2 optimizations, ~10-50x cheaper than Ethereum

  • Avalanche: Dynamic fees, can spike during congestion

  • Always check gas price before executing transactions

TESTNET TOKENS: All chains use testnet tokens with NO REAL VALUE. Faucets available for all supported networks.

OUTPUT STRUCTURE: • currentBaseFee: Latest base fee (wei) • trend: Rising/falling/stable • average: Historical average • percentChange: Recent change percentage

Running on Linux.

LINUX-SPECIFIC NOTES:

  • Package manager: apt (Ubuntu/Debian), yum (RHEL/CentOS), or pacman (Arch)

  • Python 3 is typically 'python3' command

  • GNU tools are standard

  • Use 'xdg-open' command to open files/applications

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chain": "<chain>"
    },
    "name": "evm_get_base_fee"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesEVM chain to query
blockCountNoNumber of recent blocks for trend analysis (default: 6)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden and does disclose read-only status plus useful domain behavior: base fee adjusts per block, is not user-controllable, rises with congestion, and falls when empty. It also lists the return fields. It stops short of error conditions, staleness of historical data, or limits on blockCount, leaving meaningful gaps for an unannotated tool.

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

Conciseness2/5

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

The core purpose and examples are front-loaded and clear, but the body is heavily padded with material unrelated to invoking the tool: testnet faucet notes, a full chain marketing list, gas-strategy advice, and an entire Linux/apt/python3/xdg-open section. That noise competes with the operative rules and lengthens the definition well beyond what earns its place.

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 two-parameter read tool with no output schema, the definition supplies the return field list (currentBaseFee, trend, average, percentChange), valid chains, and behavioral notes, so an agent can call it correctly. The missing piece is routing versus sibling fee/gas tools, and the off-topic platform notes dilute rather than complete the picture.

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%, so baseline is 3, but the description goes beyond the schema by enumerating all seven valid chain values with per-network characteristics (block time, fee level, L2 status) and by showing blockCount in a concrete example. That adds real meaning about what the enum members imply, though it does not explain blockCount bounds or defaults beyond what the schema states.

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?

States a specific verb and resource: 'Get EIP-1559 base fee trends with historical analysis.' An agent knows what it retrieves, but the definition never distinguishes it from close siblings like evm_get_fee_history, evm_get_gas_price, or evm_get_gas_oracle, so differentiation is left to guesswork.

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?

Two worked examples ('check current base fee' with chain only, 'analyze 20 block trend' with blockCount) imply when the tool is appropriate, particularly that blockCount drives trend depth. However, there is no explicit guidance on when to prefer this over fee-history or gas-oracle siblings, and no stated exclusions.

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

Deploy Server

Other Tools