MCP Toolsget_gas

get_gas

Get current gas prices with USD cost estimates for common operations.

Tier: Free

Parameters

ParameterTypeRequiredDescription
chainIdnumberNoChain ID (default: 1)

Example

"What's the current gas price on Arbitrum?"

Response

Returns:

  • Current gas price in Gwei
  • Estimated USD cost for: transfer, swap, approve operations
  • Based on current native token price

Implementation

Uses viem to fetch gas price from RPC, then estimates costs for standard gas limits:

  • Transfer: 21,000 gas
  • ERC-20 transfer: 65,000 gas
  • Swap: 200,000 gas
  • Approve: 46,000 gas