it-tools-mcp 3.2.12 → 4.0.0
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/README.dockerhub.md +1 -1
- package/README.md +105 -104
- package/build/index.js +464 -70
- package/build/tools/ansible/{ansible-vault-decrypt → decrypt_ansible_vault}/index.js +13 -4
- package/build/tools/ansible/{ansible-vault-encrypt → encrypt_ansible_vault}/index.js +14 -5
- package/build/tools/ansible/generate_ansible_inventory/index.js +221 -0
- package/build/tools/ansible/{ansible-inventory-generator → parse_ansible_inventory}/index.js +11 -2
- package/build/tools/ansible/{ansible-reference → show_ansible_reference}/index.js +11 -2
- package/build/tools/ansible/{ansible-playbook-validator → validate_ansible_playbook}/index.js +12 -3
- package/build/tools/color/{color-hex-to-rgb → convert_hex_to_rgb}/index.js +12 -3
- package/build/tools/color/{color-rgb-to-hex → convert_rgb_to_hex}/index.js +14 -5
- package/build/tools/crypto/{jwt-decode → decode_jwt}/index.js +12 -3
- package/build/tools/crypto/{basic-auth-generator → generate_basic_auth}/index.js +13 -4
- package/build/tools/crypto/{bip39-generate → generate_bip39}/index.js +12 -3
- package/build/tools/crypto/{hmac-generator → generate_hmac}/index.js +14 -5
- package/build/tools/crypto/{otp-code-generator → generate_otp}/index.js +14 -5
- package/build/tools/crypto/{password-generate → generate_password}/index.js +16 -7
- package/build/tools/crypto/{token-generator → generate_token}/index.js +14 -5
- package/build/tools/crypto/{bcrypt-hash → hash_bcrypt}/index.js +14 -5
- package/build/tools/crypto/{hash-md5 → hash_md5}/index.js +11 -2
- package/build/tools/crypto/{hash-sha1 → hash_sha1}/index.js +11 -2
- package/build/tools/crypto/{hash-sha256 → hash_sha256}/index.js +11 -2
- package/build/tools/crypto/{hash-sha512 → hash_sha512}/index.js +11 -2
- package/build/tools/{dataFormat/json-diff → data_format/compare_json}/index.js +13 -4
- package/build/tools/{dataFormat/html-to-markdown → data_format/convert_html_to_markdown}/index.js +12 -3
- package/build/tools/{dataFormat/json-to-csv → data_format/convert_json_to_csv}/index.js +13 -4
- package/build/tools/{dataFormat/json-to-toml → data_format/convert_json_to_toml}/index.js +12 -3
- package/build/tools/{dataFormat/markdown-to-html → data_format/convert_markdown_to_html}/index.js +12 -3
- package/build/tools/{dataFormat/toml-to-json → data_format/convert_toml_to_json}/index.js +12 -3
- package/build/tools/{dataFormat/json-format → data_format/format_json}/index.js +14 -4
- package/build/tools/{dataFormat/phone-format → data_format/format_phone}/index.js +13 -4
- package/build/tools/{dataFormat/sql-format → data_format/format_sql}/index.js +13 -4
- package/build/tools/{dataFormat/xml-format → data_format/format_xml}/index.js +13 -4
- package/build/tools/{dataFormat/yaml-format → data_format/format_yaml}/index.js +12 -3
- package/build/tools/{dataFormat/json-minify → data_format/minify_json}/index.js +12 -3
- package/build/tools/development/{list-converter → convert_list}/index.js +15 -6
- package/build/tools/development/{html-prettifier → format_html}/index.js +13 -4
- package/build/tools/development/{javascript-prettifier → format_javascript}/index.js +14 -5
- package/build/tools/development/{crontab-generate → generate_crontab}/index.js +16 -7
- package/build/tools/development/{markdown-toc-generator → generate_markdown_toc}/index.js +14 -5
- package/build/tools/development/{regex-tester → test_regex}/index.js +14 -5
- package/build/tools/docker/{docker-compose-to-docker-run → convert_docker_compose_to_run}/index.js +11 -2
- package/build/tools/docker/{docker-run-to-docker-compose → convert_docker_run_to_compose}/index.js +11 -2
- package/build/tools/docker/{traefik-compose-generator → generate_traefik_compose}/index.js +16 -7
- package/build/tools/docker/{docker-reference → show_docker_reference}/index.js +11 -2
- package/build/tools/docker/{docker-compose-validator → validate_docker_compose}/index.js +12 -3
- package/build/tools/encoding/{text-to-binary → convert_text_to_binary}/index.js +13 -4
- package/build/tools/encoding/{base64-decode → decode_base64}/index.js +13 -3
- package/build/tools/encoding/{html-decode → decode_html}/index.js +12 -3
- package/build/tools/encoding/{url-decode → decode_url}/index.js +12 -3
- package/build/tools/encoding/encode_base64/index.js +38 -0
- package/build/tools/encoding/{html-encode → encode_html}/index.js +12 -3
- package/build/tools/encoding/{html-entities-extended → encode_html_entities}/index.js +13 -4
- package/build/tools/encoding/encode_url/index.js +25 -0
- package/build/tools/forensic/{safelink-decoder → decode_safelink}/index.js +12 -3
- package/build/tools/forensic/{url-fanger → fang_url}/index.js +13 -4
- package/build/tools/forensic/{file-type-identifier → identify_file_type}/index.js +13 -4
- package/build/tools/{idGenerators/qr-generate → id_generators/generate_qr_code}/index.js +13 -4
- package/build/tools/{idGenerators/svg-placeholder-generator → id_generators/generate_svg_placeholder}/index.js +16 -7
- package/build/tools/{idGenerators/ulid-generate → id_generators/generate_ulid}/index.js +11 -2
- package/build/tools/id_generators/generate_uuid/index.js +23 -0
- package/build/tools/math/{percentage-calculator → calculate_percentage}/index.js +14 -5
- package/build/tools/math/{number-base-converter → convert_number_base}/index.js +14 -5
- package/build/tools/math/{roman-numeral-converter → convert_roman_numerals}/index.js +12 -3
- package/build/tools/math/{temperature-converter → convert_temperature}/index.js +14 -5
- package/build/tools/math/{unix-timestamp-converter → convert_unix_timestamp}/index.js +11 -2
- package/build/tools/math/{math-evaluate → evaluate_math}/index.js +12 -3
- package/build/tools/network/{ip-subnet-calculator → calculate_ip_subnet}/index.js +12 -3
- package/build/tools/network/{ipv4-subnet-calc → calculate_ipv4_subnet}/index.js +11 -2
- package/build/tools/network/{ipv6-subnet-calculator → calculate_ipv6_subnet}/index.js +12 -3
- package/build/tools/network/cat/index.js +11 -2
- package/build/tools/network/{cidr-to-ip-range → convert_cidr_to_ip_range}/index.js +11 -2
- package/build/tools/network/{ip-range-to-cidr → convert_ip_range_to_cidr}/index.js +12 -3
- package/build/tools/network/curl/index.js +17 -6
- package/build/tools/network/dig/index.js +12 -3
- package/build/tools/network/{ipv6-ula-generator → generate_ipv6_ula}/index.js +11 -2
- package/build/tools/network/{mac-address-generate → generate_mac_address}/index.js +12 -3
- package/build/tools/network/{random-port → generate_random_port}/index.js +14 -5
- package/build/tools/network/grep/index.js +12 -3
- package/build/tools/network/head/index.js +12 -3
- package/build/tools/network/nslookup/index.js +11 -2
- package/build/tools/network/{url-parse → parse_url}/index.js +11 -2
- package/build/tools/network/ping/index.js +15 -4
- package/build/tools/network/ps/index.js +10 -1
- package/build/tools/network/scp/index.js +16 -7
- package/build/tools/network/ssh/index.js +14 -5
- package/build/tools/network/tail/index.js +12 -3
- package/build/tools/network/telnet/index.js +12 -3
- package/build/tools/network/top/index.js +10 -1
- package/build/tools/network/{iban-validate → validate_iban}/index.js +11 -2
- package/build/tools/physics/{angle-converter → convert_angle}/index.js +17 -8
- package/build/tools/physics/{energy-converter → convert_energy}/index.js +19 -10
- package/build/tools/physics/{power-converter → convert_power}/index.js +19 -10
- package/build/tools/text/{distinct-words → analyze_distinct_words}/index.js +11 -2
- package/build/tools/text/{text-stats → analyze_text_stats}/index.js +11 -2
- package/build/tools/text/capitalize_text/index.js +25 -0
- package/build/tools/text/{text-diff → compare_text}/index.js +12 -3
- package/build/tools/text/convert_text_to_camelcase/index.js +29 -0
- package/build/tools/text/{text-kebabcase → convert_text_to_kebabcase}/index.js +11 -2
- package/build/tools/text/convert_text_to_lowercase/index.js +24 -0
- package/build/tools/text/{text-to-nato-alphabet → convert_text_to_nato}/index.js +12 -3
- package/build/tools/text/{text-pascalcase → convert_text_to_pascalcase}/index.js +11 -2
- package/build/tools/text/{text-to-unicode → convert_text_to_unicode}/index.js +12 -3
- package/build/tools/text/convert_text_to_uppercase/index.js +24 -0
- package/build/tools/text/{ascii-art-text → generate_ascii_art}/index.js +12 -3
- package/build/tools/text/{lorem-ipsum-generator → generate_lorem_ipsum}/index.js +12 -3
- package/build/tools/text/{numeronym-generator → generate_numeronym}/index.js +11 -2
- package/build/tools/text/{string-obfuscator → obfuscate_string}/index.js +12 -3
- package/build/tools/text/{emoji-search → search_emoji}/index.js +11 -2
- package/build/tools/text/{text-to-unicode-names → show_unicode_names}/index.js +11 -2
- package/build/tools/text/{slugify-string → slugify_text}/index.js +13 -4
- package/build/tools/text/text_snakecase/index.js +1 -0
- package/build/tools/utility/{rem-px-converter → convert_rem_px}/index.js +14 -4
- package/build/tools/utility/{css-prettifier → format_css}/index.js +12 -3
- package/build/tools/utility/{http-status-codes → lookup_http_status}/index.js +11 -2
- package/build/tools/utility/{mime-types → lookup_mime_types}/index.js +12 -3
- package/build/tools/utility/{port-numbers → lookup_port_numbers}/index.js +11 -2
- package/build/tools/utility/{email-normalizer → normalize_email}/index.js +11 -2
- package/build/tools/utility/{device-info → show_device_info}/index.js +10 -1
- package/package.json +50 -6
- package/build/tools/encoding/base64-encode/index.js +0 -16
- package/build/tools/encoding/url-encode/index.js +0 -16
- package/build/tools/idGenerators/uuid-generate/index.js +0 -14
- package/build/tools/text/text-camelcase/index.js +0 -20
- package/build/tools/text/text-capitalize/index.js +0 -16
- package/build/tools/text/text-lowercase/index.js +0 -15
- package/build/tools/text/text-snakecase/index.js +0 -20
- package/build/tools/text/text-uppercase/index.js +0 -15
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
export function registerGrep(server) {
|
|
4
|
-
server.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
server.registerTool("grep", {
|
|
5
|
+
description: "Search for patterns in files",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
pattern: z.string().describe("Pattern to search for"),
|
|
8
|
+
file: z.string().describe("File path")
|
|
9
|
+
},
|
|
10
|
+
// VS Code compliance annotations
|
|
11
|
+
annotations: {
|
|
12
|
+
title: "Grep",
|
|
13
|
+
description: "Search for patterns in files",
|
|
14
|
+
readOnlyHint: false
|
|
15
|
+
}
|
|
7
16
|
}, async ({ pattern, file }) => {
|
|
8
17
|
try {
|
|
9
18
|
const data = fs.readFileSync(file, "utf8");
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
export function registerHead(server) {
|
|
4
|
-
server.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
server.registerTool("head", {
|
|
5
|
+
description: "Display the beginning of a file",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
file: z.string().describe("File path"),
|
|
8
|
+
lines: z.number().default(10).describe("Number of lines")
|
|
9
|
+
},
|
|
10
|
+
// VS Code compliance annotations
|
|
11
|
+
annotations: {
|
|
12
|
+
title: "Head",
|
|
13
|
+
description: "Display the beginning of a file",
|
|
14
|
+
readOnlyHint: false
|
|
15
|
+
}
|
|
7
16
|
}, async ({ file, lines }) => {
|
|
8
17
|
try {
|
|
9
18
|
const data = fs.readFileSync(file, "utf8");
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import dns from "dns";
|
|
3
3
|
export function registerNslookup(server) {
|
|
4
|
-
server.
|
|
5
|
-
|
|
4
|
+
server.registerTool("nslookup", {
|
|
5
|
+
description: "Perform DNS lookup on a hostname or IP address",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
target: z.string().describe("Hostname or IP address")
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Nslookup",
|
|
12
|
+
description: "Perform DNS lookup on a hostname or IP address",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ target }) => {
|
|
7
16
|
return new Promise((resolve) => {
|
|
8
17
|
dns.lookup(target, (err, address, family) => {
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerUrlParse(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
3
|
+
server.registerTool("parse_url", {
|
|
4
|
+
description: "Parse URL into components",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
url: z.string().describe("URL to parse"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Url-parse",
|
|
11
|
+
description: "Parse URL into components",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ url }) => {
|
|
6
15
|
try {
|
|
7
16
|
const urlObj = new URL(url);
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import ping from "ping";
|
|
3
3
|
export function registerPing(server) {
|
|
4
|
-
server.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
server.registerTool("ping", {
|
|
5
|
+
description: "Test network connectivity to a host. Example: ping google.com to check if it's reachable",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
target: z.string().describe("Host to ping"),
|
|
8
|
+
count: z.number().default(4).describe("Number of ping attempts")
|
|
9
|
+
},
|
|
10
|
+
// VS Code compliance annotations
|
|
11
|
+
annotations: {
|
|
12
|
+
title: "Ping",
|
|
13
|
+
description: "Test network connectivity to a host",
|
|
14
|
+
readOnlyHint: false
|
|
15
|
+
}
|
|
7
16
|
}, async ({ target, count }) => {
|
|
8
17
|
try {
|
|
9
18
|
const res = await ping.promise.probe(target, { min_reply: count });
|
|
@@ -14,7 +23,9 @@ export function registerPing(server) {
|
|
|
14
23
|
};
|
|
15
24
|
}
|
|
16
25
|
catch (error) {
|
|
17
|
-
return {
|
|
26
|
+
return {
|
|
27
|
+
isError: true, content: [{ type: "text", text: `Ping failed: ${error instanceof Error ? error.message : error}` }]
|
|
28
|
+
};
|
|
18
29
|
}
|
|
19
30
|
});
|
|
20
31
|
}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import psList from "ps-list";
|
|
2
2
|
export function registerPs(server) {
|
|
3
|
-
server.
|
|
3
|
+
server.registerTool("ps", {
|
|
4
|
+
description: "List running processes",
|
|
5
|
+
inputSchema: {},
|
|
6
|
+
// VS Code compliance annotations
|
|
7
|
+
annotations: {
|
|
8
|
+
title: "Ps",
|
|
9
|
+
description: "List running processes",
|
|
10
|
+
readOnlyHint: false
|
|
11
|
+
}
|
|
12
|
+
}, async () => {
|
|
4
13
|
try {
|
|
5
14
|
const processes = await psList();
|
|
6
15
|
// Defensive: handle missing properties and filter out bad entries
|
|
@@ -37,13 +37,22 @@ function resolvePrivateKey(privateKeyArg) {
|
|
|
37
37
|
return privateKeyArg;
|
|
38
38
|
}
|
|
39
39
|
export function registerScp(server) {
|
|
40
|
-
server.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
server.registerTool("scp", {
|
|
41
|
+
description: "Copy files to or from a remote host using SFTP (SCP-like)",
|
|
42
|
+
inputSchema: {
|
|
43
|
+
target: z.string().describe("Target host"),
|
|
44
|
+
user: z.string().describe("Username"),
|
|
45
|
+
direction: z.enum(["upload", "download"]).describe("Direction: upload (local to remote) or download (remote to local)"),
|
|
46
|
+
localPath: z.string().describe("Local file path (source for upload, destination for download)"),
|
|
47
|
+
remotePath: z.string().describe("Remote file path (destination for upload, source for download)"),
|
|
48
|
+
privateKey: z.string().optional().describe("Private key for authentication (PEM format, optional, or path to key file)")
|
|
49
|
+
},
|
|
50
|
+
// VS Code compliance annotations
|
|
51
|
+
annotations: {
|
|
52
|
+
title: "Scp",
|
|
53
|
+
description: "Copy files to or from a remote host using SFTP (SCP-like)",
|
|
54
|
+
readOnlyHint: false
|
|
55
|
+
}
|
|
47
56
|
}, async ({ target, user, direction, localPath, remotePath, privateKey }) => {
|
|
48
57
|
try {
|
|
49
58
|
const { Client } = await import("ssh2");
|
|
@@ -38,11 +38,20 @@ function resolvePrivateKey(privateKeyArg) {
|
|
|
38
38
|
return privateKeyArg;
|
|
39
39
|
}
|
|
40
40
|
export function registerSsh(server) {
|
|
41
|
-
server.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
server.registerTool("ssh", {
|
|
42
|
+
description: "Connect to a target via SSH",
|
|
43
|
+
inputSchema: {
|
|
44
|
+
target: z.string().describe("Target host"),
|
|
45
|
+
user: z.string().describe("Username"),
|
|
46
|
+
command: z.string().describe("Command to run on remote host"),
|
|
47
|
+
privateKey: z.string().optional().describe("Private key for authentication (PEM format, optional, or path to key file)")
|
|
48
|
+
},
|
|
49
|
+
// VS Code compliance annotations
|
|
50
|
+
annotations: {
|
|
51
|
+
title: "Ssh",
|
|
52
|
+
description: "Connect to a target via SSH",
|
|
53
|
+
readOnlyHint: false
|
|
54
|
+
}
|
|
46
55
|
}, async ({ target, user, command, privateKey }) => {
|
|
47
56
|
return new Promise((resolve) => {
|
|
48
57
|
let resolvedKey;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import readLastLines from "read-last-lines";
|
|
3
3
|
export function registerTail(server) {
|
|
4
|
-
server.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
server.registerTool("tail", {
|
|
5
|
+
description: "Display the end of a file",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
file: z.string().describe("File path"),
|
|
8
|
+
lines: z.number().default(10).describe("Number of lines")
|
|
9
|
+
},
|
|
10
|
+
// VS Code compliance annotations
|
|
11
|
+
annotations: {
|
|
12
|
+
title: "Tail",
|
|
13
|
+
description: "Display the end of a file",
|
|
14
|
+
readOnlyHint: false
|
|
15
|
+
}
|
|
7
16
|
}, async ({ file, lines }) => {
|
|
8
17
|
try {
|
|
9
18
|
const out = await readLastLines.read(file, lines);
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerTelnet(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
server.registerTool("telnet", {
|
|
4
|
+
description: "Test TCP connectivity to a host and port",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
target: z.string().describe("Host to connect to"),
|
|
7
|
+
port: z.number().describe("Port number")
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Telnet",
|
|
12
|
+
description: "Test TCP connectivity to a host and port",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ target, port }) => {
|
|
7
16
|
return new Promise(async (resolve) => {
|
|
8
17
|
try {
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import psList from "ps-list";
|
|
2
2
|
export function registerTop(server) {
|
|
3
|
-
server.
|
|
3
|
+
server.registerTool("top", {
|
|
4
|
+
description: "Display system processes (snapshot)",
|
|
5
|
+
inputSchema: {},
|
|
6
|
+
// VS Code compliance annotations
|
|
7
|
+
annotations: {
|
|
8
|
+
title: "Top",
|
|
9
|
+
description: "Display system processes (snapshot)",
|
|
10
|
+
readOnlyHint: false
|
|
11
|
+
}
|
|
12
|
+
}, async () => {
|
|
4
13
|
try {
|
|
5
14
|
const processes = await psList();
|
|
6
15
|
const sorted = processes.sort((a, b) => (b.cpu || 0) - (a.cpu || 0)).slice(0, 10);
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerIbanValidate(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
3
|
+
server.registerTool("validate_iban", {
|
|
4
|
+
description: "Validate and parse IBAN (International Bank Account Number)",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
iban: z.string().describe("IBAN to validate and parse"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Iban-validate",
|
|
11
|
+
description: "Validate and parse IBAN (International Bank Account Number)",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ iban }) => {
|
|
6
15
|
try {
|
|
7
16
|
const IBAN = (await import("iban")).default;
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerAngleConverter(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
3
|
+
server.registerTool("convert_angle", {
|
|
4
|
+
description: "Convert between different angle units",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
value: z.number().describe("Angle value to convert"),
|
|
7
|
+
fromUnit: z.enum([
|
|
8
|
+
"degree", "radian", "gradian", "turn", "arcminute", "arcsecond"
|
|
9
|
+
]).describe("Source angle unit"),
|
|
10
|
+
toUnit: z.enum([
|
|
11
|
+
"degree", "radian", "gradian", "turn", "arcminute", "arcsecond"
|
|
12
|
+
]).describe("Target angle unit")
|
|
13
|
+
},
|
|
14
|
+
// VS Code compliance annotations
|
|
15
|
+
annotations: {
|
|
16
|
+
title: "Convert Angle",
|
|
17
|
+
description: "Convert between different angle units",
|
|
18
|
+
readOnlyHint: false
|
|
19
|
+
}
|
|
11
20
|
}, async ({ value, fromUnit, toUnit }) => {
|
|
12
21
|
try {
|
|
13
22
|
// Conversion factors to degrees
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerEnergyConverter(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
server.registerTool("convert_energy", {
|
|
4
|
+
description: "Convert between different energy units",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
value: z.number().describe("Energy value to convert"),
|
|
7
|
+
fromUnit: z.enum([
|
|
8
|
+
"joule", "kilojoule", "calorie", "kilocalorie", "btu",
|
|
9
|
+
"watt-hour", "kilowatt-hour", "electronvolt", "foot-pound"
|
|
10
|
+
]).describe("Source energy unit"),
|
|
11
|
+
toUnit: z.enum([
|
|
12
|
+
"joule", "kilojoule", "calorie", "kilocalorie", "btu",
|
|
13
|
+
"watt-hour", "kilowatt-hour", "electronvolt", "foot-pound"
|
|
14
|
+
]).describe("Target energy unit")
|
|
15
|
+
},
|
|
16
|
+
// VS Code compliance annotations
|
|
17
|
+
annotations: {
|
|
18
|
+
title: "Convert Energy",
|
|
19
|
+
description: "Convert between different energy units",
|
|
20
|
+
readOnlyHint: false
|
|
21
|
+
}
|
|
13
22
|
}, async ({ value, fromUnit, toUnit }) => {
|
|
14
23
|
try {
|
|
15
24
|
// Conversion factors to joules
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerPowerConverter(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
server.registerTool("convert_power", {
|
|
4
|
+
description: "Convert between different power units",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
value: z.number().describe("Power value to convert"),
|
|
7
|
+
fromUnit: z.enum([
|
|
8
|
+
"watt", "kilowatt", "megawatt", "horsepower", "metric-horsepower",
|
|
9
|
+
"btu-per-hour", "calorie-per-second", "foot-pound-per-second"
|
|
10
|
+
]).describe("Source power unit"),
|
|
11
|
+
toUnit: z.enum([
|
|
12
|
+
"watt", "kilowatt", "megawatt", "horsepower", "metric-horsepower",
|
|
13
|
+
"btu-per-hour", "calorie-per-second", "foot-pound-per-second"
|
|
14
|
+
]).describe("Target power unit")
|
|
15
|
+
},
|
|
16
|
+
// VS Code compliance annotations
|
|
17
|
+
annotations: {
|
|
18
|
+
title: "Convert Power",
|
|
19
|
+
description: "Convert between different power units",
|
|
20
|
+
readOnlyHint: false
|
|
21
|
+
}
|
|
13
22
|
}, async ({ value, fromUnit, toUnit }) => {
|
|
14
23
|
try {
|
|
15
24
|
// Conversion factors to watts
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerDistinctWords(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
3
|
+
server.registerTool("analyze_distinct_words", {
|
|
4
|
+
description: "Count distinct words in text and show their frequency",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
text: z.string().describe("Text to analyze for distinct words")
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Analyze Distinct Words",
|
|
11
|
+
description: "Count distinct words in text and show their frequency",
|
|
12
|
+
readOnlyHint: true
|
|
13
|
+
}
|
|
5
14
|
}, async ({ text }) => {
|
|
6
15
|
// Remove punctuation and split into words
|
|
7
16
|
const cleanedText = text.replace(/[^\w\s]/g, ' ').toLowerCase();
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerTextStats(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
3
|
+
server.registerTool("analyze_text_stats", {
|
|
4
|
+
description: "Get statistics about text (character count, word count, etc.)",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
text: z.string().describe("Text to analyze"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Analyze Text Stats",
|
|
11
|
+
description: "Get statistics about text (character count, word count, etc",
|
|
12
|
+
readOnlyHint: true
|
|
13
|
+
}
|
|
5
14
|
}, async ({ text }) => {
|
|
6
15
|
const lines = text.split('\n');
|
|
7
16
|
const words = text.trim().split(/\s+/).filter(word => word.length > 0);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export function registerTextCapitalize(server) {
|
|
3
|
+
server.registerTool("capitalize_text", {
|
|
4
|
+
description: "Capitalize first letter of each word",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
text: z.string().describe("Text to capitalize"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Capitalize Text",
|
|
11
|
+
description: "Capitalize first letter of each word",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
14
|
+
}, async ({ text }) => {
|
|
15
|
+
const capitalized = text.replace(/\b\w/g, l => l.toUpperCase());
|
|
16
|
+
return {
|
|
17
|
+
content: [
|
|
18
|
+
{
|
|
19
|
+
type: "text",
|
|
20
|
+
text: `Capitalized: ${capitalized}`,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerTextDiff(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
server.registerTool("compare_text", {
|
|
4
|
+
description: "Compare two texts and show differences",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
text1: z.string().describe("First text to compare"),
|
|
7
|
+
text2: z.string().describe("Second text to compare"),
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Compare Text",
|
|
12
|
+
description: "Compare two texts and show differences",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ text1, text2 }) => {
|
|
7
16
|
try {
|
|
8
17
|
// Simple diff implementation
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export function registerTextCamelcase(server) {
|
|
3
|
+
server.registerTool("convert_text_to_camelcase", {
|
|
4
|
+
description: "Convert text to camelCase format. Example: 'hello world' → 'helloWorld', 'my-variable-name' → 'myVariableName'",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
text: z.string().describe("Text to convert to camelCase"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Convert to camelCase",
|
|
11
|
+
description: "Convert text to camelCase naming convention",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
14
|
+
}, async ({ text }) => {
|
|
15
|
+
const camelCase = text
|
|
16
|
+
.replace(/(?:^\w|[A-Z]|\b\w)/g, (word, index) => {
|
|
17
|
+
return index === 0 ? word.toLowerCase() : word.toUpperCase();
|
|
18
|
+
})
|
|
19
|
+
.replace(/\s+/g, '');
|
|
20
|
+
return {
|
|
21
|
+
content: [
|
|
22
|
+
{
|
|
23
|
+
type: "text",
|
|
24
|
+
text: `camelCase: ${camelCase}`,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerTextKebabcase(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
3
|
+
server.registerTool("convert_text_to_kebabcase", {
|
|
4
|
+
description: "Convert text to kebab-case",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
text: z.string().describe("Text to convert to kebab-case"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Convert Text To Kebabcase",
|
|
11
|
+
description: "Convert text to kebab-case",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ text }) => {
|
|
6
15
|
const kebabCase = text
|
|
7
16
|
.replace(/([a-z])([A-Z])/g, '$1-$2')
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export function registerTextLowercase(server) {
|
|
3
|
+
server.registerTool("convert_text_to_lowercase", {
|
|
4
|
+
description: "Convert text to lowercase",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
text: z.string().describe("Text to convert to lowercase"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Convert Text To Lowercase",
|
|
11
|
+
description: "Convert text to lowercase",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
14
|
+
}, async ({ text }) => {
|
|
15
|
+
return {
|
|
16
|
+
content: [
|
|
17
|
+
{
|
|
18
|
+
type: "text",
|
|
19
|
+
text: `Lowercase: ${text.toLowerCase()}`,
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerTextToNatoAlphabet(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
server.registerTool("convert_text_to_nato", {
|
|
4
|
+
description: "Convert text to NATO phonetic alphabet",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
text: z.string().describe("Text to convert to NATO phonetic alphabet"),
|
|
7
|
+
language: z.string().optional().default("International").describe("Language/country variant (International, France, Germany, etc.)")
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Convert Text To Nato",
|
|
12
|
+
description: "Convert text to NATO phonetic alphabet",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ text, language }) => {
|
|
7
16
|
// NATO phonetic alphabet mappings
|
|
8
17
|
const natoAlphabets = {
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerTextPascalcase(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
3
|
+
server.registerTool("convert_text_to_pascalcase", {
|
|
4
|
+
description: "Convert text to PascalCase",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
text: z.string().describe("Text to convert to PascalCase"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Convert Text To Pascalcase",
|
|
11
|
+
description: "Convert text to PascalCase",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ text }) => {
|
|
6
15
|
const pascalCase = text
|
|
7
16
|
.replace(/(?:^\w|[A-Z]|\b\w)/g, word => word.toUpperCase())
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerTextToUnicode(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
server.registerTool("convert_text_to_unicode", {
|
|
4
|
+
description: "Convert text to Unicode code points and vice versa",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
input: z.string().describe("Text to convert to Unicode or Unicode to convert to text"),
|
|
7
|
+
operation: z.enum(["encode", "decode"]).describe("Operation: encode text to Unicode or decode Unicode to text"),
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Convert Text To Unicode",
|
|
12
|
+
description: "Convert text to Unicode code points and vice versa",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ input, operation }) => {
|
|
7
16
|
try {
|
|
8
17
|
if (operation === "encode") {
|