hash-sha1
Generate SHA1 hash from any input text using the IT Tools MCP Server. This tool ensures secure hashing for data integrity and verification purposes.
Instructions
Generate SHA1 hash
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to hash with SHA1 |
Implementation Reference
- The handler function for the 'hash_sha1' tool. Computes SHA1 hash of input text using crypto.createHash and returns hex digest in text content.}, async ({ text }) => { const hash = createHash('sha1'); hash.update(text); const result = hash.digest('hex'); return { content: [ { type: "text", text: `SHA1 hash: ${result}`, }, ], }; }
- Input schema and annotations for the 'hash_sha1' tool, including Zod validation for the 'text' parameter and metadata like title and description.description: "Generate SHA1 hash", inputSchema: { text: z.string().describe("Text to hash with SHA1"), }, // VS Code compliance annotations annotations: { title: "Hash Sha1", description: "Generate SHA1 hash", readOnlyHint: false }
- src/tools/crypto/hash_sha1/index.ts:5-31 (registration)The exported registration function that adds the 'hash_sha1' tool to the MCP server using server.registerTool.export function registerHashSha1(server: McpServer) { server.registerTool("hash_sha1", { description: "Generate SHA1 hash", inputSchema: { text: z.string().describe("Text to hash with SHA1"), }, // VS Code compliance annotations annotations: { title: "Hash Sha1", description: "Generate SHA1 hash", readOnlyHint: false } }, async ({ text }) => { const hash = createHash('sha1'); hash.update(text); const result = hash.digest('hex'); return { content: [ { type: "text", text: `SHA1 hash: ${result}`, }, ], }; } ); }