Skip to main content
Glama

estimate_gas

Estimate the gas cost for an EVM transaction before sending it by providing the recipient, optional value, and data. Helps avoid failed transactions and manage network fees.

Instructions

Estimate the gas cost for a transaction

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": "estimate_gas"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesThe recipient address
dataNoThe transaction data as a hex string
valueNoThe amount of ETH to send in ether (e.g., '0.1')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.2

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden. It implies a simulation ('estimate') but never states that no state change occurs, that the call may revert or fail on an invalid transaction, or what units the result is in (gas units vs. wei cost) - a meaningful gap for a gas tool.

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?

A single front-loaded sentence with zero filler, which is efficient. It is arguably terse for a tool whose behavior and return value are otherwise undocumented, but nothing in it is wasted.

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

Completeness3/5

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

The input schema is small and fully documented, so callers can construct the request. However, with no annotations and no output schema, the description should say what the returned estimate represents and whether the call is non-mutating - neither is covered.

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 all three parameters (to, data, value) are already documented in the schema. The description adds no meaning beyond that baseline, such as why data is needed for contract calls or how value affects the estimate.

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?

States a specific verb and resource: 'Estimate the gas cost for a transaction'. An agent immediately knows it is a read-only estimator, not a transfer tool, though it draws no explicit boundary against siblings like transfer_eth or write_contract that would also need gas.

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

Usage Guidelines2/5

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

There is no guidance on when to call this versus performing a transfer directly, no mention of prerequisites such as a connected network or funded sender, and no note that the estimate should precede a write operation. The agent must infer the usage pattern entirely.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.