Skip to main content
Glama

chain_estimate_gas

Read-only

$0.005 via x402: estimate the gas a transaction will use (eth_estimateGas) across 6 chains — the pre-send read tx-building, trading and settlement agents make to size gas and avoid out-of-gas reverts. Pass to (+ optional from/value/data).

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

Input Schema

NameRequiredDescriptionDefault
toYesRecipient/contract address 0x...
dataNoCalldata 0x...
fromNosender address (0x...) for the gas estimate
chainNobase|ethereum|optimism|arbitrum|polygon|gnosis (default base)
valueNoWei (hex or decimal)
x_paymentNosigned x402 payment payload (the X-PAYMENT header value) for the terms the first call returns; omit it to get the price and terms

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / from / description
      Added value: +"sender address (0x...) for the gas estimate"
    • addedInput schema / properties / x_payment / description
      Added value: +"signed x402 payment payload (the X-PAYMENT header value) for the terms the first call returns; omit it to get the price and terms"
  2. Added
  3. Removed
  4. Added
  5. Removed
  6. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered; the description adds genuinely new context by disclosing the x402 pricing model ($0.005) and that it spans 6 chains. The two-step payment handshake is only fully explained in the x_payment schema field, and response shape or rate limits are not covered, so it is strong but not exhaustive.

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

Conciseness3/5

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

It is a single dense sentence with no redundancy, but it front-loads the price tag and a role-based framing ('the pre-send read tx-building, trading and settlement agents make') before the core purpose, which is orienting towards marketing rather than task clarity. The trailing parameter recap partially duplicates the schema.

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?

With 6 parameters at full schema coverage and annotations covering safety, the description supplies the remaining essentials: what it computes, chain coverage, and the payment model. The only gap is that no output schema exists and the description never states what the returned estimate looks like (hex quantity vs decimal), which an agent must infer.

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 description coverage is 100%, so the schema already documents all six parameters including chain enum values and x_payment. The description only restates 'Pass to (+ optional from/value/data)' and omits the chain and x_payment parameters entirely, adding no meaning beyond the schema. Baseline 3 is appropriate.

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?

The description names a specific verb and resource ('estimate the gas a transaction will use') and grounds it in the concrete RPC method (eth_estimateGas) across 6 chains. That maps cleanly against siblings like chain_gas_price, since a per-transaction gas estimate is semantically distinct from a network gas price read.

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?

It states the usage context clearly: 'the pre-send read ... to size gas and avoid out-of-gas reverts,' which tells an agent this is a pre-flight check before sending. It does not name an explicit alternative or a when-not condition (e.g. when to use chain_gas_price or chain_fee_history instead), so it stops short of full routing 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.