Skip to main content
Glama

Estimate gas

evm_estimate_gas

Use when an agent is about to sign a transaction and must know whether it will fail and what it will cost: the gas this exact call needs, the current gas price, the cost in ether, and wouldRevert, which says the transaction would fail before you spend anything finding out. Do not use for the price of a plain transfer (/v1/evm/gas) or for EIP-1559 caps (/v1/evm/fees). No API key, no account. $0.005 per call, paid over x402 (USDC).

Input 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.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses cost, payment method (x402/USDC), no API key/account requirement, and key output semantics including wouldRevert. It does not explicitly state that the call is read-only/simulated and does not submit the transaction, which is an important behavioral detail for an agent.

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 front-loaded with the usage condition and remains tightly focused. The exclusions and payment/auth details each add concrete value without excessive repetition.

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

Completeness5/5

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

There is no output schema, but the description enumerates the important return values: gas, current gas price, ether cost, and wouldRevert. Together with the full schema coverage, explicit exclusions, auth, and pricing information, it is complete enough for an agent to call correctly.

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 the schema already documents all five parameters, including chain values and optional fields. The description does not add parameter-specific syntax or constraints beyond the schema, so the 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 states a specific purpose: estimate gas for an exact transaction call, including gas price, ether cost, and wouldRevert. It clearly distinguishes this from sibling tools by explicitly excluding plain-transfer gas pricing (/v1/evm/gas) and EIP-1559 caps (/v1/evm/fees).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a precise when-to-use condition: an agent is about to sign a transaction and needs to know failure risk and cost. It also gives explicit when-not-to-use cases and names the alternative endpoints for those cases.

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