Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_crypto_sign

Sign messages with a private key on the Zetrix blockchain to authenticate transactions and verify data integrity.

Instructions

Sign a message with a private key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesThe message to sign (hex string)
privateKeyYesThe private key to sign with

Implementation Reference

  • Core implementation of the cryptographic signing function using the zetrix-encryption-nodejs library's signature.sign method.
    async sign(message: string, privateKey: string): Promise<ZetrixSignature> {
      await this.initEncryption();
    
      try {
        const signData = this.signature.sign(message, privateKey);
        const publicKey = this.KeyPair.getEncPublicKey(privateKey);
    
        return {
          signData,
          publicKey,
        };
      } catch (error) {
        throw new Error(
          `Failed to sign message: ${error instanceof Error ? error.message : String(error)}`
        );
      }
    }
  • MCP server tool handler for 'zetrix_crypto_sign' that validates input, calls ZetrixEncryption.sign, and formats the response.
    case "zetrix_crypto_sign": {
      if (!args) {
        throw new Error("Missing arguments");
      }
      const signature = await zetrixEncryption.sign(
        args.message as string,
        args.privateKey as string
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(signature, null, 2),
          },
        ],
      };
    }
  • Input schema definition for the 'zetrix_crypto_sign' tool, specifying required message and privateKey parameters.
    {
      name: "zetrix_crypto_sign",
      description: "Sign a message with a private key",
      inputSchema: {
        type: "object",
        properties: {
          message: {
            type: "string",
            description: "The message to sign (hex string)",
          },
          privateKey: {
            type: "string",
            description: "The private key to sign with",
          },
        },
        required: ["message", "privateKey"],
      },
    },
  • src/index.ts:768-770 (registration)
    Registration of all tools list handler, which exposes the 'zetrix_crypto_sign' tool via the tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
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 action without disclosing critical behaviors. It doesn't mention security implications (e.g., private key handling), output format (e.g., returns a signature as hex), error conditions, or side effects like whether the key is stored or modified.

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 directly states the tool's function without unnecessary words. It's front-loaded and wastes no space, making it easy to parse quickly.

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 of cryptographic operations, no annotations, and no output schema, the description is incomplete. It lacks details on return values (e.g., signature format), error handling, security warnings, or how it integrates with sibling tools, leaving significant gaps for 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?

Schema description coverage is 100%, with both parameters ('message' and 'privateKey') well-documented in the schema. The description adds no additional meaning beyond the schema, such as format details (e.g., 'message' as hex string is already in schema) or constraints, so it meets the baseline for high coverage.

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 ('sign a message') and the resource ('with a private key'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'zetrix_crypto_verify' (which likely verifies signatures) or 'zetrix_crypto_generate_keypair' (which creates keys), missing explicit distinction.

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. For example, it doesn't mention when to choose this over 'zetrix_crypto_verify' for signature operations or relate to key generation tools. The description offers no context about prerequisites or typical use cases.

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