Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_crypto_generate_keypair

Generate a new Zetrix blockchain key pair with private key, public key, and address for secure account creation and transaction signing.

Instructions

Generate a new Zetrix key pair with private key, public key, and address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:528-535 (registration)
    Tool registration including name, description, and input schema (empty object)
    {
      name: "zetrix_crypto_generate_keypair",
      description: "Generate a new Zetrix key pair with private key, public key, and address",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • MCP server dispatch handler that calls the encryption module's generateKeyPair method
    case "zetrix_crypto_generate_keypair": {
      const keyPair = await zetrixEncryption.generateKeyPair();
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(keyPair, null, 2),
          },
        ],
      };
    }
  • Core implementation of key pair generation using the official zetrix-encryption-nodejs library
    async generateKeyPair(): Promise<ZetrixKeyPair> {
      await this.initEncryption();
    
      try {
        const kp = new this.KeyPair();
        return {
          privateKey: kp.getEncPrivateKey(),
          publicKey: kp.getEncPublicKey(),
          address: kp.getAddress(),
        };
      } catch (error) {
        throw new Error(
          `Failed to generate key pair: ${error instanceof Error ? error.message : String(error)}`
        );
      }
    }
  • TypeScript interface defining the structure of the returned key pair object
    export interface ZetrixKeyPair {
      privateKey: string;
      publicKey: string;
      address: string;
    }
  • Lazy initialization of the external zetrix-encryption-nodejs library used by generateKeyPair
    private async initEncryption() {
      if (this.encryption) return;
    
      try {
        // Dynamically import the CommonJS module
        const module = await import("zetrix-encryption-nodejs");
        this.encryption = module.default || module;
        this.KeyPair = this.encryption.keypair;
        this.signature = this.encryption.signature;
        this.keystore = this.encryption.keystore;
      } catch (error) {
        throw new Error(
          `Failed to initialize Zetrix Encryption: ${error instanceof Error ? error.message : String(error)}`
        );
      }
    }
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 mentions the outputs but doesn't cover critical aspects like whether this operation is safe (e.g., read-only or involves sensitive data generation), if it requires authentication, rate limits, or how the keys are generated (e.g., randomness, algorithm). This leaves significant gaps for a tool that likely handles cryptographic keys.

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, well-structured sentence that directly states what the tool does and its outputs, with no wasted words. It's front-loaded and easy to parse, making it highly efficient for an agent 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 has 0 parameters and no output schema, the description adequately covers the basic purpose. However, for a crypto key generation tool with no annotations, it lacks details on security implications, output format, or error handling, which could be important for safe and effective use. The absence of an output schema means the description doesn't compensate by explaining return values.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameters need documentation. The description doesn't add parameter details, which is acceptable here as there are none to explain. It efficiently focuses on the tool's purpose without unnecessary repetition.

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 ('Generate a new Zetrix key pair') and the outputs ('private key, public key, and address'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from the sibling tool 'zetrix_create_keypair', which appears to serve a similar function, leaving some ambiguity about when to choose one over the other.

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, such as the sibling 'zetrix_create_keypair' or other crypto-related tools. It lacks context about prerequisites, typical use cases, or any exclusions, leaving the agent without clear usage instructions.

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