UNPKG

it-tools-mcp

Version:

Full MCP 2025-06-18 compliant server with 121+ IT tools, logging, ping, progress tracking, cancellation, and sampling utilities

30 lines (29 loc) 914 B
import { z } from "zod"; export function registerTextKebabcase(server) { server.registerTool("convert_text_to_kebabcase", { description: "Convert text to kebab-case", inputSchema: { text: z.string().describe("Text to convert to kebab-case"), }, // VS Code compliance annotations annotations: { title: "Convert Text To Kebabcase", description: "Convert text to kebab-case", readOnlyHint: false } }, async ({ text }) => { const kebabCase = text .replace(/([a-z])([A-Z])/g, '$1-$2') .replace(/[^a-zA-Z0-9]+/g, '-') .toLowerCase() .replace(/^-+|-+$/g, ''); return { content: [ { type: "text", text: `kebab-case: ${kebabCase}`, }, ], }; }); }