Skip to main content
Glama

Optimism gas prices

optimism_gas_prices
Read-onlyIdempotent

OP Mainnet gas price right now: block number, base fee, gas price and priority fee in gwei, and the estimated cost in ETH and USD of a native transfer and an ERC-20 transfer (Chainlink ETH/USD); plus how the current price ranks against our own samples every 10 minutes over the last 7 days, and the usually cheapest UTC hour. Costs $0.003 USDC on Base 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": "optimism_gas_prices"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
noteNostring, e.g. "Excludes OP Mainnet's L1 data fee, which adds a small amoun
chainNostring, e.g. "optimism"
blockTimeNostring, e.g. "2026-10-22T15:50:33.000Z"
nativeUsdNonumber, e.g. 2394.09
baseFeeGweiNostring, e.g. "0.000000304"
blockNumberNonumber, e.g. 158542728
gasPriceGweiNostring, e.g. "0.001000304"
nativeSymbolNostring, e.g. "ETH"
estimatedCostNoobject
maxPriorityFeeGweiNostring, e.g. "0.001"

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "baseFeeGwei": {
      +      "description": "string, e.g. \"0.000000304\""
      +    },
      +    "blockNumber": {
      +      "description": "number, e.g. 158542728"
      +    },
      +    "blockTime": {
      +      "description": "string, e.g. \"2026-10-22T15:50:33.000Z\""
      +    },
      +    "chain": {
      +      "description": "string, e.g. \"optimism\""
      +    },
      +    "estimatedCost": {
      +      "description": "object"
      +    },
      +    "gasPriceGwei": {
      +      "description": "string, e.g. \"0.001000304\""
      +    },
      +    "maxPriorityFeeGwei": {
      +      "description": "string, e.g. \"0.001\""
      +    },
      +    "nativeSymbol": {
      +      "description": "string, e.g. \"ETH\""
      +    },
      +    "nativeUsd": {
      +      "description": "number, e.g. 2394.09"
      +    },
      +    "note": {
      +      "description": "string, e.g. \"Excludes OP Mainnet's L1 data fee, which adds a small amoun"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, open-world), so the description's job is additive and it delivers: it discloses the ETH/USD price source (Chainlink), the sampling cadence behind the ranking (every 10 minutes over 7 days), and a real precondition the annotations do not capture, namely the $0.003 USDC x402 payment on Base. Freshness/SLA behavior is not stated, which keeps it off a 5.

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?

A single dense sentence that front-loads the primary payload (current gas price and its components) before layering historical ranking and then the cost. Despite being long, each clause carries distinct information an agent would otherwise have to discover by calling the tool.

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?

An output schema exists, so return values need not be documented, and the description still covers the value proposition, data provenance, comparison window, and the payment requirement. For a zero-parameter read-only tool this leaves nothing material an agent needs before invoking it.

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?

The tool takes zero parameters, so there is no parameter semantics to explain and the baseline of 4 applies. The description correctly avoids inventing parameter behavior and instead spends its words on what the zero-argument call returns.

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 names the specific resource (OP Mainnet gas price, 'right now') and enumerates exactly what is returned: block number, base fee, gas price, priority fee in gwei, plus ETH/USD transfer cost estimates and a 7-day ranking. That is far more specific than a title restatement, and the OP Mainnet scoping separates it from the base_/arbitrum_/eth_ gas siblings, though it never explicitly contrasts with gas_compare.

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 only implied: the 'right now' framing plus the cost estimates tell an agent this is for a point-in-time OP Mainnet fee check, and the addition of historical ranking hints at timing decisions. There is no explicit when-to-use statement, no exclusions, and no routing to gas_compare or the other chain-specific gas 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.

Resources