Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

get_transaction

Retrieve transaction details by hash from Arbitrum networks to analyze blockchain activity and verify transaction status.

Instructions

Get transaction details by hash

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rpcUrlNoThe RPC URL of the chain (optional if default is set)
txHashYesTransaction hash

Implementation Reference

  • Main handler for the 'get_transaction' MCP tool. Resolves the RPC URL using chain name or provided URL, creates an EthereumAccountClient instance, fetches the transaction by hash, and returns the JSON-formatted transaction details.
    case "get_transaction": {
      const rpcUrl = await this.resolveRpcUrl(
        (args.rpcUrl as string) || (args.chainName as string)
      );
      const ethereumAccountClient = new EthereumAccountClient(rpcUrl);
      const tx = await ethereumAccountClient.getTransaction(
        args.txHash as string
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(tx, null, 2),
          },
        ],
      };
    }
  • Tool schema definition including input schema for 'get_transaction', specifying parameters rpcUrl (optional) and required txHash. Used in list tools response for registration.
    {
      name: "get_transaction",
      description: "Get transaction details by hash",
      inputSchema: {
        type: "object" as const,
        properties: {
          rpcUrl: {
            type: "string",
            description:
              "The RPC URL of the chain (optional if default is set)",
          },
          txHash: {
            type: "string",
            description: "Transaction hash",
          },
        },
        required: ["txHash"],
      },
    },
  • Core helper function that performs the eth_getTransactionByHash RPC call, parses the raw transaction response into a typed Transaction object, and handles missing transaction errors.
    async getTransaction(txHash: string): Promise<Transaction> {
      const tx = await this.makeRpcCall('eth_getTransactionByHash', [txHash]);
      if (!tx) {
        throw new Error(`Transaction ${txHash} not found`);
      }
      
      return {
        hash: tx.hash,
        nonce: parseInt(tx.nonce, 16),
        blockHash: tx.blockHash,
        blockNumber: tx.blockNumber ? parseInt(tx.blockNumber, 16) : null,
        transactionIndex: tx.transactionIndex ? parseInt(tx.transactionIndex, 16) : null,
        from: tx.from,
        to: tx.to,
        value: tx.value,
        gasPrice: tx.gasPrice,
        gas: parseInt(tx.gas, 16),
        input: tx.input
      };
    }
  • TypeScript interface defining the structure of the Transaction object returned by the getTransaction helper.
    export interface Transaction {
      hash: string;
      nonce: number;
      blockHash: string | null;
      blockNumber: number | null;
      transactionIndex: number | null;
      from: string;
      to: string | null;
      value: string;
      gasPrice: string;
      gas: number;
      input: string;
    }
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 a read operation ('Get'), implying it's non-destructive, but doesn't disclose behavioral traits like error handling, rate limits, authentication needs, or what 'details' include. This is inadequate for a tool with no annotation coverage.

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 with zero waste. It's front-loaded and appropriately sized for a simple lookup tool, making it easy to parse quickly.

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 and no output schema, the description is incomplete. It doesn't explain what 'details' are returned, error conditions, or how it differs from siblings. For a tool in a complex environment with many alternatives, this leaves significant gaps.

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%, so the schema fully documents both parameters. The description adds no meaning beyond the schema—it doesn't explain parameter interactions, format specifics, or examples. Baseline 3 is appropriate as the schema does the heavy lifting.

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 action ('Get') and resource ('transaction details'), specifying it retrieves details by hash. It's specific about the lookup mechanism but doesn't differentiate from sibling tools like 'get_transaction_receipt' or 'arbtrace_transaction', which appear to serve similar purposes.

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?

No guidance is provided on when to use this tool versus alternatives. With siblings like 'get_transaction_receipt' and 'arbtrace_transaction' available, the description lacks any context about differences, prerequisites, or exclusions, leaving usage unclear.

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/dewanshparashar/arbitrum-mcp'

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