it-tools-mcp 4.0.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js
CHANGED
|
@@ -885,4 +885,10 @@ function extractReadmeSection(content, heading) {
|
|
|
885
885
|
: lines.slice(startIndex, endIndex);
|
|
886
886
|
return sectionLines.join('\n');
|
|
887
887
|
}
|
|
888
|
-
//
|
|
888
|
+
// Start the server if this file is executed directly
|
|
889
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
890
|
+
main().catch((error) => {
|
|
891
|
+
console.error("Fatal error starting MCP server:", error);
|
|
892
|
+
process.exit(1);
|
|
893
|
+
});
|
|
894
|
+
}
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export function registerTextSnakecase(server) {
|
|
3
|
+
server.registerTool("text_snakecase", {
|
|
4
|
+
description: "Convert text to snake_case",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
text: z.string().describe("Text to convert to snake_case"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Convert Text To Snake Case",
|
|
11
|
+
description: "Convert text to snake_case",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
14
|
+
}, async ({ text }) => {
|
|
15
|
+
const snakeCase = text
|
|
16
|
+
.replace(/([a-z])([A-Z])/g, '$1_$2')
|
|
17
|
+
.replace(/[^a-zA-Z0-9]+/g, '_')
|
|
18
|
+
.toLowerCase()
|
|
19
|
+
.replace(/^_+|_+$/g, '');
|
|
20
|
+
return {
|
|
21
|
+
content: [
|
|
22
|
+
{
|
|
23
|
+
type: "text",
|
|
24
|
+
text: `snake_case: ${snakeCase}`,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
}
|
package/package.json
CHANGED