Skip to main content
Glama

evm_get_gas_analytics

Analyze an account's gas usage and costs on a selected EVM chain over a chosen period, including trends, efficiency metrics, and cost optimization suggestions.

Instructions

Analyze gas usage: historical costs, trends, efficiency metrics.

CRITICAL RULES:

  • Read-only operation

  • Default: 30 day analysis

  • Includes cost optimization suggestions

  • Varies significantly by chain

PARAMETERS:

  • chain: EVM chain (required)

  • address: Account to analyze (required)

  • days: Analysis period (optional, default: 30)

EXAMPLES: ✅ Gas spending analysis: {chain: "ethereum", address: "0x742d35Cc..."} ✅ Weekly review: {chain: "polygon", address: "0x742d35Cc...", days: 7}

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: • totalGasUsed: Total gas consumed • totalCost: Native token spent • averageGasPrice: Mean price paid • efficiency: Optimization score

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>",
      "address": "<address>"
    },
    "name": "evm_get_gas_analytics"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoNumber of days to analyze (default: 30)
chainYesEVM chain to query
addressYesEthereum address (0x...)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior4/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 key behavior: read-only operation, a 30-day default window, inclusion of cost optimization suggestions, and that results vary significantly by chain. It also enumerates the return fields. Gaps remain around failure modes (invalid address, empty history) and rate limits.

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 content is front-loaded but the description is heavily padded with chain-by-chain gas commentary, testnet/faucet boilerplate, and a completely unrelated 'Running on Linux / LINUX-SPECIFIC NOTES' block about apt/yum/pacman and xdg-open. That last section is irrelevant to a gas analytics tool and dilutes the actionable guidance.

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

Completeness3/5

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

For a three-parameter read tool with no output schema, the description does cover output fields, defaults, and chain semantics, which is reasonably complete. But the appended Linux environment notes are noise that could mislead an agent, and nothing addresses error or empty-result behavior.

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 all three parameters are already documented, and the description largely restates them plus the default. The one genuine addition is the per-chain characterization (EIP-1559 status, block times, relative cost), which gives the agent context for choosing among the enum values beyond the bare list.

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 opening line states a specific verb and resource — 'Analyze gas usage: historical costs, trends, efficiency metrics' — which separates it from point-in-time siblings like evm_get_gas_price or evm_get_gas_oracle. It never names a sibling explicitly, so the differentiation is implied by 'historical/trends' rather than stated.

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 two worked examples ('Gas spending analysis', 'Weekly review' with days: 7) give concrete usage scenarios, and the default of 30 days is stated. However, there is no guidance on when to prefer this over evm_get_gas_price, evm_get_gas_oracle, or evm_get_fee_history, and no stated prerequisites such as whether the address must have prior transactions.

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