Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_get_transaction

Retrieve detailed transaction information from the Zetrix blockchain using a transaction hash to verify status, confirmations, and data.

Instructions

Get transaction details by transaction hash

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hashYesThe transaction hash

Implementation Reference

  • src/index.ts:106-118 (registration)
    Tool registration in the MCP tools list, including name, description, and input schema definition.
      name: "zetrix_get_transaction",
      description: "Get transaction details by transaction hash",
      inputSchema: {
        type: "object",
        properties: {
          hash: {
            type: "string",
            description: "The transaction hash",
          },
        },
        required: ["hash"],
      },
    },
  • MCP server request handler for the tool: extracts arguments, calls ZetrixClient.getTransaction, and formats response.
    case "zetrix_get_transaction": {
      if (!args) {
        throw new Error("Missing arguments");
      }
      const result = await zetrixClient.getTransaction(args.hash as string);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Core implementation of getTransaction: makes HTTP GET to Zetrix node /getTransactionHistory endpoint with hash parameter, processes response, extracts and formats transaction details, handles errors.
    async getTransaction(hash: string): Promise<ZetrixTransaction> {
      try {
        const response = await this.client.get("/getTransactionHistory", {
          params: { hash },
        });
    
        if (response.data.error_code !== 0) {
          throw new Error(
            response.data.error_desc || `API Error: ${response.data.error_code}`
          );
        }
    
        const tx = response.data.result.transactions[0];
        const txData = tx.transaction || tx;
        return {
          hash: tx.hash || hash,
          blockNumber: tx.ledger_seq || 0,
          timestamp: tx.close_time || 0,
          sourceAddress: txData.source_address || "",
          feeLimit: txData.fee_limit || "0",
          gasPrice: txData.gas_price || "0",
          nonce: txData.nonce || 0,
          operations: txData.operations,
          status: tx.error_code === 0 ? "success" : "failed",
        };
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new Error(`Failed to get transaction: ${error.message}`);
        }
        throw error;
      }
    }
  • TypeScript interface defining the structure of the transaction data returned by getTransaction method.
    export interface ZetrixTransaction {
      hash: string;
      blockNumber: number;
      timestamp: number;
      sourceAddress: string;
      feeLimit: string;
      gasPrice: string;
      nonce: number;
      operations?: any[];
      status: string;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states 'Get transaction details' which implies a read-only operation, but doesn't disclose behavioral traits such as authentication requirements, rate limits, error handling, or what 'details' include (e.g., status, timestamp, fees). 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 that directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized, with every part contributing essential information.

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 'transaction details' include (e.g., JSON structure, fields), potential errors, or behavioral context. For a tool with rich sibling tools and no structured support, this leaves significant gaps for an AI agent.

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 input schema has 100% description coverage, with the 'hash' parameter fully documented. The description adds no additional meaning beyond the schema, such as hash format or validation rules. According to rules, baseline is 3 when schema coverage is high (>80%) and no param info is in the description.

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 verb ('Get') and resource ('transaction details'), specifying the action and target. It distinguishes from some siblings like 'zetrix_get_transaction_history' by focusing on a single transaction via hash, but doesn't explicitly differentiate from all similar tools like 'zetrix_get_transaction_blob' or 'zetrix_get_transaction_cache'.

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 prerequisites, context, or compare with sibling tools like 'zetrix_get_transaction_history' for historical data or 'zetrix_get_transaction_blob' for raw data, leaving the agent to infer usage.

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/Zetrix-Chain/zetrix-mcp-server'

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