Skip to main content
Glama

compare_gas_costs

Where is it cheapest to send this transaction right now?. Ranks all 6 supported chains (Base, Ethereum, Arbitrum, Optimism, Polygon, Solana) by USD cost for a transaction type (transfer, USDC transfer or swap) at a speed tier (slow/standard/fast). Returns the ranking, the cheapest chain, and any chains queried in parallel that didn't respond (in failed[]). Costs $0.005 USDC per call (x402).

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": "compare_gas_costs"
  }
}

Input Schema

NameRequiredDescriptionDefault
txNoTransaction typetransfer
tierNoSpeed tierstandard

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses the per-call cost ($0.005 USDC via x402), the fact that chains are queried in parallel, and that non-responding chains appear in failed[], which is important partial-failure behavior. It does not explicitly say the tool is read-only or discuss latency, but the cost and failure semantics are the highest-value disclosures.

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

Conciseness4/5

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

Three sentences, front-loaded with the decision question, then the mechanical detail, then the cost caveat. Every sentence carries information, though the initial question and the ranking sentence overlap slightly.

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?

There is no output schema, so the description must describe the return value, and it does: the ranking, the cheapest chain, and a failed[] list of non-responding chains. Combined with cost disclosure, an agent has everything needed to call and interpret this tool.

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 coverage is 100% with enums for both parameters, so the baseline is 3; the description goes slightly beyond by enumerating the three transaction types and situating tier within a slow/standard/fast ranking context, clarifying what the tx+tier combination produces. It adds framing rather than new per-parameter syntax, so it sits just above baseline.

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 opens with a concrete question ('Where is it cheapest to send this transaction right now?') and then states the exact operation: ranking all 6 supported chains by USD cost for a given transaction type and speed tier. It names the chain set explicitly and implicitly separates itself from get_gas_price (single-chain lookup) by stressing that this compares across all chains.

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 framing question makes the use case clear: pick a chain when you want the cheapest option right now. It does not, however, explicitly state when NOT to use it or name get_gas_price as the alternative for a single-chain price, leaving the sibling routing to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources