Skip to main content
Glama

chain_tx_build

Read-only

Build an unsigned EVM transaction (EIP-1559) — Build a ready-to-sign EIP-1559 (type 2) transaction on base, ethereum, arbitrum, optimism or polygon: pending nonce, eth_estimateGas with 20% headroom (21000 for plain transfers), base fee + priority fee by speed (slow/normal/fast), OP-stack L1 data fee, max and likely cost, sender balance check, the unsigned RLP serialization and the keccak signing hash. Native transfers (value= in ETH/POL), ERC-20 transfers (token= address or usdc plus amount= in human units - calldata encoded for you) or any contract call (data= hex). 422 with the revert reason if the transaction would fail. Required: from, to. Optional: chain (default base), value, token, amount, data, speed, gas_limit. Price: $0.003 USDC (Base, via 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>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "chain_tx_build"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYes0x000000000000000000000000000000000000dEaD
fromYes0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
chainYesbase

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnly/openWorld/non-destructive, but the description goes far beyond: pending nonce lookup, eth_estimateGas with 20% headroom and the 21000 floor for plain transfers, fee selection by slow/normal/fast, OP-stack L1 data fee, balance check, revert surfaced as 422, and a $0.003 USDC x402 payment. That is exactly the behavioral context an agent needs to call and price the tool safely.

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?

Purpose is front-loaded and nearly every clause carries information, but the first two clauses restate each other ('Build an unsigned EVM transaction (EIP-1559) — Build a ready-to-sign EIP-1559 (type 2) transaction'), and the long dash-separated run-on makes scanning harder than a short structured list would.

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?

With no output schema, the description still tells the agent what comes back (unsigned RLP serialization, keccak signing hash, max and likely cost, balance status) and how failures are reported (422 with revert reason). For a fee-sensitive build tool this covers everything needed to invoke it correctly.

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 nominally 100% but the schema only exposes from/to/chain, while the description documents the real optional surface (value, token, amount, data, speed, gas_limit) and adds meaning the schema lacks — token accepts an address or the shorthand 'usdc', amount is in human units with calldata encoded automatically, data is raw hex. Minor inconsistency: the description says only from and to are required while the schema marks chain required.

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 precise verb+resource (build an unsigned EIP-1559 type-2 transaction) and enumerates supported chains, distinguishing it from read/broadcast siblings like chain_tx or chain_decode_raw_tx. An agent can tell exactly what artifact it gets back (unsigned RLP + signing hash) without opening the schema.

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?

It clearly frames the use case: produce a ready-to-sign transaction covering native transfers, ERC-20 transfers, and arbitrary contract calls, with the 422-on-revert condition spelled out. It does not explicitly name an alternative (e.g., when to prefer chain_tx for broadcasting or chain_call for simulation), so the when-not guidance is only implied.

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