Skip to main content
Glama

Estimate gas

evm_estimate_gas

Estimates the gas a transaction would need and prices it at the current gas price, before you sign anything. Also the cheapest way to find out that a call would revert. Flat $0.001 per call, paid over x402 (USDC).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesDestination address.
dataNoOptional 0x calldata.
fromNoSender address.
chainNobase | ethereum | polygon | arbitrum | optimism.
valueNoOptional value in wei, as a decimal string.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description must carry all transparency. It mentions the fee (flat $0.001 per call, paid via x402 USDC) and that it detects reverts. However, it does not explicitly state that the operation is read-only or describe any other side effects beyond costing money.

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?

The description is brief and to the point, covering the core function, a key use case, and the cost in two sentences. No unnecessary fluff or repetition.

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?

Given there is no output schema, the description provides enough context for an agent to decide when to call this tool: it estimates gas, prices it, and can detect reverts. It also includes pricing details. The lack of output format information is acceptable since there is no output schema and the tool's purpose is straightforward.

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?

The schema descriptions for all parameters are clear and sufficient: 'to' is a destination address, 'data' is optional calldata, 'from' is a sender address, 'chain' lists valid values, and 'value' is in wei as a decimal string. The tool description does not add extra context, but the schema covers it well.

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 description clearly states that it estimates gas and prices it at the current gas price, and also mentions it is the cheapest way to detect reverts. It does not explicitly differentiate from sibling tools like evm_call or evm_gas, but the 'before you sign anything' and 'cheapest way to find out that a call would revert' phrasing provides useful distinguishing context.

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 description implies a use case (detecting reverts cheaply) but does not explicitly state when to prefer this tool over alternatives such as evm_call or evm_gas. It offers a hint but lacks a clear comparative guide.

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