Skip to main content
Glama

provider_get_transaction_receipt

Retrieve a transaction receipt from Ethereum or EVM-compatible blockchains using the transaction hash to confirm details like status, logs, and gas used.

Instructions

Get a transaction receipt

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionHashYesThe transaction hash

Implementation Reference

  • The handler function that executes the tool logic by retrieving the transaction receipt using the provider.
    export const getTransactionReceiptHandler = async (input: any): Promise<ToolResultSchema> => {
      try {
        if (!input.transactionHash) {
          return createErrorResponse("Transaction hash is required");
        }
    
        const provider = getProvider();
        const receipt = await provider.getTransactionReceipt(input.transactionHash);
    
        return createSuccessResponse(
        `Transaction receipt retrieved successfully
          Transaction hash: ${input.transactionHash}
          Transaction receipt: ${receipt}
        `);
      } catch (error) {
        return createErrorResponse(`Failed to get transaction receipt: ${(error as Error).message}`);
      }
    };
  • The input schema definition for the provider_get_transaction_receipt tool.
    {
      name: "provider_get_transaction_receipt",
      description: "Get a transaction receipt",
      inputSchema: {
        type: "object",
        properties: {
          transactionHash: { type: "string", description: "The transaction hash" }
        },
        required: ["transactionHash"]
      }
    },
  • src/tools.ts:592-592 (registration)
    The registration of the handler in the tools handlers dictionary.
    "provider_get_transaction_receipt": getTransactionReceiptHandler,

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/dcSpark/mcp-cryptowallet-evm'

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