Skip to main content
Glama

eth_getTransactionByHash

Retrieve complete transaction details from any Ethereum network by supplying the transaction hash. Get sender, receiver, value, gas, and block information.

Instructions

Retrieves detailed transaction information using its unique transaction hash.

Args:

  • transactionHash (string): 32-byte transaction hash in hex format (e.g., '0xabc123...')

  • network (string, optional): Ethereum network to query, defaults to 'mainnet'

Returns:

  • Transaction object with hash, from, to, value, gas, gasPrice, input, nonce, blockHash, blockNumber, transactionIndex; null if transaction not found or still pending

Examples:

  • "Get transaction details": { "transactionHash": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b" }

  • "Query on Sepolia testnet": { "transactionHash": "0xabc...", "network": "sepolia" }

Errors:

  • InvalidParams: When transactionHash is not a valid 32-byte hex string

  • InternalError: When Infura API is unavailable

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionHashYesThe 32-byte transaction hash to query.
networkNoThe Ethereum network to query, e.g., 'mainnet' or 'sepolia'.mainnet
response_formatNoOutput format: 'json' for structured data, 'markdown' for human-readable.json
Behavior4/5

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

With no annotations, the description covers return value (transaction object or null), pending/not found behavior, and error conditions (InvalidParams, InternalError). It does not mention rate limits or authentication, but for a read-only query this is acceptable.

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?

The description is well-structured with Args, Returns, Examples, Errors sections. It is concise but includes necessary details; no extraneous content. Could be slightly tighter by integrating the missing response_format param.

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?

Despite no output schema, the description fully explains the return object fields, null case, and error scenarios. It is complete for a query tool of this complexity.

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

Parameters3/5

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

Schema coverage is 100%, so baseline is 3. The description adds format details for transactionHash and network default, but omits describing the 'response_format' parameter present in the schema, which slightly reduces added value.

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 'Retrieves detailed transaction information using its unique transaction hash', specifying the verb and resource. It distinguishes from sibling tools like eth_getTransactionByBlockHashAndIndex by focusing on hash lookup.

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 description implies when to use this tool (when you have a transaction hash) and provides examples, but does not explicitly state when not to use it or mention alternatives. It could be improved by noting that for other lookup methods, use sibling tools.

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/Qbandev/infura-mcp-server'

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