Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_crypto_validate_key

Validate private keys, public keys, or addresses for the Zetrix blockchain to ensure proper format and security before use in transactions or account operations.

Instructions

Validate private key, public key, or address format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesType of key to validate
valueYesThe key or address to validate

Implementation Reference

  • Tool handler that validates the input key type (privateKey, publicKey, or address) by calling the corresponding validation method on ZetrixEncryption instance and returns validation result.
    case "zetrix_crypto_validate_key": {
      if (!args) {
        throw new Error("Missing arguments");
      }
      let isValid = false;
      const type = args.type as string;
      const value = args.value as string;
    
      if (type === "privateKey") {
        isValid = await zetrixEncryption.isValidPrivateKey(value);
      } else if (type === "publicKey") {
        isValid = await zetrixEncryption.isValidPublicKey(value);
      } else if (type === "address") {
        isValid = await zetrixEncryption.isValidAddress(value);
      }
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({ type, value, isValid }, null, 2),
          },
        ],
      };
    }
  • Input schema definition for the tool, specifying parameters 'type' (enum: privateKey/publicKey/address) and 'value'.
    {
      name: "zetrix_crypto_validate_key",
      description: "Validate private key, public key, or address format",
      inputSchema: {
        type: "object",
        properties: {
          type: {
            type: "string",
            enum: ["privateKey", "publicKey", "address"],
            description: "Type of key to validate",
          },
          value: {
            type: "string",
            description: "The key or address to validate",
          },
        },
        required: ["type", "value"],
      },
    },
  • Helper method to validate private key format using the underlying zetrix-encryption-nodejs library's KeyPair.checkEncPrivateKey.
    async isValidPrivateKey(privateKey: string): Promise<boolean> {
      await this.initEncryption();
    
      try {
        return this.KeyPair.checkEncPrivateKey(privateKey);
      } catch (error) {
        return false;
      }
    }
  • Helper method to validate public key format using the underlying zetrix-encryption-nodejs library's KeyPair.checkEncPublicKey.
    async isValidPublicKey(publicKey: string): Promise<boolean> {
      await this.initEncryption();
    
      try {
        return this.KeyPair.checkEncPublicKey(publicKey);
      } catch (error) {
        return false;
      }
    }
  • Helper method to validate address format using the underlying zetrix-encryption-nodejs library's KeyPair.checkAddress.
    async isValidAddress(address: string): Promise<boolean> {
      await this.initEncryption();
    
      try {
        return this.KeyPair.checkAddress(address);
      } catch (error) {
        return false;
      }
    }
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 validates formats, but doesn't describe what validation entails (e.g., checksum verification, length checks, error handling), whether it's read-only or has side effects, or what the output might look like (e.g., success/failure, error messages). This leaves significant gaps for a tool with potential security implications.

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: 'Validate private key, public key, or address format.' It is front-loaded with the core purpose, has zero wasted words, and is appropriately sized for a simple validation tool. Every part of the sentence contributes directly to understanding the tool's function.

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 (cryptographic validation with no annotations and no output schema), the description is incomplete. It lacks details on validation behavior, output format (e.g., boolean result or error details), and how it differs from sibling tools. For a tool that could impact security decisions, more context is needed to be fully helpful to an AI agent.

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 clear descriptions for both parameters ('type' and 'value'). The description adds no additional parameter semantics beyond what the schema provides (e.g., it doesn't explain format expectations for 'value' or validation rules). Given the high schema coverage, a baseline score of 3 is appropriate.

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: 'Validate private key, public key, or address format.' It specifies the verb ('validate') and the resources (three types of cryptographic elements). However, it doesn't explicitly distinguish this validation tool from sibling tools like 'zetrix_crypto_get_address' or 'zetrix_crypto_get_public_key', which might retrieve rather than validate these elements.

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 key/address to validate), exclusions, or comparisons to siblings like 'zetrix_create_keypair' or 'zetrix_crypto_generate_keypair', which might generate keys rather than validate them. Usage is implied but not explicitly stated.

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