Skip to main content
Glama

eth_getTransactionReceipt

Retrieve the receipt of a mined transaction to verify its success status, gas used, and logs by providing the transaction hash.

Instructions

Retrieves the receipt of a mined transaction, including status, gas used, and logs. Only available for transactions that have been included in a block.

Args:

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

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

Returns:

  • Receipt object with status (1=success, 0=failure), blockHash, blockNumber, transactionIndex, from, to, contractAddress (if contract creation), cumulativeGasUsed, gasUsed, effectiveGasPrice, logs array, logsBloom; null if transaction pending or not found

Examples:

  • "Get receipt to check if transaction succeeded": { "transactionHash": "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b" }

  • "Get receipt on Sepolia": { "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 hash of the transaction.
networkNoThe Ethereum network to query, e.g., 'mainnet' or 'sepolia'.mainnet
response_formatNoOutput format: 'json' for structured data, 'markdown' for human-readable.json
Behavior5/5

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

With no annotations, the description fully discloses behavior: returns null for pending/not found transactions, lists error types (InvalidParams, InternalError), and details the return object structure.

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 sections (Args, Returns, Examples, Errors) and front-loaded with a clear purpose. It is slightly long but every section serves a purpose.

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 and null case. It covers errors and provides examples, making it complete for a receipt retrieval 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%, so baseline is 3. The description adds value by providing format examples for transactionHash (hex) and default for network, though it omits the response_format parameter. Overall, it enhances understanding.

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 retrieves a mined transaction's receipt with status, gas used, and logs. It distinguishes itself from sibling tools like eth_getTransactionByHash by focusing on the receipt of a mined transaction.

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 specifies that the tool is only for transactions already in a block, and provides examples like checking transaction success. It does not explicitly exclude other contexts, but the usage is clear.

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