Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_get_transaction_blob

Serialize Zetrix blockchain transaction data into hexadecimal format for secure transmission and processing.

Instructions

Serialize transaction data into hexadecimal format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionYesTransaction object with source_address, nonce, fee_limit, gas_price, operations

Implementation Reference

  • Core handler function in ZetrixClient that serializes transaction data by calling the RPC endpoint /getTransactionBlob and handles errors.
    async getTransactionBlob(transaction: any): Promise<ZetrixTransactionBlob> {
      try {
        const response = await this.client.post("/getTransactionBlob", transaction);
    
        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 get transaction blob: ${error.message}`);
        }
        throw error;
      }
    }
  • src/index.ts:268-281 (registration)
    MCP tool registration defining the name, description, and input schema.
    {
      name: "zetrix_get_transaction_blob",
      description: "Serialize transaction data into hexadecimal format",
      inputSchema: {
        type: "object",
        properties: {
          transaction: {
            type: "object",
            description: "Transaction object with source_address, nonce, fee_limit, gas_price, operations",
          },
        },
        required: ["transaction"],
      },
    },
  • Input schema for validating the transaction object parameter.
    inputSchema: {
      type: "object",
      properties: {
        transaction: {
          type: "object",
          description: "Transaction object with source_address, nonce, fee_limit, gas_price, operations",
        },
      },
      required: ["transaction"],
    },
  • MCP server dispatch handler that receives the tool call and delegates to ZetrixClient.getTransactionBlob.
    case "zetrix_get_transaction_blob": {
      if (!args) {
        throw new Error("Missing arguments");
      }
      const result = await zetrixClient.getTransactionBlob(args.transaction);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
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 serializes data but doesn't reveal if this is read-only, whether it validates the transaction object, potential error conditions, or performance aspects like rate limits. For a tool with no annotation coverage, this is a significant gap in transparency.

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 key action and output. There is no wasted verbiage or redundancy, making it easy for an agent to parse quickly. It earns its place by succinctly conveying the core functionality.

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 (serialization tool with nested object parameter) and lack of annotations and output schema, the description is incomplete. It doesn't explain what the hexadecimal output represents, how errors are handled, or dependencies on other tools. For a tool in a rich sibling environment, more context is needed to ensure proper usage.

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 'transaction' fully documented in the schema as an object with specific fields. The description adds no additional semantic details about the parameter beyond implying it's the input data. Given the high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 ('Serialize') and the resource ('transaction data'), specifying the output format ('hexadecimal format'). It distinguishes from siblings like zetrix_submit_transaction or zetrix_get_transaction by focusing on serialization rather than submission or retrieval. However, it doesn't explicitly differentiate from all siblings, such as those involving contract calls or SDK operations, which slightly limits its specificity.

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 (e.g., needing a valid transaction object), exclusions, or comparisons to siblings like zetrix_submit_transaction (which might handle serialization internally). This leaves the agent without context for tool selection in a crowded sibling set.

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