Skip to main content
Glama

chain_estimate_gas

Estimate gas for a transaction before signing (eth_estimateGas) plus current fee → cost in native coin; returns the revert reason if it would fail. Example: {from:"0xd8dA…6045", to:"0x8335…2913", data:"0xa9059cbb…", chain:"base"}. $0.002 USDC.

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
toYes
dataNo
fromNo
chainNo
valueNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does a lot: it discloses the underlying RPC method, that it simulates rather than executes, that failures surface the revert reason, and that cost comes back in native coin. It also states the price ($0.002 USDC). It omits details like whether an unsigned tx is required or how chains/rate limits are handled.

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

Conciseness5/5

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

Front-loaded with the verb and the value proposition, followed by a compact example and the price. No filler sentences; every clause (method, cost conversion, revert reason, example, price) carries information an agent needs.

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 five-param tool with no output schema and no annotations, the description covers the important ground: what is simulated, what comes back (cost, revert reason), and a concrete call shape. The remaining gaps (value semantics, chain default, exact return structure) are modest but real given the zero annotation and zero schema-description coverage.

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 0%, so the description must compensate. The embedded example conveys real semantics for four of five params (from and to as 0x addresses, data as hex calldata, chain as a slug like "base"), which is genuinely useful. However, "value" is never mentioned or exemplified, and nothing explains the default chain when omitted or which fields are required.

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 the specific operation (eth_estimateGas), the resource (gas for a transaction), the extra value added (current fee → total cost in native coin), and the failure behavior (returns revert reason). This clearly separates it from siblings like gas_fees or chain_call.

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?

"Before signing" gives a clear condition for when to reach for this tool, which helps route the agent. It does not name alternatives explicitly (e.g., use gas_fees for price-only queries, chain_call for read-only eth_call), so the when-not guidance is left implicit.

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