Skip to main content
Glama

get-transaction-receipt

Retrieve blockchain transaction details using a transaction hash to verify status and confirmations through the MCPilot server.

Instructions

Get the Transaction Receipt given a Transaction hash

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYes
chainIdNo

Implementation Reference

  • The execute handler that fetches and returns the transaction receipt using wagmi's getTransactionReceipt function.
    execute: async (args) => {
      const hash = args.hash as Address
      const chainId = args.chainId as typeof wagmiConfig['chains'][number]['id']
      const result = await getTransactionReceipt(wagmiConfig, {
        hash,
        chainId,
      })
      return {
        content: [
          {
            type: "text",
            text: JSONStringify(result),
          },
        ],
      }
    },
  • Zod input schema defining parameters: hash (required string) and chainId (optional number).
    parameters: z.object({
      hash: z.string(),
      chainId: z.coerce.number().optional(),
    }),
  • Tool definition and registration block within the registerGetTransactionReceiptTools function, including name, description, schema, and handler.
    server.addTool({
      name: "get-transaction-receipt",
      description: "Get the Transaction Receipt given a Transaction hash",
      parameters: z.object({
        hash: z.string(),
        chainId: z.coerce.number().optional(),
      }),
      execute: async (args) => {
        const hash = args.hash as Address
        const chainId = args.chainId as typeof wagmiConfig['chains'][number]['id']
        const result = await getTransactionReceipt(wagmiConfig, {
          hash,
          chainId,
        })
        return {
          content: [
            {
              type: "text",
              text: JSONStringify(result),
            },
          ],
        }
      },
    });
  • Top-level registration call that adds the tool to the main FastMCP server instance.
    registerGetTransactionReceiptTools(server);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves a transaction receipt but doesn't clarify whether this is a read-only operation, what happens if the hash is invalid or the transaction is pending, or if there are rate limits or authentication requirements. This leaves significant behavioral gaps for a tool that likely interacts with blockchain data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with zero wasted words: 'Get the Transaction Receipt given a Transaction hash'. It is front-loaded and efficiently communicates the core function without unnecessary elaboration, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of blockchain interactions, no annotations, no output schema, and low parameter coverage, the description is incomplete. It doesn't address what a transaction receipt contains, error conditions, or how it differs from related tools. For a tool with two parameters and likely nuanced behavior, more context is needed to be fully helpful.

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?

The description mentions the 'hash' parameter but not 'chainId', and with 0% schema description coverage, the schema provides no parameter details. The description adds minimal semantics by indicating 'hash' is a transaction hash, but it doesn't explain the format (e.g., hex string) or purpose of 'chainId' (e.g., for multi-chain contexts). This partial compensation warrants a baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get the Transaction Receipt given a Transaction hash'. It specifies the verb ('Get'), resource ('Transaction Receipt'), and key input ('Transaction hash'), making the function unambiguous. However, it doesn't explicitly distinguish this tool from its sibling 'get-transaction' or 'wait-for-transaction-receipt', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get-transaction' (which retrieves transaction details) or 'wait-for-transaction-receipt' (which waits for and retrieves a receipt). It also doesn't mention prerequisites, such as needing a valid transaction hash from a confirmed transaction, leaving usage context implied rather than explicit.

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/Xiawpohr/mcpilot'

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