Skip to main content
Glama

sha384

Calculate SHA-384 cryptographic hash for data integrity verification and security applications within the Crypto_MCP server environment.

Instructions

Calculate SHA-384 hash of a string

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesThe input string to hash

Implementation Reference

  • Handler function for the sha384 MCP tool. It invokes DigestUtil.sha384 on the input string and formats the result as MCP text content.
    ({ input }) => {
      const hash = DigestUtil.sha384(input);
      return {
        content: [{ type: "text", text: hash }],
      };
    }
  • Input schema definition for the sha384 tool using Zod, specifying a string parameter.
    {
      input: z.string().describe("The input string to hash"),
    },
  • Registration of the sha384 tool via server.tool call within registerDigestTool function.
    server.tool(
      "sha384",
      "Calculate SHA-384 hash of a string",
      {
        input: z.string().describe("The input string to hash"),
      },
      ({ input }) => {
        const hash = DigestUtil.sha384(input);
        return {
          content: [{ type: "text", text: hash }],
        };
      }
    );
  • Core implementation of SHA-384 hashing in DigestUtil class using CryptoJS library.
    static sha384(input: string): string {
      const hash = CryptoJS.SHA384(input);
      return hash.toString();
    }
  • src/index.ts:16-16 (registration)
    Top-level registration call that invokes registerDigestTool on the main McpServer instance, thereby registering the sha384 tool.
    registerDigestTool(server);

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/1595901624/crypto-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server