Multi-chain Gas Price
onchain_gasCurrent gas price across multiple EVM chains in a single call.
Reads eth_gasPrice on every requested chain in parallel and returns gwei, so you do not have to query each chain's RPC separately and convert units yourself.
Supported chains: base, ethereum, optimism, arbitrum, polygon.
When to use: choosing the cheapest chain to transact on right now, cost estimation before submitting a transaction, monitoring for a low-gas window.
When NOT to use: you need an EIP-1559 fee breakdown (base fee vs priority fee) rather than a single legacy gas price, or historical gas data.
Args:
chains (string[], optional): which chains to check. Defaults to all five supported chains.
Returns structuredContent: { "chains": [ { "chain": "base", "chainId": 8453, "gasPriceGwei": 0.006 }, { "chain": "ethereum", "chainId": 1, "gasPriceGwei": 0.0986 }, { "chain": "polygon", "chainId": 137, "gasPriceGwei": 278.97 } ], "source": "Live RPC eth_gasPrice, each chain's public network" }
A chain whose RPC could not be reached returns gasPriceGwei null rather than a stale or fabricated value; if every requested chain fails the call errors and is not billed.
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": "onchain_gas"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chains | No | Which chains to check. Defaults to all five supported chains. |