Skip to main content
Glama

evm_estimate_bridge_fee

Estimate total fees for bridging tokens between EVM chains, including source/target gas, relayer, and protocol costs, so users can compare routes and budget cross-chain transfers.

Instructions

Estimate total fees for bridging tokens between EVM chains with detailed cost breakdown.

Calculates comprehensive bridge costs including source chain gas, target chain gas, relayer fees, protocol fees, and finalization costs. Compares canonical bridges vs third-party bridges to help users choose the most cost-effective route for their cross-chain transfer needs.

CRITICAL RULES:

  • Read-only operation (no gas cost)

  • Estimates may vary from actual costs (gas prices fluctuate)

  • Different bridge protocols have different fee structures

  • L2→L1 bridges have additional finalization costs

  • Canonical bridges slower but cheaper than third-party

  • Urgency affects relayer fee calculations

PARAMETERS:

  • sourceChain: Chain to bridge from (required)

    • Must have bridge contract deployed

    • Different chains have different canonical bridges

    • Format: ethereum, polygon, arbitrum, etc.

  • targetChain: Chain to bridge to (required)

    • Must be connected to sourceChain via bridge

    • Cannot bridge to same chain

    • Some routes require hub chains

  • token: Token address to bridge (required)

    • Format: 0x followed by 40 hex characters

    • Must be supported by bridge protocol

    • Native tokens use wrapped versions

    • Example: USDC has different addresses per chain

  • amount: Amount to bridge (required)

    • Human-readable format: "100" = 100 tokens

    • Used to calculate percentage-based fees

    • Affects liquidity availability checks

    • Large amounts may have higher slippage

  • bridgeProtocol: Specific bridge to use (optional)

    • Options: canonical, hop, stargate, across, synapse, celer

    • Default: canonical (official bridge)

    • Third-party bridges faster but require trust

    • Each has different fee structure

  • urgency: Speed preference (optional, default: standard)

    • Options: economy, standard, fast

    • Affects relayer fee calculation

    • Economy: 10% discount, slower confirmation

    • Standard: Normal fees, normal speed

    • Fast: 50% premium, priority processing

SUPPORTED EVM CHAINS (7 networks): • ethereum (Sepolia) - EIP-1559 enabled, ~12s blocks, moderate gas costs • polygon (Amoy) - Low fees, fast finality (~2s), layer 2 • avalanche (Fuji C-Chain) - Sub-second finality, dynamic fees • bsc (BNB Testnet) - 3s blocks, low gas costs, Binance ecosystem • arbitrum (Sepolia) - Optimistic rollup, low fees, Ethereum security • base (Sepolia) - Coinbase layer 2, EIP-1559, low fees • worldchain (World Sepolia) - World Network testnet, EIP-1559

CRITICAL GAS CONSIDERATIONS:

  • Ethereum: High gas costs, use gas oracle for timing

  • Polygon/BSC: Very low gas, safe for frequent transactions

  • Arbitrum/Base: L2 optimizations, ~10-50x cheaper than Ethereum

  • Avalanche: Dynamic fees, can spike during congestion

  • Always check gas price before executing transactions

TESTNET TOKENS: All chains use testnet tokens with NO REAL VALUE. Faucets available for all supported networks.

OUTPUT STRUCTURE: • totalCost: Complete fee breakdown in USD and native tokens • sourceGas: Source chain gas fees • bridgeFee: Bridge protocol fees • relayerFee: Transaction relayer costs • targetGas: Destination chain finalization fees • estimatedTime: Total time to completion • route: Bridge path used (direct or multi-hop) • executionTime: Time taken in milliseconds

COMMON MISTAKES:

  • Not accounting for both source and destination gas

  • Assuming all bridges have same fee structure

  • Forgetting finalization costs on L2→L1 transfers

  • Using wrong token addresses for different chains

  • Not considering urgency vs cost tradeoffs

USE CASES:

  • Compare bridge costs before transferring

  • Budget for cross-chain operations

  • Choose between canonical vs third-party bridges

  • Calculate total cost including gas and fees

  • Plan large token transfers across chains

BRIDGE TYPES:

  • Canonical: Native chain bridges (most secure, slower)

  • Third-party: External protocols (faster, additional trust)

  • Layer 2: Optimistic rollup bridges (7-day challenge period)

  • Sidechain: Faster but less secure than L2s

FEE COMPONENTS:

  1. Source gas: Transaction costs on origin chain

  2. Bridge fee: Protocol-specific transfer fees

  3. Relayer fee: Speed-based priority fees

  4. Target gas: Finalization costs on destination

  5. Liquidity fees: Pool-based bridging costs

COST OPTIMIZATION:

  • Use canonical bridges for large amounts

  • Batch multiple transfers when possible

  • Choose economy for non-urgent transfers

  • Compare multiple bridge protocols

  • Time transfers for low gas periods

Running on Linux.

LINUX-SPECIFIC NOTES:

  • Package manager: apt (Ubuntu/Debian), yum (RHEL/CentOS), or pacman (Arch)

  • Python 3 is typically 'python3' command

  • GNU tools are standard

  • Use 'xdg-open' command to open files/applications

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sourceChain": "<sourceChain>",
      "targetChain": "<targetChain>",
      "token": "<token>",
      "amount": "<amount>"
    },
    "name": "evm_estimate_bridge_fee"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokenYesToken address to bridge (0x...)
amountYesAmount to bridge
urgencyNoSpeed preference (default: standard)
sourceChainYesSource chain to bridge from
targetChainYesTarget chain to bridge to
bridgeProtocolNoBridge protocol to use (default: canonical)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it declares read-only behavior, warns that estimates diverge from actual costs, notes L2→L1 finalization costs, explains urgency's effect on relayer fees, and flags that all tokens are testnet with no real value. It loses a point because the 'CRITICAL GAS CONSIDERATIONS' section drifts into execution advice ('Always check gas price before executing transactions'), blurring whether this tool reads or acts, and it never states permission or rate-limit constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but the body is heavily padded: duplicated fee material appears both under 'FEE COMPONENTS' and 'OUTPUT STRUCTURE', and the description ends with entirely irrelevant 'Running on Linux' package-manager boilerplate that wastes attention on an EVM RPC tool. Several uppercase sections restate each other rather than adding information.

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

Completeness4/5

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

For a six-parameter estimation tool with no output schema, the description compensates by documenting the return structure (totalCost, sourceGas, bridgeFee, relayerFee, targetGas, estimatedTime, route, executionTime) and listing supported chains. What remains unaddressed is error behavior for unsupported routes (e.g., same-chain or unconnected chains), though the parameter notes partially cover that constraint.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description goes well beyond it: it explains that amount is human-readable ('100' = 100 tokens), that token addresses differ per chain, that bridgeProtocol defaults to canonical with a trust/speed tradeoff per option, and quantifies urgency (economy = 10% discount, fast = 50% premium) — semantics the enum values alone do not convey.

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 opening sentence names a specific verb and resource: 'Estimate total fees for bridging tokens between EVM chains with detailed cost breakdown.' The bridge-fee scope differentiates it from generic siblings like evm_estimate_fees or evm_estimate_gas, but no sibling is named explicitly, so the agent must infer that evm_bridge_tokens is the execution counterpart rather than the estimate.

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?

The USE CASES block gives clear contexts ('Compare bridge costs before transferring', 'Budget for cross-chain operations'), and the closing COST OPTIMIZATION list implies pre-transfer planning. However, there is no when-not guidance and no explicit pointer to the sibling that actually executes the bridge (evm_bridge_tokens) or finds routes (evm_find_bridge_routes), leaving the estimate-vs-execute boundary implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools