Skip to main content
Glama

chain_estimate_gas

Read-only

Gas estimate for a transaction — eth_estimateGas for a transaction (to=, optional from=, data=, value= in wei) plus current gas price and estimated fee; a tx that would revert returns 422 (not charged). Chains: base (default), ethereum, arbitrum, optimism, polygon via chain=. Price: $0.002 USDC (Base, via x402).

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>",
      "to": "<to>"
    },
    "name": "chain_estimate_gas"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYes0x000000000000000000000000000000000000dEaD
chainYesbase

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, destructiveHint=false and openWorldHint, so the safety profile is covered; the description goes further by disclosing the 422 revert behavior, that reverted calls are not charged, and the exact price ($0.002 USDC via x402). That is real context beyond the annotations, though the x402 payment flow itself is not explained.

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?

Dense and front-loaded: the core action comes first, then parameters, failure mode, chain list, and price. The em-dash run-on packs several ideas into one sentence, but nothing is redundant.

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, it covers the essentials an agent needs: chain options with a default, the revert contract (422, uncharged), and the price. It partially describes the return (gas price plus estimated fee), but the phantom from/data/value parameters leave the actual input contract slightly ambiguous.

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%, but the schema descriptions are bare examples ('0x0000...dEaD', 'base') rather than meaning. The description does add chain options and the default, but it also advertises 'optional from=, data=, value= in wei' parameters that do not exist in the schema, which muddies rather than clarifies the parameter surface.

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 ('Gas estimate for a transaction') and pins it to the underlying RPC call ('eth_estimateGas'), which cleanly separates it from the sibling chain_* read tools such as chain_call or chain_receipt. An agent knows exactly what the tool computes without opening the 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?

Gives clear context for when to call it (estimating gas/fee for a pending transaction) and enumerates the supported chains with the default. It does not name alternatives or state when not to use it, so it stops 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources