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) • 1.04 kB
JavaScript
import { z } from "zod";
export function registerTextCamelcase(server) {
server.registerTool("convert_text_to_camelcase", {
description: "Convert text to camelCase format. Example: 'hello world' → 'helloWorld', 'my-variable-name' → 'myVariableName'",
inputSchema: {
text: z.string().describe("Text to convert to camelCase"),
},
// VS Code compliance annotations
annotations: {
title: "Convert to camelCase",
description: "Convert text to camelCase naming convention",
readOnlyHint: false
}
}, async ({ text }) => {
const camelCase = text
.replace(/(?:^\w|[A-Z]|\b\w)/g, (word, index) => {
return index === 0 ? word.toLowerCase() : word.toUpperCase();
})
.replace(/\s+/g, '');
return {
content: [
{
type: "text",
text: `camelCase: ${camelCase}`,
},
],
};
});
}