Skip to main content
Glama

Evm gas estimate

evm_gas_estimate
Read-onlyIdempotent

Gas estimate before sending, across 8 EVM chains (Ethereum, Base, Arbitrum, Optimism, Polygon, BNB Chain, Arc and Robinhood): gas units, gas price, fee, or the revert reason. Nothing is sent. $0.001 per call over x402 (USDC on Arc, Base or Solana, or XNT on X1). Call once without payment for the terms, sign them with your own wallet, call again with payment.

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

Input Schema

NameRequiredDescriptionDefault
toYesrecipient or contract (0x...)
dataNohex calldata
fromNosender (0x...)
chainNoethereum (default), base, arbitrum, optimism, polygon, bnb, arc or robinhood
valueNovalue in wei
paymentNoa signed x402 payment (the base64 payload you would put in PAYMENT-SIGNATURE). Pass it and the purchase completes inside this tool call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / chain / description
      Previous value: -"ethereum (default), base, arc or bnb"New value: +"ethereum (default), base, arbitrum, optimism, polygon, bnb, arc or robinhood"
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent, but the description adds substantial context: the read-only guarantee restated in concrete terms, the four possible outputs including a revert reason, per-call cost ($0.001), accepted payment rails, and the required x402 handshake. These are exactly the operational facts an agent cannot get from the annotations.

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?

The capability statement is front-loaded and the payment mechanic follows logically. The single long opening sentence packs chain list, outputs, and safety together, which is dense but not wasteful; the parenthetical payment rails could be trimmed.

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?

Despite no output schema, the description enumerates the possible return values, and it covers cost, payment/auth requirements, and the no-side-effect guarantee for a tool whose only real risk is accidental payment. Nothing an agent needs to call it correctly is missing.

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 to/data/from/chain/value/payment. The description reinforces the meaning of `payment` within the two-call flow and enumerates the supported chains, but adds no syntax or format detail beyond the schema. Baseline 3 applies.

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?

States a specific verb and resource ('Gas estimate before sending') plus the scope (8 named EVM chains) and what is returned (gas units, gas price, fee, or revert reason). The phrase 'Nothing is sent' separates it from execution siblings like evm_call without requiring the agent to open another schema.

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?

Gives clear temporal guidance ('before sending') and an explicit two-step payment procedure: call once without `payment` for terms, sign, then call again with `payment`. It does not explicitly name an alternative tool to use instead, so it falls short of a true 5 on routing.

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