Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_ws_submit_transaction

Submit blockchain transactions via WebSocket to receive real-time status updates for monitoring and verification.

Instructions

Submit transaction via WebSocket and get real-time status updates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionYesTransaction object
signaturesYesArray of signature objects with public_key and sign_data
triggerNoOptional trigger object

Implementation Reference

  • src/index.ts:368-388 (registration)
    Tool registration in the tools array, defining name, description, and inputSchema for MCP tool listing.
    {
      name: "zetrix_ws_submit_transaction",
      description: "Submit transaction via WebSocket and get real-time status updates",
      inputSchema: {
        type: "object",
        properties: {
          transaction: {
            type: "object",
            description: "Transaction object",
          },
          signatures: {
            type: "array",
            description: "Array of signature objects with public_key and sign_data",
          },
          trigger: {
            type: "object",
            description: "Optional trigger object",
          },
        },
        required: ["transaction", "signatures"],
      },
  • MCP server request handler switch case that validates arguments, retrieves WebSocket client, calls submitTransaction, and returns the result.
    case "zetrix_ws_submit_transaction": {
      if (!args) {
        throw new Error("Missing arguments");
      }
      const wsClient = getWebSocketClient();
      const result = await wsClient.submitTransaction(
        args.transaction,
        args.signatures as Array<{ public_key: string; sign_data: string }>,
        args.trigger
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
  • Core tool logic implementation in ZetrixWebSocketClient: validates registration, constructs ChainSubmitTransactionRequest message, sends via WebSocket, sets up listener for tx_status response with timeout, resolves with ChainTxStatusResponse.
    submitTransaction(
      transaction: any,
      signatures: Array<{ public_key: string; sign_data: string }>,
      trigger?: any
    ): Promise<ChainTxStatusResponse> {
      return new Promise((resolve, reject) => {
        if (!this.isRegistered) {
          reject(new Error("WebSocket not registered. Call registerAndConnect first."));
          return;
        }
    
        const request: ChainSubmitTransactionRequest = {
          type: ChainMessageType.CHAIN_SUBMITTRANSACTION,
          transaction,
          signatures,
          trigger,
        };
    
        const timeout = setTimeout(() => {
          this.off("tx_status", onTxStatus);
          reject(new Error("Transaction submission timeout"));
        }, 30000);
    
        const onTxStatus = (response: ChainTxStatusResponse) => {
          clearTimeout(timeout);
          resolve(response);
        };
    
        this.once("tx_status", onTxStatus);
        this.sendMessage(request);
      });
    }
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 mentions 'real-time status updates' which hints at streaming behavior, but fails to disclose critical details: whether this is a blocking call, error handling, authentication requirements, rate limits, or what happens if the WebSocket is disconnected. For a mutation tool with zero annotation coverage, this is inadequate.

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 front-loads the core action and benefit. Every word earns its place with no redundancy or fluff, 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 the complexity of a WebSocket-based transaction submission with no annotations and no output schema, the description is insufficient. It omits behavioral traits (e.g., streaming nature, error cases), does not explain the return values or status update format, and provides no context on integration with other WebSocket tools like 'zetrix_ws_connect'.

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 already documents all three parameters (transaction, signatures, trigger). The description adds no additional meaning about parameter usage, formats, or examples beyond what's in the schema. Baseline 3 is appropriate when 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 ('Submit transaction via WebSocket') and the key benefit ('get real-time status updates'), which distinguishes it from the sibling 'zetrix_submit_transaction' that likely uses a different method. However, it doesn't specify what type of transaction (e.g., contract invocation, transfer) or the exact resource involved beyond the generic 'transaction'.

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 when real-time updates are needed via WebSocket, suggesting an alternative to non-WebSocket submission methods. However, it lacks explicit guidance on when to use this vs. 'zetrix_submit_transaction' or prerequisites like needing an active WebSocket connection from 'zetrix_ws_connect'.

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