Skip to main content
Glama

estimate_gas

Calculate gas needed for Kaia transactions before sending, including contract creation, value transfers, and optional KAIA cost at current gas price.

Instructions

Estimate gas for a transaction (from, to optional for contract creation, value, data). Returns estimated gas and optionally KAIA at current gas price.

Input Schema

NameRequiredDescriptionDefault
toNoRecipient address (omit for contract creation)
dataNoCall data (hex, optional)
fromYesSender address (0x...)
valueNoValue in peb (hex) or KAIA decimal string
networkNomainnet or kairos (default: mainnet)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses the return shape (estimated gas, optionally KAIA at current gas price) and the contract-creation case for an omitted 'to', but says nothing about whether this is a read-only simulation, node/network requirements, or failure modes.

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 efficient sentence with the core purpose and return value front-loaded, followed by an inline parenthetical on inputs. It wastes little, though the parenthetical and the return clause are somewhat compressed.

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 simple gas-estimation tool with full schema coverage and no output schema, the description covers purpose, inputs, and return values adequately. The remaining gap is behavioral (read-only nature, network/state assumptions), which keeps it just short of complete.

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 five parameters are already documented in the schema. The description restates from/to/value/data but adds only minor meaning (contract creation when 'to' is omitted) and omits the network parameter entirely, so it stays at the baseline for a fully documented schema.

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 gives a specific verb (estimate) and resource (gas) scoped to a transaction, with the input fields enumerated. It is clear what the tool does, but it never names or contrasts with the sibling get_gas_price, which is the nearest adjacent concept, so differentiation is left to inference.

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?

Usage is implied rather than stated: a reader infers this is called before sending a transaction to preview cost. There is no explicit when-to-use/when-not guidance and no mention of the get_gas_price alternative, so the agent must reason about selection on its own.

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