hash-sha512
Generate SHA512 hash for any input text using this tool. Convert plaintext into a secure 128-character hexadecimal hash, ideal for data integrity and security applications.
Instructions
Generate SHA512 hash
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to hash with SHA512 |
Implementation Reference
- The handler function computes the SHA512 hash of the input text using Node.js crypto module and returns the hex digest prefixed with 'SHA512 hash:' in a structured text response.}, async ({ text }) => { const hash = createHash('sha512'); hash.update(text); const result = hash.digest('hex'); return { content: [ { type: "text", text: `SHA512 hash: ${result}`, }, ], }; }
- Input schema defining a single string parameter 'text' for the text to be hashed.description: "Generate SHA512 hash", inputSchema: { text: z.string().describe("Text to hash with SHA512"),
- src/tools/crypto/hash_sha512/index.ts:5-31 (registration)Registration of the 'hash_sha512' tool with the MCP server, including description, schema, annotations, and handler.export function registerHashSha512(server: McpServer) { server.registerTool("hash_sha512", { description: "Generate SHA512 hash", inputSchema: { text: z.string().describe("Text to hash with SHA512"), }, // VS Code compliance annotations annotations: { title: "Hash Sha512", description: "Generate SHA512 hash", readOnlyHint: false } }, async ({ text }) => { const hash = createHash('sha512'); hash.update(text); const result = hash.digest('hex'); return { content: [ { type: "text", text: `SHA512 hash: ${result}`, }, ], }; } ); }