Skip to main content
Glama

get_transaction_receipts

Retrieve transaction receipts for a specific blockchain block using either block hash or block number to verify transaction outcomes and status.

Instructions

Get transaction receipts for a block

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockHashNoThe hash of the block
blockNumberNoThe number of the block

Implementation Reference

  • index.ts:830-847 (registration)
    Registration of the get_transaction_receipts tool in the ListToolsRequestSchema handler, including name, description, and detailed inputSchema for blockHash or blockNumber.
    {
      name: "get_transaction_receipts",
      description: "Get transaction receipts for a block",
      inputSchema: {
        type: "object",
        properties: {
          blockHash: {
            type: "string",
            description: "The hash of the block",
          },
          blockNumber: {
            type: "string",
            description: "The number of the block",
          },
        },
        oneOf: [{ required: ["blockHash"] }, { required: ["blockNumber"] }],
      },
    },
  • Type definition for the input parameters of get_transaction_receipts, aliasing Alchemy SDK's TransactionReceiptsParams.
    type GetTransactionReceiptsParams = TransactionReceiptsParams;
  • Helper validation function to type-guard and validate the input arguments for the get_transaction_receipts tool.
    const isValidGetTransactionReceiptsParams = (
      args: any
    ): args is GetTransactionReceiptsParams => {
      return (
        typeof args === "object" &&
        args !== null &&
        (args.blockHash !== undefined || args.blockNumber !== undefined) &&
        (args.blockHash === undefined || typeof args.blockHash === "string") &&
        (args.blockNumber === undefined ||
          typeof args.blockNumber === "string" ||
          typeof args.blockNumber === "number")
      );
    };

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/itsanishjain/alchemy-sdk-mcp'

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