Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_test_transaction

Simulate and evaluate transaction fees before submitting to the Zetrix blockchain, enabling cost estimation without network execution.

Instructions

Evaluate transaction fees without blockchain submission

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesArray of test transaction items

Implementation Reference

  • The core handler function in ZetrixClient class that performs a POST request to /testTransaction endpoint on the Zetrix RPC server to evaluate transaction fees without submission.
    async testTransaction(items: any[]): Promise<ZetrixTestTransactionResult> {
      try {
        const response = await this.client.post("/testTransaction", { items });
    
        if (response.data.error_code !== 0) {
          throw new Error(
            response.data.error_desc || `API Error: ${response.data.error_code}`
          );
        }
    
        return response.data.result;
      } catch (error) {
        if (axios.isAxiosError(error)) {
          throw new Error(`Failed to test transaction: ${error.message}`);
        }
        throw error;
      }
    }
  • src/index.ts:341-354 (registration)
    Tool registration in the tools array, defining name, description, and input schema.
    {
      name: "zetrix_test_transaction",
      description: "Evaluate transaction fees without blockchain submission",
      inputSchema: {
        type: "object",
        properties: {
          items: {
            type: "array",
            description: "Array of test transaction items",
          },
        },
        required: ["items"],
      },
    },
  • src/index.ts:1042-1055 (registration)
    MCP server request handler switch case that invokes the ZetrixClient.testTransaction method.
    case "zetrix_test_transaction": {
      if (!args) {
        throw new Error("Missing arguments");
      }
      const result = await zetrixClient.testTransaction(args.items as any[]);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • TypeScript interface defining the structure of the test transaction result returned by the Zetrix RPC API.
    export interface ZetrixTestTransactionResult {
      actual_fee: string;
      hash: string;
      logs: any;
      query_rets: any[];
      stat: any;
      txs: any[];
    }
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 of behavioral disclosure. It states the tool evaluates fees without submission, implying it's a read-only simulation, but does not disclose other traits such as rate limits, authentication needs, error handling, or what the evaluation entails (e.g., returns estimated costs). This leaves gaps in understanding the tool's behavior beyond the basic purpose.

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: 'Evaluate transaction fees without blockchain submission.' It is front-loaded with the core purpose, has zero wasted words, and is appropriately sized for the tool's complexity, making it easy to understand quickly.

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

Completeness3/5

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

Given the tool's moderate complexity (1 parameter, no output schema, no annotations), the description is minimally complete. It covers the purpose and implies usage but lacks details on behavioral traits and output format. Without annotations or an output schema, more context on what the evaluation returns would be beneficial, but the description is adequate for basic understanding.

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 'items' parameter documented as 'Array of test transaction items.' The description does not add further meaning beyond this, such as explaining what constitutes a 'test transaction item' or providing examples. Given the high schema coverage, a baseline score of 3 is appropriate, as the schema handles the parameter documentation adequately.

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: 'Evaluate transaction fees without blockchain submission.' It specifies the verb ('evaluate') and resource ('transaction fees') and distinguishes it from sibling tools like zetrix_submit_transaction by emphasizing 'without blockchain submission.' However, it doesn't explicitly differentiate from all siblings, such as zetrix_get_transaction, which might also involve transaction analysis but not fee evaluation.

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

Usage Guidelines3/5

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

The description implies usage context by stating 'without blockchain submission,' suggesting this tool is for testing or simulation rather than actual execution. However, it lacks explicit guidance on when to use this tool versus alternatives like zetrix_submit_transaction or other transaction-related siblings, and does not mention prerequisites or exclusions.

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