it-tools-mcp
Version:
MCP-compliant server access to over 100 IT tools and utilities commonly used by developers, system administrators, and IT professionals.
26 lines (25 loc) • 761 B
JavaScript
import { z } from "zod";
export function registerTextPascalcase(server) {
server.registerTool("convert_text_to_pascalcase", {
inputSchema: {
text: z.string().describe("Text to convert to PascalCase"),
},
// VS Code compliance annotations
annotations: {
title: "Convert Text To Pascalcase",
readOnlyHint: false
}
}, async ({ text }) => {
const pascalCase = text
.replace(/(?:^\w|[A-Z]|\b\w)/g, word => word.toUpperCase())
.replace(/\s+/g, '');
return {
content: [
{
type: "text",
text: `PascalCase: ${pascalCase}`,
},
],
};
});
}