Skip to main content
Glama

provider_get_transaction

Retrieve Ethereum or EVM-compatible blockchain transaction details by inputting the transaction hash, enabling efficient blockchain query and analysis.

Instructions

Get a transaction by hash

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionHashYesThe transaction hash

Implementation Reference

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

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

No annotations are provided, so the description carries full burden. It states 'Get' implies a read operation, but doesn't disclose behavioral traits like whether it requires authentication, rate limits, error handling, or what happens if the hash is invalid. For a tool with zero annotation coverage, this is a significant gap, scoring a 2.

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, efficient sentence: 'Get a transaction by hash'. It's front-loaded with the core action and resource, with zero waste or unnecessary details, earning a 5.

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 no annotations, no output schema, and a simple parameter, the description is incomplete. It doesn't explain return values, error cases, or behavioral context, which is inadequate for a tool that retrieves transactional data. With minimal added value beyond the schema, it scores a 2.

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 description coverage is 100%, with the parameter 'transactionHash' fully documented in the schema. The description adds no additional meaning beyond implying retrieval by hash, which is already covered. Baseline is 3 when schema does the heavy lifting, so it scores a 3.

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 'Get a transaction by hash' clearly states the verb ('Get') and resource ('transaction'), specifying it's retrieved via hash. It distinguishes from siblings like provider_get_transaction_receipt (which gets receipt) and wallet_get_transaction_count (which gets count), but doesn't explicitly differentiate beyond the hash parameter. This is clear but lacks explicit sibling differentiation, warranting a 4.

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. It doesn't mention context, prerequisites, or exclusions, such as when to use provider_get_transaction_receipt instead for receipt details or network_get_block for block-level data. With no usage instructions, it scores a 2.

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

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

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