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,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
2
|
+
export function registerEncodeHtml(server) {
|
|
3
|
+
server.registerTool("encode_html", {
|
|
4
|
+
description: "Encode HTML entities",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
text: z.string().describe("Text to HTML encode"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Encode Html",
|
|
11
|
+
description: "Encode HTML entities",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ text }) => {
|
|
6
15
|
const encoded = text
|
|
7
16
|
.replace(/&/g, '&')
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export function registerEncodeHtmlEntities(server) {
|
|
3
|
+
server.registerTool("encode_html_entities", {
|
|
4
|
+
description: "Extended HTML entity encoding/decoding",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
text: z.string().describe("Text to encode or decode"),
|
|
7
|
+
operation: z.enum(["encode", "decode"]).describe("Operation to perform"),
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Encode Html Entities",
|
|
12
|
+
description: "Extended HTML entity encoding/decoding",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ text, operation }) => {
|
|
7
16
|
try {
|
|
8
17
|
if (operation === "encode") {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export function registerEncodeUrl(server) {
|
|
3
|
+
server.registerTool("encode_url", {
|
|
4
|
+
description: "URL encode text",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
text: z.string().describe("Text to URL encode"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Encode Url",
|
|
11
|
+
description: "URL encode text",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
14
|
+
}, async ({ text }) => {
|
|
15
|
+
const encoded = encodeURIComponent(text);
|
|
16
|
+
return {
|
|
17
|
+
content: [
|
|
18
|
+
{
|
|
19
|
+
type: "text",
|
|
20
|
+
text: `URL encoded: ${encoded}`,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
2
|
+
export function registerDecodeSafelink(server) {
|
|
3
|
+
server.registerTool("decode_safelink", {
|
|
4
|
+
description: "Decode Microsoft Outlook SafeLink URLs",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
safelink: z.string().describe("SafeLink URL to decode")
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Decode Safelink",
|
|
11
|
+
description: "Decode Microsoft Outlook SafeLink URLs",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ safelink }) => {
|
|
6
15
|
try {
|
|
7
16
|
const url = new URL(safelink);
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export function registerFangUrl(server) {
|
|
3
|
+
server.registerTool("fang_url", {
|
|
4
|
+
description: "Defang or refang URLs for safe sharing (security analysis)",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
text: z.string().describe("Text containing URLs to fang/defang"),
|
|
7
|
+
operation: z.enum(["defang", "refang"]).describe("Whether to defang (make safe) or refang (restore) URLs")
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Fang Url",
|
|
12
|
+
description: "Defang or refang URLs for safe sharing (security analysis)",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ text, operation }) => {
|
|
7
16
|
try {
|
|
8
17
|
let result = text;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { Buffer } from 'buffer';
|
|
3
|
-
export function
|
|
4
|
-
server.
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export function registerIdentifyFileType(server) {
|
|
4
|
+
server.registerTool("identify_file_type", {
|
|
5
|
+
description: "Identify file type based on magic numbers/file signatures",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
data: z.string().describe("Hex data or base64 data of file header"),
|
|
8
|
+
format: z.enum(["hex", "base64"]).describe("Format of the input data")
|
|
9
|
+
},
|
|
10
|
+
// VS Code compliance annotations
|
|
11
|
+
annotations: {
|
|
12
|
+
title: "Identify File Type",
|
|
13
|
+
description: "Identify file type based on magic numbers/file signatures",
|
|
14
|
+
readOnlyHint: false
|
|
15
|
+
}
|
|
7
16
|
}, async ({ data, format }) => {
|
|
8
17
|
try {
|
|
9
18
|
let buffer;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export function registerGenerateQr(server) {
|
|
3
|
+
server.registerTool("generate_qr_code", {
|
|
4
|
+
description: "Generate QR code for any text including URLs, WiFi networks, contact info, etc.",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
text: z.string().describe("Text to encode in QR code (URLs, WiFi: WIFI:T:WPA;S:network;P:password;;, contact info, etc.)"),
|
|
7
|
+
size: z.number().describe("Size multiplier (1-3)").optional(),
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Generate Qr Code",
|
|
12
|
+
description: "Generate QR code for any text including URLs, WiFi networks, contact info, etc",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ text, size = 1 }) => {
|
|
7
16
|
try {
|
|
8
17
|
const QRCode = (await import("qrcode")).default;
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
export function registerGenerateSvgPlaceholder(server) {
|
|
3
|
+
server.registerTool("generate_svg_placeholder", {
|
|
4
|
+
description: "Generate SVG placeholder images",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
width: z.number().describe("Width in pixels").optional(),
|
|
7
|
+
height: z.number().describe("Height in pixels").optional(),
|
|
8
|
+
backgroundColor: z.string().describe("Background color (hex)").optional(),
|
|
9
|
+
textColor: z.string().describe("Text color (hex)").optional(),
|
|
10
|
+
text: z.string().optional().describe("Custom text (default: dimensions)"),
|
|
11
|
+
},
|
|
12
|
+
// VS Code compliance annotations
|
|
13
|
+
annotations: {
|
|
14
|
+
title: "Generate Svg Placeholder",
|
|
15
|
+
description: "Generate SVG placeholder images",
|
|
16
|
+
readOnlyHint: false
|
|
17
|
+
}
|
|
9
18
|
}, async ({ width = 300, height = 200, backgroundColor = "#cccccc", textColor = "#666666", text }) => {
|
|
10
19
|
try {
|
|
11
20
|
if (width < 1 || width > 2000 || height < 1 || height > 2000) {
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
export function
|
|
2
|
-
server.
|
|
1
|
+
export function registerGenerateUlid(server) {
|
|
2
|
+
server.registerTool("generate_ulid", {
|
|
3
|
+
description: "Generate Universally Unique Lexicographically Sortable Identifier (ULID). Example: creates time-sortable unique IDs like '01ARZ3NDEKTSV4RRFFQ69G5FAV'",
|
|
4
|
+
inputSchema: {},
|
|
5
|
+
// VS Code compliance annotations
|
|
6
|
+
annotations: {
|
|
7
|
+
title: "Generate ULID",
|
|
8
|
+
description: "Generate time-sortable unique identifiers (ULID)",
|
|
9
|
+
readOnlyHint: false
|
|
10
|
+
}
|
|
11
|
+
}, async () => {
|
|
3
12
|
try {
|
|
4
13
|
// Simplified ULID implementation
|
|
5
14
|
const timestamp = Date.now();
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { randomUUID } from "crypto";
|
|
2
|
+
export function registerGenerateUuid(server) {
|
|
3
|
+
server.registerTool("generate_uuid", {
|
|
4
|
+
description: 'Generate a universally unique identifier (UUID). Example: generates "550e8400-e29b-41d4-a716-446655440000"',
|
|
5
|
+
inputSchema: {},
|
|
6
|
+
// VS Code compliance annotations
|
|
7
|
+
annotations: {
|
|
8
|
+
title: "Generate Uuid",
|
|
9
|
+
description: "Generate a universally unique identifier (UUID)",
|
|
10
|
+
readOnlyHint: false
|
|
11
|
+
}
|
|
12
|
+
}, async () => {
|
|
13
|
+
const uuid = randomUUID();
|
|
14
|
+
return {
|
|
15
|
+
content: [
|
|
16
|
+
{
|
|
17
|
+
type: "text",
|
|
18
|
+
text: `Generated UUID: ${uuid}`,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
export function registerCalculatePercentage(server) {
|
|
3
|
+
server.registerTool("calculate_percentage", {
|
|
4
|
+
description: "Calculate percentages, percentage of a number, or percentage change",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
operation: z.enum(["percentage-of", "what-percentage", "percentage-change"]).describe("Type of percentage calculation"),
|
|
7
|
+
value1: z.number().describe("First value"),
|
|
8
|
+
value2: z.number().describe("Second value")
|
|
9
|
+
},
|
|
10
|
+
// VS Code compliance annotations
|
|
11
|
+
annotations: {
|
|
12
|
+
title: "Calculate Percentage",
|
|
13
|
+
description: "Calculate percentages, percentage of a number, or percentage change",
|
|
14
|
+
readOnlyHint: false
|
|
15
|
+
}
|
|
7
16
|
}, async ({ operation, value1, value2 }) => {
|
|
8
17
|
try {
|
|
9
18
|
let result;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
export function registerConvertNumberBase(server) {
|
|
3
|
+
server.registerTool("convert_number_base", {
|
|
4
|
+
description: "Convert numbers between different bases (binary, octal, decimal, hexadecimal)",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
number: z.string().describe("Number to convert"),
|
|
7
|
+
fromBase: z.number().describe("Source base (2-36)"),
|
|
8
|
+
toBase: z.number().describe("Target base (2-36)")
|
|
9
|
+
},
|
|
10
|
+
// VS Code compliance annotations
|
|
11
|
+
annotations: {
|
|
12
|
+
title: "Convert Number Base",
|
|
13
|
+
description: "Convert numbers between different bases (binary, octal, decimal, hexadecimal)",
|
|
14
|
+
readOnlyHint: false
|
|
15
|
+
}
|
|
7
16
|
}, async ({ number, fromBase, toBase }) => {
|
|
8
17
|
try {
|
|
9
18
|
if (fromBase < 2 || fromBase > 36 || toBase < 2 || toBase > 36) {
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
2
|
+
export function registerConvertRomanNumeral(server) {
|
|
3
|
+
server.registerTool("convert_roman_numerals", {
|
|
4
|
+
description: "Convert between Arabic numbers and Roman numerals",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
input: z.string().describe("Number to convert (Arabic number 1-3999 or Roman numeral)")
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Convert Roman Numerals",
|
|
11
|
+
description: "Convert between Arabic numbers and Roman numerals",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ input }) => {
|
|
6
15
|
try {
|
|
7
16
|
// Auto-detect if input is a number or Roman numeral
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
export function registerConvertTemperature(server) {
|
|
3
|
+
server.registerTool("convert_temperature", {
|
|
4
|
+
description: "Convert temperatures between Celsius, Fahrenheit, and Kelvin",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
temperature: z.number().describe("Temperature value to convert"),
|
|
7
|
+
from: z.enum(["celsius", "fahrenheit", "kelvin"]).describe("Source temperature unit"),
|
|
8
|
+
to: z.enum(["celsius", "fahrenheit", "kelvin"]).describe("Target temperature unit")
|
|
9
|
+
},
|
|
10
|
+
// VS Code compliance annotations
|
|
11
|
+
annotations: {
|
|
12
|
+
title: "Convert Temperature",
|
|
13
|
+
description: "Convert temperatures between Celsius, Fahrenheit, and Kelvin",
|
|
14
|
+
readOnlyHint: false
|
|
15
|
+
}
|
|
7
16
|
}, async ({ temperature, from, to }) => {
|
|
8
17
|
try {
|
|
9
18
|
// Convert to Celsius first
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerUnixTimestampConverter(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
3
|
+
server.registerTool("convert_unix_timestamp", {
|
|
4
|
+
description: "Convert between Unix timestamps and human-readable dates",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
input: z.string().describe("Unix timestamp (seconds) or ISO date string")
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Unix-timestamp-converter",
|
|
11
|
+
description: "Convert between Unix timestamps and human-readable dates",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ input }) => {
|
|
6
15
|
try {
|
|
7
16
|
// Auto-detect if input is a timestamp or date string
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
2
|
+
export function registerEvaluateMath(server) {
|
|
3
|
+
server.registerTool("evaluate_math", {
|
|
4
|
+
description: "Safely evaluate mathematical expressions",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
expression: z.string().describe("Mathematical expression to evaluate (e.g., '2 + 3 * 4')")
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Evaluate Math",
|
|
11
|
+
description: "Safely evaluate mathematical expressions",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ expression }) => {
|
|
6
15
|
try {
|
|
7
16
|
// @ts-ignore: Ignore missing type declarations for mathjs
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerIpSubnetCalculator(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
server.registerTool("calculate_ip_subnet", {
|
|
4
|
+
description: "Calculate subnet information for IPv4",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
ip: z.string().describe("IPv4 address (e.g., 192.168.1.1)"),
|
|
7
|
+
cidr: z.number().describe("CIDR notation (e.g., 24)"),
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Ip-subnet-calculator",
|
|
12
|
+
description: "Calculate subnet information for IPv4",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ ip, cidr }) => {
|
|
7
16
|
try {
|
|
8
17
|
if (cidr < 1 || cidr > 32) {
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerIpv4SubnetCalc(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
3
|
+
server.registerTool("calculate_ipv4_subnet", {
|
|
4
|
+
description: "Calculate IPv4 subnet information",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
cidr: z.string().describe("IPv4 CIDR notation (e.g., 192.168.1.0/24)"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Ipv4-subnet-calc",
|
|
11
|
+
description: "Calculate IPv4 subnet information",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ cidr }) => {
|
|
6
15
|
try {
|
|
7
16
|
const [ip, prefixLength] = cidr.split('/');
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerIpv6SubnetCalculator(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
server.registerTool("calculate_ipv6_subnet", {
|
|
4
|
+
description: "Calculate IPv6 subnet information",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
ipv6: z.string().describe("IPv6 address and prefix (e.g., 2001:db8::/32)"),
|
|
7
|
+
newPrefix: z.number().optional().describe("New prefix length for subnetting")
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Ipv6-subnet-calculator",
|
|
12
|
+
description: "Calculate IPv6 subnet information",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ ipv6, newPrefix }) => {
|
|
7
16
|
try {
|
|
8
17
|
const [address, prefixStr] = ipv6.split('/');
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
export function registerCat(server) {
|
|
4
|
-
server.
|
|
5
|
-
|
|
4
|
+
server.registerTool("cat", {
|
|
5
|
+
description: "Display content of a file",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
file: z.string().describe("File path")
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Cat",
|
|
12
|
+
description: "Display content of a file",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ file }) => {
|
|
7
16
|
try {
|
|
8
17
|
const data = fs.readFileSync(file, "utf8");
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerCidrToIpRange(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
3
|
+
server.registerTool("convert_cidr_to_ip_range", {
|
|
4
|
+
description: "Convert CIDR notation to IP address range",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
cidr: z.string().describe("CIDR notation (e.g., 192.168.1.0/24)")
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Cidr-to-ip-range",
|
|
11
|
+
description: "Convert CIDR notation to IP address range",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ cidr }) => {
|
|
6
15
|
try {
|
|
7
16
|
const [network, prefixLength] = cidr.split('/');
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerIpRangeToCidr(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
server.registerTool("convert_ip_range_to_cidr", {
|
|
4
|
+
description: "Convert IP address range to CIDR notation(s)",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
startIP: z.string().describe("Starting IP address"),
|
|
7
|
+
endIP: z.string().describe("Ending IP address")
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Ip-range-to-cidr",
|
|
12
|
+
description: "Convert IP address range to CIDR notation(s)",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ startIP, endIP }) => {
|
|
7
16
|
try {
|
|
8
17
|
// Parse IP addresses
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerCurl(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
server.registerTool("curl", {
|
|
4
|
+
description: "Make HTTP requests to web endpoints. Example: GET request to an API or POST data to a server",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
url: z.string().describe("URL to request"),
|
|
7
|
+
method: z.enum(["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"]).default("GET").describe("HTTP method"),
|
|
8
|
+
headers: z.record(z.string()).optional().describe("Request headers (object of key-value pairs)"),
|
|
9
|
+
body: z.string().optional().describe("Request body (for POST/PUT/PATCH)")
|
|
10
|
+
},
|
|
11
|
+
// VS Code compliance annotations
|
|
12
|
+
annotations: {
|
|
13
|
+
title: "Curl",
|
|
14
|
+
description: "Make HTTP requests to web endpoints",
|
|
15
|
+
readOnlyHint: false
|
|
16
|
+
}
|
|
8
17
|
}, async ({ url, method, headers, body }) => {
|
|
9
18
|
try {
|
|
10
19
|
const controller = new AbortController();
|
|
@@ -27,7 +36,9 @@ export function registerCurl(server) {
|
|
|
27
36
|
}
|
|
28
37
|
catch (error) {
|
|
29
38
|
if (error.name === 'AbortError') {
|
|
30
|
-
return {
|
|
39
|
+
return {
|
|
40
|
+
isError: true, content: [{ type: "text", text: `curl failed: Request timeout (10s)` }]
|
|
41
|
+
};
|
|
31
42
|
}
|
|
32
43
|
return { content: [{ type: "text", text: `curl failed: ${error.message || error}` }] };
|
|
33
44
|
}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import dns from "dns";
|
|
3
3
|
export function registerDig(server) {
|
|
4
|
-
server.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
server.registerTool("dig", {
|
|
5
|
+
description: "Perform DNS lookup with dig command",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
target: z.string().describe("Hostname or IP address"),
|
|
8
|
+
type: z.string().default("A").describe("DNS record type")
|
|
9
|
+
},
|
|
10
|
+
// VS Code compliance annotations
|
|
11
|
+
annotations: {
|
|
12
|
+
title: "Dig",
|
|
13
|
+
description: "Perform DNS lookup with dig command",
|
|
14
|
+
readOnlyHint: false
|
|
15
|
+
}
|
|
7
16
|
}, async ({ target, type }) => {
|
|
8
17
|
return new Promise((resolve) => {
|
|
9
18
|
dns.resolve(target, type, (err, addresses) => {
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerIpv6UlaGenerator(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
3
|
+
server.registerTool("generate_ipv6_ula", {
|
|
4
|
+
description: "Generate IPv6 Unique Local Address (ULA) prefix",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
globalId: z.string().optional().describe("Global ID (40 bits in hex, auto-generated if not provided)"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Ipv6-ula-generator",
|
|
11
|
+
description: "Generate IPv6 Unique Local Address (ULA) prefix",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ globalId }) => {
|
|
6
15
|
try {
|
|
7
16
|
// Generate random 40-bit Global ID if not provided
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerMacAddressGenerate(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
server.registerTool("generate_mac_address", {
|
|
4
|
+
description: "Generate random MAC address",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
prefix: z.string().optional().describe("MAC address prefix (e.g., '00:1B:44')"),
|
|
7
|
+
separator: z.enum([":", "-"]).describe("Separator character").optional(),
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Mac-address-generate",
|
|
12
|
+
description: "Generate random MAC address",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ prefix, separator = ":" }) => {
|
|
7
16
|
try {
|
|
8
17
|
let macParts = [];
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerRandomPort(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
server.registerTool("generate_random_port", {
|
|
4
|
+
description: "Generate random port numbers",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
count: z.number().describe("Number of ports to generate").optional(),
|
|
7
|
+
min: z.number().describe("Minimum port number").optional(),
|
|
8
|
+
max: z.number().describe("Maximum port number").optional(),
|
|
9
|
+
exclude: z.array(z.number()).optional().describe("Ports to exclude"),
|
|
10
|
+
},
|
|
11
|
+
// VS Code compliance annotations
|
|
12
|
+
annotations: {
|
|
13
|
+
title: "Random-port",
|
|
14
|
+
description: "Generate random port numbers",
|
|
15
|
+
readOnlyHint: false
|
|
16
|
+
}
|
|
8
17
|
}, async ({ count = 1, min = 1024, max = 65535, exclude = [] }) => {
|
|
9
18
|
try {
|
|
10
19
|
const ports = [];
|