UNPKG

it-tools-mcp

Version:

MCP-compliant server access to over 100 IT tools and utilities commonly used by developers, system administrators, and IT professionals.

27 lines (26 loc) 719 B
import { createHash } from "crypto"; import { z } from "zod"; export function registerHashSha1(server) { server.registerTool("hash_sha1", { inputSchema: { text: z.string().describe("Text to hash with SHA1"), }, // VS Code compliance annotations annotations: { title: "Hash Sha1", readOnlyHint: false } }, async ({ text }) => { const hash = createHash('sha1'); hash.update(text); const result = hash.digest('hex'); return { content: [ { type: "text", text: `SHA1 hash: ${result}`, }, ], }; }); }