Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_sdk_get_nonce

Retrieve the transaction sequence number (nonce) for a Zetrix blockchain account to ensure proper transaction ordering and prevent replay attacks.

Instructions

Get account nonce (transaction sequence number)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe Zetrix account address

Implementation Reference

  • Core implementation of getNonce that wraps the official zetrix-sdk-nodejs SDK's account.getNonce method.
    async getNonce(address: string): Promise<number> {
      await this.initSDK();
    
      try {
        const result = await this.sdk.account.getNonce(address);
    
        if (result.errorCode !== 0) {
          throw new Error(result.errorDesc || `SDK Error: ${result.errorCode}`);
        }
    
        return result.result.nonce;
      } catch (error) {
        throw new Error(
          `Failed to get nonce: ${error instanceof Error ? error.message : String(error)}`
        );
      }
    }
  • MCP server handler for the tool that extracts arguments and calls ZetrixSDK.getNonce.
    case "zetrix_sdk_get_nonce": {
      if (!args) {
        throw new Error("Missing arguments");
      }
      const nonce = await zetrixSDK.getNonce(args.address as string);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({ address: args.address, nonce }, null, 2),
          },
        ],
      };
    }
  • src/index.ts:456-469 (registration)
    Tool registration in the MCP tools list, including name, description, and input schema.
    {
      name: "zetrix_sdk_get_nonce",
      description: "Get account nonce (transaction sequence number)",
      inputSchema: {
        type: "object",
        properties: {
          address: {
            type: "string",
            description: "The Zetrix account address",
          },
        },
        required: ["address"],
      },
    },
  • Input schema definition for the tool.
      inputSchema: {
        type: "object",
        properties: {
          address: {
            type: "string",
            description: "The Zetrix account address",
          },
        },
        required: ["address"],
      },
    },
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 what the tool does ('Get account nonce') but lacks behavioral details: it doesn't specify if this is a read-only operation (implied but not explicit), potential errors (e.g., invalid address), rate limits, network calls, or return format. For a tool with zero annotation coverage, this is insufficient disclosure.

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 with the core purpose and includes a helpful parenthetical clarification. Every word earns its place, making it easy to parse quickly without unnecessary elaboration.

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, no output schema, and a simple parameter (100% schema coverage), the description is incomplete. It lacks behavioral context (e.g., safety, errors, return format) and usage guidance, which are critical for an AI agent to invoke this correctly in a blockchain context. The conciseness comes at the cost of necessary detail.

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% (the 'address' parameter is fully described in the schema), so the baseline is 3. The description doesn't add any parameter-specific information beyond what's in the schema—it doesn't explain address format, validation, or examples. It meets the minimum for adequate parameter documentation given the schema's completeness.

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 ('account nonce'), with the parenthetical clarifying it's a 'transaction sequence number'. It distinguishes from siblings like 'zetrix_get_account' or 'zetrix_get_transaction' by focusing specifically on nonce retrieval. However, it doesn't explicitly differentiate from all possible alternatives in the sibling list.

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. The description doesn't mention prerequisites (e.g., needing an address), use cases (e.g., before submitting a transaction), or comparisons to siblings like 'zetrix_get_account' which might also provide nonce information. It's a basic functional statement without contextual advice.

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