Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_crypto_get_public_key

Derive a public key from an encrypted private key for secure Zetrix blockchain account operations.

Instructions

Derive public key from private key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
privateKeyYesThe encrypted private key

Implementation Reference

  • src/index.ts:536-549 (registration)
    Tool registration including name, description, and input schema definition.
    {
      name: "zetrix_crypto_get_public_key",
      description: "Derive public key from private key",
      inputSchema: {
        type: "object",
        properties: {
          privateKey: {
            type: "string",
            description: "The encrypted private key",
          },
        },
        required: ["privateKey"],
      },
    },
  • MCP server handler for the tool: validates input, calls encryption helper, returns public key in MCP response format.
    case "zetrix_crypto_get_public_key": {
      if (!args) {
        throw new Error("Missing arguments");
      }
      const publicKey = await zetrixEncryption.getPublicKeyFromPrivate(
        args.privateKey as string
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({ publicKey }, null, 2),
          },
        ],
      };
    }
  • Helper function in ZetrixEncryption class that derives the encrypted public key from encrypted private key using official zetrix-encryption-nodejs library.
    async getPublicKeyFromPrivate(privateKey: string): Promise<string> {
      await this.initEncryption();
    
      try {
        return this.KeyPair.getEncPublicKey(privateKey);
      } catch (error) {
        throw new Error(
          `Failed to derive public key: ${error instanceof Error ? error.message : String(error)}`
        );
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states the basic operation without behavioral details. It doesn't disclose if this is a read-only operation, what cryptographic algorithm is used, error conditions (e.g., invalid key format), performance implications, or security considerations like handling sensitive private key input.

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, front-loaded sentence with zero wasted words—it directly states the tool's purpose without unnecessary elaboration. Every word earns its place, making it highly efficient for quick understanding.

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 operation with a private key input), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the output is (e.g., public key format), error handling, or security context, leaving significant gaps for an AI agent to use this tool effectively.

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 'privateKey' parameter is fully documented in the schema as 'The encrypted private key'), so the baseline is 3. The description adds no additional parameter meaning beyond what the schema provides, such as format specifics (e.g., hex encoding) or encryption details.

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 ('Derive') and target resource ('public key from private key'), making the purpose immediately understandable. It doesn't distinguish from sibling tools like 'zetrix_crypto_generate_keypair' or 'zetrix_crypto_get_address', but it's specific enough to avoid confusion about its core function.

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 private key first), compare to 'zetrix_crypto_generate_keypair' (which might create both keys), or specify use cases like key derivation for transactions or verification.

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