Skip to main content
Glama

chain_l1_data_fee

Read-only

$0.005 via x402: the L1 data-availability fee an OP-stack transaction pays ON TOP of L2 execution gas — usually the larger half of the bill, and the half ordinary gas estimators leave out. Answered by the chain's own GasPriceOracle.getL1Fee rather than a reimplemented formula, so it stays correct across Ecotone, Fjord and later forks. Pass data=0x... to price your actual transaction exactly. Base and Optimism only.

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": "chain_l1_data_fee"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataNo0x calldata of your actual transaction — priced exactly
bytesNoTransaction size in bytes, 1-200000 (default 1200)
chainNobase|optimism (OP-stack only)
x_paymentNosigned x402 payment payload (the X-PAYMENT header value) for the terms the first call returns; omit it to get the price and terms

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / x_payment / description
      Added value: +"signed x402 payment payload (the X-PAYMENT header value) for the terms the first call returns; omit it to get the price and terms"
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, the description discloses the cost ($0.005 via x402), the two-step payment handshake (omit x_payment to get price and terms, then resubmit a signed payload), and the implementation guarantee (chain's own oracle, correct across Ecotone/Fjord forks). That is substantial operational context an agent cannot get from any structured field.

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?

Front-loaded with cost and purpose, then mechanism, then usage — a well-ordered three-sentence block with no filler paragraphs. The phrase 'usually the larger half of the bill' is slightly rhetorical but does real work in justifying the tool's existence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description never states what the successful response contains — the fee value's unit (wei vs. ETH), whether it includes a breakdown, or how the x402 terms are presented. For a no-output-schema tool that returns a monetary quantity, that is a meaningful gap, though everything about invocation and scope is well covered.

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 schema already defines all four parameters, and the description adds real meaning on top: it explains that x_payment is the signed payload for the terms 'the first call returns' and that omitting it yields price and terms — the call sequence the schema does not convey. It adds little for data/bytes/chain beyond the schema's own text.

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 resource (the L1 data-availability fee for OP-stack transactions) and a specific mechanism (GasPriceOracle.getL1Fee), and it explicitly positions the tool relative to 'ordinary gas estimators' that omit this component — an agent can tell it apart from chain_gas_price or chain_estimate_gas without opening a schema.

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 gives clear calling guidance — 'Pass data=0x... to price your actual transaction exactly' — and a hard scope exclusion ('Base and Optimism only'), which is enough to know when the tool applies and when it does not. It stops short of naming the sibling tools (chain_gas_price, chain_estimate_gas) that cover the L2 execution side, so routing is inferred rather than spelled out.

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.