Get Gas Price
get_gas_priceGet current EIP-1559 gas fees on Ethereum or Base: base fee, priority fee, next-block base fee estimate, and congestion (gas_used_ratio >0.5 busy, >0.9 very congested). Optional USD estimates cover a simple transfer and a swap-like transaction. Cached 10 seconds per chain.
Use when: Use before advising a transaction — to time execution, size a gas budget, or judge congestion. Call once per decision; the 10-second cache makes rapid re-calls pointless.
Limitations: Point-in-time estimate that changes every block; USD figures are rough heuristics at 21k/150k gas, not an execution quote. Ethereum mainnet and Base only.
Alternatives: get_block, get_dex_quote
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": "get_gas_price"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain_id | No | Chain ID (1=Ethereum, 8453=Base) | |
| include_usd_estimate | No | If true, include ETH spot price and rough USD cost estimates for a simple transfer (21k gas) and a swap-like transaction (150k gas). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain_id | Yes | ||
| base_fee_gwei | Yes | ||
| eth_price_usd | No | ||
| gas_price_gwei | Yes | ||
| gas_used_ratio | Yes | ||
| priority_fee_gwei | Yes | ||
| next_base_fee_gwei | Yes | ||
| estimated_swap_cost_usd | No | ||
| estimated_transfer_cost_usd | No |