Skip to main content
Glama

Gas and fee estimate on Base, Ethereum, Arbitrum, Monad (or all compared): cost per action in gas token and USD

base_gas
Read-onlyIdempotent

Use when an agent must price, time or route a transaction. Input: optional chain (base default, ethereum, arbitrum, monad, all). Output: JSON base fee, priority tiers (last 20 blocks), suggested maxFeePerGas, block fullness, typical cost of transfer, approve, DEX swap, mint, deploy in gas token (ETH, MON) and USD (Base adds L1 data fee); chain=all adds a compare table and the cheapest chain per action by USD. Example: ?chain=all Price: $0.002 per call, paid in USDC (Base, Monad, Polygon, Arbitrum or Solana) via x402.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "base_gas"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoChain (default base); all = the four compared. Bad value → 400 before payment (not charged)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  4. Changed1 schema field changed
    • changedInput schema / properties / chain / description
      Previous value: -"Chain (default base); all = the three compared. Bad value → 400 before payment (not charged)"New value: +"Chain (default base); all = the four compared. Bad value → 400 before payment (not charged)"
  5. Changed2 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / chain
      Added value: +{
      +  "description": "Chain (default base); all = the three compared. Bad value → 400 before payment (not charged)",
      +  "type": "string"
      +}
  6. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already mark this read-only, idempotent and open-world. The description adds genuinely new behavior: a $0.002 per-call price paid in USDC via x402, and the fact that bad chain values fail with a 400 before payment so the caller is not charged.

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?

It is dense and front-loaded, leading with the trigger and then input/output/example. It is a long run-on string, but nearly every clause carries actionable information about inputs, outputs or pricing.

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, so the description must explain the return payload, and it does: base fee, priority tiers, suggested maxFeePerGas, block fullness and per-action costs in gas token and USD. Payment model and the bad-input failure mode are also covered, leaving little an agent needs to guess.

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

Parameters4/5

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

Schema coverage is 100%, so the chain parameter is already documented. The description still adds value by spelling out the effect of chain=all (compare table plus cheapest chain per action by USD) and by noting Base includes an L1 data fee.

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 opens with a concrete use case ('price, time or route a transaction') and names the chains covered, so an agent knows exactly what resource this returns. It also distinguishes itself from sibling token/wallet tools by being the gas-and-fee estimator.

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?

It states the triggering condition clearly ('Use when an agent must price, time or route a transaction') and explains the chain=all mode for comparison shopping. It does not name sibling alternatives, but none of the listed siblings appear to overlap with gas estimation.

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