Skip to main content
Glama

estimate_fees

Estimate bridge or swap route fees without committing. Compare gas, relayer, and total costs to select the best route.

Instructions

Estimate the fees for a specific bridge or swap route without committing to execution. Returns a breakdown of gas fees, relayer fees, and total cost impact.

Use this for comparing route costs or showing users expected fees. For standalone token pricing (not route-specific), use get_token_price instead.

Amounts must be in the token's smallest unit (wei, satoshis, lamports). Examples: 1 ETH = "1000000000000000000" (18 decimals), 1 USDC = "1000000" (6 decimals), 1 BTC = "100000000" (8 decimals), 1 SOL = "1000000000" (9 decimals). Use convert_amount or get_supported_tokens to look up decimals. Chain IDs can be numbers (8453) or names ('base', 'ethereum', 'arb', 'bitcoin', 'solana').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesAmount in the origin token's smallest unit.
senderNoSender wallet address. Optional — defaults to a zero address for estimation purposes.
tradeTypeNoEXACT_INPUT (default): you specify input amount, output varies. EXPECTED_OUTPUT: you specify desired output, input is calculated (allows slippage). EXACT_OUTPUT: you specify exact output required, fails if not deliverable.EXACT_INPUT
originChainIdYesSource chain ID or name (e.g. 1, 'ethereum', 'eth').
originCurrencyYesOrigin token address or symbol (e.g. "USDC", "ETH"). For native tokens use: EVM "0x0000000000000000000000000000000000000000", Solana "11111111111111111111111111111111", Bitcoin "bc1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmql8k8", Hyperliquid "0x00000000000000000000000000000000", Lighter "0". For other tokens, use the contract/mint address or look up via get_supported_tokens.
destinationChainIdYesDestination chain ID or name (e.g. 8453, 'base').
destinationCurrencyYesDestination token address or symbol (e.g. "USDC", "ETH"). For native tokens use: EVM "0x0000000000000000000000000000000000000000", Solana "11111111111111111111111111111111", Bitcoin "bc1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqmql8k8", Hyperliquid "0x00000000000000000000000000000000", Lighter "0". For other tokens, use the contract/mint address or look up via get_supported_tokens.
Behavior3/5

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

No annotations provided; the description states it does not commit to execution and returns a fee breakdown, but lacks details on idempotency, rate limits, or error behavior. Adequate but not fully transparent.

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

Conciseness5/5

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

The description is concise with two focused paragraphs: purpose and output in first, usage guidelines and parameter hints in second. No unnecessary words.

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

Completeness5/5

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

Given 7 parameters (5 required), no output schema, and no annotations, the description provides sufficient context: parameter formats, examples, sibling differentiation, and references to other tools for lookup.

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 descriptions cover 100% of parameters. The description adds value with examples of amount formatting, chain ID formats, and native token addresses, plus references to convert_amount and get_supported_tokens for decimal lookup.

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 clearly states the tool estimates fees for a specific bridge or swap route without committing to execution, and distinguishes it from get_token_price for standalone token pricing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use (comparing route costs, showing expected fees) and when-not-to-use (use get_token_price for standalone pricing) guidance is provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pedromcunha/relay-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server