Skip to main content
Glama

Beggar Bot

gas_fee_api

Gas price and gas fee API for Base, Ethereum, Optimism, Arbitrum and Polygon: current gas price in gwei, next base fee, slow/standard/fast EIP-1559 maxFeePerGas + priority fee, congestion and trend, and the USD cost of a native transfer, USDC payment, swap or approve before you send. Pass chain=base or network=base. Payment settles only after a successful (2xx) response; input errors are never charged. Paid: $0.02 USDC 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": "gas_fee_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNobase (default), optimism, ethereum, arbitrum, polygon, base-sepolia
tx_bytesNooptional tx size bytes
gas_limitNooptional custom gas limit

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose non-obvious traits: cost is $0.02 USDC via x402, payment settles only after a 2xx response, and input errors are never charged. It also implicitly establishes a read-only pricing query and the multi-chain scope. It stops short of stating rate limits or response latency/format.

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?

One dense paragraph, front-loaded with what the tool returns, followed by the chain argument and then billing terms. Nearly every clause earns its place; the pricing sentence is longer than necessary for a selector but is defensible for a paid endpoint.

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?

No output schema exists, and the description compensates well by enumerating the returned metrics (gwei price, next base fee, fee tiers, congestion/trend, USD cost estimates). All three parameters are schema-documented and all supported chains are named. It is essentially complete for an agent to call correctly, lacking only response shape/pagination details.

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 the schema already documents chain, tx_bytes and gas_limit; baseline 3 applies. The description adds one genuine piece of meaning beyond the schema by noting an alias ('Pass chain=base or network=base'), but it says nothing about how tx_bytes or gas_limit change the estimate, and the network alias is not present in the schema, creating mild ambiguity.

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 resource and content set: current gas price in gwei, next base fee, EIP-1559 maxFeePerGas/priority fee tiers, congestion and trend, plus USD cost estimates for transfer/USDC/swap/approve across five named chains. That is far more specific than a restated name. It does not, however, distinguish itself from near-neighbors such as gas_price_api, gas_fee, next_base_fee or gas_compare, so an agent still cannot route by description alone.

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: 'before you send' frames it as a pre-transaction cost check, which is a useful cue. There is no explicit when-not or named alternative, and no guidance on when to pick this over the sibling gas_price_api or gas_fee tools.

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.