Skip to main content
Glama

estimate_custom_tx_cost

USD cost of a custom gas limit or compute-unit budget. Prices an arbitrary transaction, not just the 3 canned types get_gas_price/compare_gas_costs cover: pass your own gas limit (EVM chains) or compute-unit budget (Solana) and get its USD cost at a speed tier. Use this for a contract call, NFT mint or any tx whose gas usage you already know or estimated via eth_estimateGas/simulation — get_gas_price's 3 canned tx types won't fit it. Typical EVM units: 21,000 plain transfer, 50,000-65,000 ERC20 transfer, 100,000-250,000 typical contract call/NFT mint, 150,000-400,000 DEX swap; typical Solana compute units: 200,000 simple transfer, up to 1,400,000 (the per-tx cap) for a complex instruction. Excludes OP-stack L1 data fee (depends on calldata size, not gas limit) — add a few % for Base/Optimism to be safe. Costs $0.002 USDC per call (x402).

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": {
      "chain": "<chain>",
      "units": "<units>"
    },
    "name": "estimate_custom_tx_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
tierNoSpeed tierstandard
chainYesChain to query
unitsYesGas limit (EVM) or compute units (Solana)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/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 so: it discloses the per-call price ($0.002 USDC via x402), names a concrete limitation (excludes OP-stack L1 data fee, add a few % for Base/Optimism), and gives realistic unit ranges so results can be sanity-checked. These are exactly the non-obvious behavioral facts an agent needs.

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?

Front-loaded: purpose and differentiation come first, then unit guidance, then caveats and pricing. It is dense and long, but nearly every clause adds actionable information; the unit-range list is the only part bordering on bulk.

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?

For a 3-parameter pricing tool with no output schema, nothing material is missing: the caller knows what it computes, what units to supply, what is excluded, and what it costs. The caveat about OP-stack L1 data fee closes the main correctness trap.

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%, so the baseline is 3, but the description adds real meaning on top: concrete EVM gas figures (21,000 transfer, 50k-65k ERC20, 100k-250k contract call, 150k-400k swap) and Solana CU figures up to the 1,400,000 cap. It is thinner on what the slow/standard/fast tiers actually mean, leaving that to the enum.

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?

Opens with a specific verb+resource: 'USD cost of a custom gas limit or compute-unit budget.' It immediately distinguishes itself from the sibling tools get_gas_price/compare_gas_costs by naming exactly what those cover (3 canned tx types) and what this adds (arbitrary units).

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?

Explicitly states when to use it ('contract call, NFT mint or any tx whose gas usage you already know or estimated via eth_estimateGas/simulation') and when the alternatives are insufficient ('get_gas_price's 3 canned tx types won't fit it'). Both the trigger and the exclusions are spelled out.

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