Skip to main content
Glama

Current gas for a chain (paid $0.001)

gas

Retrieve current gas prices for a specified blockchain, including base fee, priority fee, and max fee. Optionally determine if the base fee is below a given threshold.

Instructions

PAID $0.001 (x402, USDC on Base). Current gas for a chain via public RPC: base fee + suggested priority + suggested max fee (gwei) at the latest block. If below_gwei is set, also returns whether the base fee is at/below your threshold right now. Read-only. Args: chain (ethereum|base|arbitrum|polygon|bsc|optimism), below_gwei (optional). Without payment returns the x402 challenge; pass x_payment to settle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesChain to read gas for.
x_paymentNox402 payment payload (base64) for this PAID read. If supplied it is forwarded as the X-PAYMENT header to settle the call and return the real result instead of a 402 challenge. Omit to get the price challenge first.
below_gweiNoOptional threshold: return a boolean of whether base fee is at/below this many gwei now.
Behavior5/5

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

With no annotations provided, the description carries full burden and does an excellent job. It discloses the paid nature, the read-only trait, and the key behavior of returning a challenge without payment. It also specifies what data is returned (base fee, suggested priority, suggested max fee) and the conditional boolean when below_gwei is set. There is no mention of rate limits or error cases, but the critical behaviors are transparent enough for an agent to know what to expect.

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 description is compact and front-loaded with the crucial paid indicator. However, it includes a redundant 'Args: chain (...), below_gwei (optional)' line that repeats the schema, and it omits x_payment from that enumeration (though it is mentioned later). This slight redundancy and minor inconsistency prevent a perfect score, but the overall length and structure are efficient.

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 there is no output schema, the description adequately explains the return values: gas fee components and the optional threshold boolean. It also clarifies the payment challenge behavior. It does not specify the exact output format (e.g., JSON structure), but the core outputs are described. The tool is relatively simple, and the description is sufficiently complete for an agent to invoke it correctly.

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?

The schema description coverage is 100%, so the baseline is 3. The description adds some value by explaining the x_payment flow and the challenge/settle mechanism, but it does not add much beyond the schema: chain enum values are already listed, below_gwei's threshold behavior is already in the schema, and the 'Args' line is redundant. The parameter semantics are fully captured by the schema, so no upgrade beyond baseline.

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 clearly states what the tool does: 'Current gas for a chain via public RPC: base fee + suggested priority + suggested max fee (gwei) at the latest block.' This is a specific verb+resource combination that also differentiates from siblings like ens_expiry, token_unlocks, and oracle_health, which serve entirely different purposes. The tool's name 'gas' is fully explained.

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 provides clear context: it explains the payment requirement ('PAID $0.001 (x402, USDC on Base)') and how to settle with x_payment, plus the fallback behavior ('Without payment returns the x402 challenge; pass x_payment to settle'). It does not name explicit alternative tools, but the sibling list makes the absence of competition clear, and the usage context is well-defined by the payment flow and read-only nature.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zvmzaretsky/fabtally-chain-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server