Skip to main content
Glama

Agent Decision & Evidence Tools (MCP + x402)

Gas and execution-fee estimate

gas_estimate
Read-only

Return the current gas price and, when transaction fields are supplied, eth_estimateGas plus an execution-fee estimate with excluded rollup components stated explicitly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNo
dataNo0x
chainNobase
senderNo
value_nativeNo0

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolNo
chainNo
errorNo
chargedNoWhen present on an error, false means the failed result is uncharged.
messageNo
missingNo
receiptNo
settledNoWhen present on an error, false means no settlement occurred.
sourcesNo
unknownNo
acceptedNo
contractNo
gas_limitNo
read_onlyNo
retryableNo
checked_atNo
error_codeNo
extensionsNo
status_codeNo
transactionNo
did_you_meanNo
would_revertNo
gas_price_weiNo
native_symbolNo
revert_reasonNo
gas_price_gweiNo
missing_checksNo
observed_blockNo
partial_evidenceNo
total_fee_completeNo
max_priority_fee_weiNo
transaction_estimatedNo
estimated_execution_fee_weiNo
fee_components_not_includedNo
estimated_execution_fee_nativeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / chain / title
      Removed value: -"Chain"
    • addedInput schema / properties / data / pattern
      Added value: +"^0x(?:[a-fA-F0-9]{2})*$"
    • removedInput schema / properties / data / title
      Removed value: -"Data"
    • removedInput schema / properties / sender / title
      Removed value: -"Sender"
    • removedInput schema / properties / to / title
      Removed value: -"To"
    • removedInput schema / properties / value_native / title
      Removed value: -"Value Native"
    • removedInput schema / title
      Removed value: -"gas_estimate_toolArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "anyOf": [
      +    {
      +      "required": [
      +        "contract",
      +        "chain",
      +        "read_only",
      +        "checked_at",
      +        "sources",
      +        "native_symbol",
      +        "gas_price_wei",
      +        "gas_price_gwei",
      +        "max_priority_fee_wei",
      +        "observed_block",
      +        "transaction_estimated",
      +        "receipt",
      +        "extensions"
      +      ]
      +    },
      +    {
      +      "required": [
      +        "error"
      +      ]
      +    }
      +  ],
      +  "description": "Structured result contract for gas_estimate. A success satisfies the documented success branch. A domain or tool error includes error and is not a successful settlement; unpaid x402 requirements are carried by the transport wrapper.",
      +  "properties": {
      +    "accepted": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "chain": {
      +      "type": "string"
      +    },
      +    "charged": {
      +      "description": "When present on an error, false means the failed result is uncharged.",
      +      "type": "boolean"
      +    },
      +    "checked_at": {
      +      "type": "string"
      +    },
      +    "contract": {
      +      "type": "string"
      +    },
      +    "did_you_mean": {
      +      "additionalProperties": true,
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "oneOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "additionalProperties": true,
      +          "properties": {
      +            "code": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "message": {
      +              "type": "string"
      +            },
      +            "param": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "type": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "message"
      +          ],
      +          "type": "object"
      +        }
      +      ]
      +    },
      +    "error_code": {
      +      "type": "string"
      +    },
      +    "estimated_execution_fee_native": {
      +      "type": "string"
      +    },
      +    "estimated_execution_fee_wei": {
      +      "type": "string"
      +    },
      +    "extensions": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "delivery-receipt": {
      +          "additionalProperties": true,
      +          "properties": {
      +            "how_to_verify": {
      +              "type": "string"
      +            },
      +            "issued_at": {
      +              "format": "date-time",
      +              "type": "string"
      +            },
      +            "issuer": {
      +              "type": "string"
      +            },
      +            "issuer_key": {
      +              "type": "string"
      +            },
      +            "key_id": {
      +              "type": "string"
      +            },
      +            "result_hash": {
      +              "type": "string"
      +            },
      +            "service": {
      +              "type": "string"
      +            },
      +            "signature": {
      +              "type": "string"
      +            },
      +            "signed_message": {
      +              "type": "string"
      +            },
      +            "standard": {
      +              "const": "eucompliance-receipt/2",
      +              "type": "string"
      +            },
      +            "subject": {
      +              "type": "string"
      +            },
      +            "valid_until": {
      +              "format": "date-time",
      +              "type": "string"
      +            },
      +            "verify_url": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "standard",
      +            "service",
      +            "subject",
      +            "result_hash",
      +            "issued_at",
      +            "valid_until",
      +            "issuer",
      +            "issuer_key",
      +            "key_id",
      +            "verify_url",
      +            "how_to_verify",
      +            "signature",
      +            "signed_message"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "delivery-receipt"
      +      ],
      +      "type": "object"
      +    },
      +    "fee_components_not_included": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "gas_limit": {
      +      "type": "string"
      +    },
      +    "gas_price_gwei": {
      +      "type": "string"
      +    },
      +    "gas_price_wei": {
      +      "type": "string"
      +    },
      +    "max_priority_fee_wei": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "missing": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "missing_checks": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "native_symbol": {
      +      "type": "string"
      +    },
      +    "observed_block": {
      +      "type": "integer"
      +    },
      +    "partial_evidence": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "read_only": {
      +      "type": "boolean"
      +    },
      +    "receipt": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "how_to_verify": {
      +          "type": "string"
      +        },
      +        "issued_at": {
      +          "format": "date-time",
      +          "type": "string"
      +        },
      +        "issuer": {
      +          "type": "string"
      +        },
      +        "issuer_key": {
      +          "type": "string"
      +        },
      +        "key_id": {
      +          "type": "string"
      +        },
      +        "result_hash": {
      +          "type": "string"
      +        },
      +        "service": {
      +          "type": "string"
      +        },
      +        "signature": {
      +          "type": "string"
      +        },
      +        "signed_message": {
      +          "type": "string"
      +        },
      +        "standard": {
      +          "const": "eucompliance-receipt/2",
      +          "type": "string"
      +        },
      +        "subject": {
      +          "type": "string"
      +        },
      +        "valid_until": {
      +          "format": "date-time",
      +          "type": "string"
      +        },
      +        "verify_url": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "standard",
      +        "service",
      +        "subject",
      +        "result_hash",
      +        "issued_at",
      +        "valid_until",
      +        "issuer",
      +        "issuer_key",
      +        "key_id",
      +        "verify_url",
      +        "how_to_verify",
      +        "signature",
      +        "signed_message"
      +      ],
      +      "type": "object"
      +    },
      +    "retryable": {
      +      "type": "boolean"
      +    },
      +    "revert_reason": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "settled": {
      +      "description": "When present on an error, false means no settlement occurred.",
      +      "type": "boolean"
      +    },
      +    "sources": {
      +      "items": {},
      +      "type": "array"
      +    },
      +    "status_code": {
      +      "type": "integer"
      +    },
      +    "tool": {
      +      "type": "string"
      +    },
      +    "total_fee_complete": {
      +      "type": "boolean"
      +    },
      +    "transaction": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "transaction_estimated": {
      +      "type": "boolean"
      +    },
      +    "unknown": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "would_revert": {
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish the tool is read-only and non-destructive, so the description does not need to restate safety. It adds useful behavioral context by disclosing the conditional estimate behavior and that excluded rollup components are explicitly stated in the result. No contradiction with annotations exists.

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 entire description is one dense, front-loaded sentence with no redundant filler. Every phrase earns its place by adding conditional behavior, scope, or output nuance.

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 the presence of an output schema, read-only annotations, and a simple parameter list, the description covers the core behavior and the key conditional usage. It could be more explicit about which parameters constitute the 'transaction fields' and what 'excluded rollup components' means, but the available schema and annotations fill most gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description should compensate for missing parameter documentation. It only refers generically to 'transaction fields' and does not explain to, data, sender, value_native, or chain semantics, defaults, or formats. This leaves the agent to infer most parameter meaning from names and the schema alone.

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 names a specific verb ('Return'), a clear resource ('current gas price'), and a conditional richer behavior ('eth_estimateGas plus an execution-fee estimate') when transaction fields are supplied. It also adds rollup-specific nuance, making the tool's scope distinct from generic gas tools.

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?

The description gives clear usage context: call it without transaction fields for the current gas price, or supply transaction fields to get the full estimate. It does not explicitly rule out alternatives or name a sibling like tx_preflight, but the conditional guidance is actionable.

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.