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
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export function registerAnsibleInventoryParser(server) {
|
|
3
|
+
server.registerTool("generate_ansible_inventory", {
|
|
4
|
+
description: "Parse and validate Ansible inventory files",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
inventory: z.string().describe("Ansible inventory content (INI or YAML format)"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Generate Ansible Inventory",
|
|
11
|
+
description: "Parse and validate Ansible inventory files",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
14
|
+
}, async ({ inventory }) => {
|
|
15
|
+
if (!inventory?.trim()) {
|
|
16
|
+
return {
|
|
17
|
+
content: [
|
|
18
|
+
{
|
|
19
|
+
type: "text",
|
|
20
|
+
text: "Please provide inventory content to parse",
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
let parsed = {};
|
|
27
|
+
const trimmed = inventory.trim();
|
|
28
|
+
// Check if it's YAML format
|
|
29
|
+
if (trimmed.startsWith('{') || trimmed.includes('---') || trimmed.includes(':')) {
|
|
30
|
+
try {
|
|
31
|
+
const yaml = await import('js-yaml');
|
|
32
|
+
parsed = yaml.load(inventory);
|
|
33
|
+
}
|
|
34
|
+
catch (yamlError) {
|
|
35
|
+
// Fall back to INI parsing
|
|
36
|
+
parsed = parseINIInventory(inventory);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
// Parse as INI format
|
|
41
|
+
parsed = parseINIInventory(inventory);
|
|
42
|
+
}
|
|
43
|
+
// Validate and format the result
|
|
44
|
+
const result = formatInventoryResult(parsed);
|
|
45
|
+
return {
|
|
46
|
+
content: [
|
|
47
|
+
{
|
|
48
|
+
type: "text",
|
|
49
|
+
text: result,
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
return {
|
|
56
|
+
content: [
|
|
57
|
+
{
|
|
58
|
+
type: "text",
|
|
59
|
+
text: `Error parsing inventory: ${error.message}`,
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
// Helper function to parse INI format inventory
|
|
67
|
+
function parseINIInventory(inventory) {
|
|
68
|
+
const result = { all: { children: {}, hosts: {} } };
|
|
69
|
+
const lines = inventory.split('\n');
|
|
70
|
+
let currentGroup = 'all';
|
|
71
|
+
for (const line of lines) {
|
|
72
|
+
const trimmed = line.trim();
|
|
73
|
+
// Skip empty lines and comments
|
|
74
|
+
if (!trimmed || trimmed.startsWith('#') || trimmed.startsWith(';')) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
// Group header
|
|
78
|
+
if (trimmed.startsWith('[') && trimmed.endsWith(']')) {
|
|
79
|
+
currentGroup = trimmed.slice(1, -1);
|
|
80
|
+
// Handle group variables and children sections
|
|
81
|
+
if (currentGroup.includes(':')) {
|
|
82
|
+
const [groupName, section] = currentGroup.split(':');
|
|
83
|
+
if (section === 'vars') {
|
|
84
|
+
if (!result.all.children[groupName]) {
|
|
85
|
+
result.all.children[groupName] = { hosts: {}, vars: {} };
|
|
86
|
+
}
|
|
87
|
+
currentGroup = `${groupName}:vars`;
|
|
88
|
+
}
|
|
89
|
+
else if (section === 'children') {
|
|
90
|
+
if (!result.all.children[groupName]) {
|
|
91
|
+
result.all.children[groupName] = { hosts: {}, children: {} };
|
|
92
|
+
}
|
|
93
|
+
currentGroup = `${groupName}:children`;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
if (!result.all.children[currentGroup]) {
|
|
98
|
+
result.all.children[currentGroup] = { hosts: {} };
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
// Parse host or variable lines
|
|
104
|
+
if (currentGroup.endsWith(':vars')) {
|
|
105
|
+
// Group variables
|
|
106
|
+
const groupName = currentGroup.replace(':vars', '');
|
|
107
|
+
const [key, ...valueParts] = trimmed.split('=');
|
|
108
|
+
if (key && valueParts.length > 0) {
|
|
109
|
+
const value = valueParts.join('=');
|
|
110
|
+
if (!result.all.children[groupName].vars) {
|
|
111
|
+
result.all.children[groupName].vars = {};
|
|
112
|
+
}
|
|
113
|
+
result.all.children[groupName].vars[key.trim()] = value.trim();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
else if (currentGroup.endsWith(':children')) {
|
|
117
|
+
// Child groups
|
|
118
|
+
const groupName = currentGroup.replace(':children', '');
|
|
119
|
+
if (!result.all.children[groupName].children) {
|
|
120
|
+
result.all.children[groupName].children = {};
|
|
121
|
+
}
|
|
122
|
+
result.all.children[groupName].children[trimmed] = {};
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
// Host entries
|
|
126
|
+
const [hostname, ...varParts] = trimmed.split(/\s+/);
|
|
127
|
+
const hostVars = {};
|
|
128
|
+
// Parse host variables
|
|
129
|
+
for (const varPart of varParts) {
|
|
130
|
+
const [key, ...valueParts] = varPart.split('=');
|
|
131
|
+
if (key && valueParts.length > 0) {
|
|
132
|
+
hostVars[key] = valueParts.join('=');
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (currentGroup === 'all') {
|
|
136
|
+
result.all.hosts[hostname] = hostVars;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
result.all.children[currentGroup].hosts[hostname] = hostVars;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return result;
|
|
144
|
+
}
|
|
145
|
+
// Helper function to format inventory parsing results
|
|
146
|
+
function formatInventoryResult(parsed) {
|
|
147
|
+
let result = '# Parsed Ansible Inventory\n\n';
|
|
148
|
+
try {
|
|
149
|
+
// Count totals
|
|
150
|
+
let totalHosts = 0;
|
|
151
|
+
let totalGroups = 0;
|
|
152
|
+
function countHosts(obj) {
|
|
153
|
+
let count = 0;
|
|
154
|
+
if (obj.hosts) {
|
|
155
|
+
count += Object.keys(obj.hosts).length;
|
|
156
|
+
}
|
|
157
|
+
if (obj.children) {
|
|
158
|
+
for (const child of Object.values(obj.children)) {
|
|
159
|
+
count += countHosts(child);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return count;
|
|
163
|
+
}
|
|
164
|
+
function countGroups(obj) {
|
|
165
|
+
let count = 0;
|
|
166
|
+
if (obj.children) {
|
|
167
|
+
count += Object.keys(obj.children).length;
|
|
168
|
+
for (const child of Object.values(obj.children)) {
|
|
169
|
+
count += countGroups(child);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return count;
|
|
173
|
+
}
|
|
174
|
+
totalHosts = countHosts(parsed.all || parsed);
|
|
175
|
+
totalGroups = countGroups(parsed.all || parsed);
|
|
176
|
+
result += `## Summary\n`;
|
|
177
|
+
result += `- Total Hosts: ${totalHosts}\n`;
|
|
178
|
+
result += `- Total Groups: ${totalGroups}\n\n`;
|
|
179
|
+
// List all groups and hosts
|
|
180
|
+
function formatGroup(groupName, group, indent = 0) {
|
|
181
|
+
const spaces = ' '.repeat(indent);
|
|
182
|
+
let output = `${spaces}## ${groupName}\n`;
|
|
183
|
+
if (group.hosts && Object.keys(group.hosts).length > 0) {
|
|
184
|
+
output += `${spaces}### Hosts:\n`;
|
|
185
|
+
for (const [hostname, vars] of Object.entries(group.hosts)) {
|
|
186
|
+
output += `${spaces}- ${hostname}`;
|
|
187
|
+
if (vars && typeof vars === 'object' && Object.keys(vars).length > 0) {
|
|
188
|
+
output += ` (vars: ${Object.keys(vars).join(', ')})`;
|
|
189
|
+
}
|
|
190
|
+
output += '\n';
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
if (group.vars && Object.keys(group.vars).length > 0) {
|
|
194
|
+
output += `${spaces}### Variables:\n`;
|
|
195
|
+
for (const [key, value] of Object.entries(group.vars)) {
|
|
196
|
+
output += `${spaces}- ${key}: ${value}\n`;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
if (group.children && Object.keys(group.children).length > 0) {
|
|
200
|
+
output += `${spaces}### Child Groups:\n`;
|
|
201
|
+
for (const [childName, child] of Object.entries(group.children)) {
|
|
202
|
+
output += formatGroup(childName, child, indent + 1);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return output + '\n';
|
|
206
|
+
}
|
|
207
|
+
if (parsed.all) {
|
|
208
|
+
result += formatGroup('all', parsed.all);
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
// Handle direct group format
|
|
212
|
+
for (const [groupName, group] of Object.entries(parsed)) {
|
|
213
|
+
result += formatGroup(groupName, group);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
catch (error) {
|
|
218
|
+
result += `Error formatting inventory: ${error.message}`;
|
|
219
|
+
}
|
|
220
|
+
return result;
|
|
221
|
+
}
|
package/build/tools/ansible/{ansible-inventory-generator → parse_ansible_inventory}/index.js
RENAMED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export function registerAnsibleInventoryParser(server) {
|
|
3
|
-
server.
|
|
4
|
-
|
|
3
|
+
server.registerTool("parse_ansible_inventory", {
|
|
4
|
+
description: "Parse and validate Ansible inventory files",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
inventory: z.string().describe("Ansible inventory content (INI or YAML format)"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Generate Ansible Inventory",
|
|
11
|
+
description: "Parse and validate Ansible inventory files",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ inventory }) => {
|
|
6
15
|
if (!inventory?.trim()) {
|
|
7
16
|
return {
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
export function
|
|
2
|
-
server.
|
|
1
|
+
export function registerReferenceAnsible(server) {
|
|
2
|
+
server.registerTool("show_ansible_reference", {
|
|
3
|
+
description: "Get Ansible commands reference and cheatsheet",
|
|
4
|
+
inputSchema: {},
|
|
5
|
+
// VS Code compliance annotations
|
|
6
|
+
annotations: {
|
|
7
|
+
title: "Show Ansible Reference",
|
|
8
|
+
description: "Get Ansible commands reference and cheatsheet",
|
|
9
|
+
readOnlyHint: true
|
|
10
|
+
}
|
|
11
|
+
}, async () => {
|
|
3
12
|
const reference = `# Ansible Quick Reference
|
|
4
13
|
|
|
5
14
|
## Installation
|
package/build/tools/ansible/{ansible-playbook-validator → validate_ansible_playbook}/index.js
RENAMED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
2
|
+
export function registerValidateAnsiblePlaybook(server) {
|
|
3
|
+
server.registerTool("validate_ansible_playbook", {
|
|
4
|
+
description: "Validate Ansible playbook syntax and structure",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
playbook: z.string().describe("Ansible playbook YAML content"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Validate Ansible Playbook",
|
|
11
|
+
description: "Validate Ansible playbook syntax and structure",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ playbook }) => {
|
|
6
15
|
if (!playbook?.trim()) {
|
|
7
16
|
return {
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import Color from "color";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
export function
|
|
4
|
-
server.
|
|
5
|
-
|
|
3
|
+
export function registerConvertHexRgb(server) {
|
|
4
|
+
server.registerTool("convert_hex_to_rgb", {
|
|
5
|
+
description: "Convert HEX color to RGB",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
hex: z.string().describe("HEX color code (e.g., #FF5733 or FF5733)"),
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Convert Hex To Rgb",
|
|
12
|
+
description: "Convert HEX color to RGB",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ hex }) => {
|
|
7
16
|
try {
|
|
8
17
|
const rgb = Color(hex).rgb().array();
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import Color from "color";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
export function
|
|
4
|
-
server.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export function registerConvertRgbHex(server) {
|
|
4
|
+
server.registerTool("convert_rgb_to_hex", {
|
|
5
|
+
description: "Convert RGB color to HEX",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
r: z.number().describe("Red value (0-255)"),
|
|
8
|
+
g: z.number().describe("Green value (0-255)"),
|
|
9
|
+
b: z.number().describe("Blue value (0-255)"),
|
|
10
|
+
},
|
|
11
|
+
// VS Code compliance annotations
|
|
12
|
+
annotations: {
|
|
13
|
+
title: "Convert Rgb To Hex",
|
|
14
|
+
description: "Convert RGB color to HEX",
|
|
15
|
+
readOnlyHint: false
|
|
16
|
+
}
|
|
8
17
|
}, async ({ r, g, b }) => {
|
|
9
18
|
try {
|
|
10
19
|
if (r < 0 || r > 255 || g < 0 || g > 255 || b < 0 || b > 255) {
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
2
|
+
export function registerDecodeJwt(server) {
|
|
3
|
+
server.registerTool("decode_jwt", {
|
|
4
|
+
description: "Decode JWT token (header and payload only)",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
token: z.string().describe("JWT token to decode"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Decode Jwt",
|
|
11
|
+
description: "Decode JWT token (header and payload only)",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ token }) => {
|
|
6
15
|
try {
|
|
7
16
|
const parts = token.split('.');
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export function registerGenerateAuth(server) {
|
|
3
|
+
server.registerTool("generate_basic_auth", {
|
|
4
|
+
description: "Generate HTTP Basic Authentication header",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
username: z.string().describe("Username"),
|
|
7
|
+
password: z.string().describe("Password"),
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Generate Basic Auth",
|
|
12
|
+
description: "Generate HTTP Basic Authentication header",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ username, password }) => {
|
|
7
16
|
try {
|
|
8
17
|
const credentials = `${username}:${password}`;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import * as bip39 from "bip39";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
export function
|
|
4
|
-
server.
|
|
5
|
-
|
|
3
|
+
export function registerGenerateBip39(server) {
|
|
4
|
+
server.registerTool("generate_bip39", {
|
|
5
|
+
description: "Generate BIP39 mnemonic phrases",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
wordCount: z.enum(["12", "15", "18", "21", "24"]).describe("Number of words in the mnemonic").optional(),
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Generate Bip39",
|
|
12
|
+
description: "Generate BIP39 mnemonic phrases",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ wordCount = "12" }) => {
|
|
7
16
|
try {
|
|
8
17
|
const count = parseInt(wordCount);
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { createHmac } from "crypto";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
export function
|
|
4
|
-
server.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export function registerGenerateHmac(server) {
|
|
4
|
+
server.registerTool("generate_hmac", {
|
|
5
|
+
description: "Generate HMAC (Hash-based Message Authentication Code)",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
message: z.string().describe("Message to authenticate"),
|
|
8
|
+
key: z.string().describe("Secret key for HMAC"),
|
|
9
|
+
algorithm: z.enum(["sha1", "sha256", "sha512"]).describe("Hash algorithm").optional(),
|
|
10
|
+
},
|
|
11
|
+
// VS Code compliance annotations
|
|
12
|
+
annotations: {
|
|
13
|
+
title: "Generate Hmac",
|
|
14
|
+
description: "Generate HMAC (Hash-based Message Authentication Code)",
|
|
15
|
+
readOnlyHint: false
|
|
16
|
+
}
|
|
8
17
|
}, async ({ message, key, algorithm = "sha256" }) => {
|
|
9
18
|
try {
|
|
10
19
|
const hmac = createHmac(algorithm, key);
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import speakeasy from "speakeasy";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
export function
|
|
4
|
-
server.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export function registerGenerateOtp(server) {
|
|
4
|
+
server.registerTool("generate_otp", {
|
|
5
|
+
description: "Generate Time-based One-Time Password (TOTP) codes",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
secret: z.string().describe("Base32 encoded secret key"),
|
|
8
|
+
digits: z.number().describe("Number of digits in the code").optional(),
|
|
9
|
+
period: z.number().describe("Time period in seconds").optional(),
|
|
10
|
+
},
|
|
11
|
+
// VS Code compliance annotations
|
|
12
|
+
annotations: {
|
|
13
|
+
title: "Generate Otp",
|
|
14
|
+
description: "Generate Time-based One-Time Password (TOTP) codes",
|
|
15
|
+
readOnlyHint: false
|
|
16
|
+
}
|
|
8
17
|
}, async ({ secret, digits = 6, period = 30 }) => {
|
|
9
18
|
try {
|
|
10
19
|
if (digits < 4 || digits > 10) {
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
export function registerGeneratePassword(server) {
|
|
3
|
+
server.registerTool("generate_password", {
|
|
4
|
+
description: "Generate a secure password",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
length: z.number().describe("Password length").optional(),
|
|
7
|
+
includeUppercase: z.boolean().describe("Include uppercase letters").optional(),
|
|
8
|
+
includeLowercase: z.boolean().describe("Include lowercase letters").optional(),
|
|
9
|
+
includeNumbers: z.boolean().describe("Include numbers").optional(),
|
|
10
|
+
includeSymbols: z.boolean().describe("Include symbols").optional(),
|
|
11
|
+
},
|
|
12
|
+
// VS Code compliance annotations
|
|
13
|
+
annotations: {
|
|
14
|
+
title: "Generate Password",
|
|
15
|
+
description: "Generate a secure password",
|
|
16
|
+
readOnlyHint: false
|
|
17
|
+
}
|
|
9
18
|
}, async ({ length = 16, includeUppercase = true, includeLowercase = true, includeNumbers = true, includeSymbols = true }) => {
|
|
10
19
|
if (length < 4 || length > 128) {
|
|
11
20
|
return {
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
export function registerGenerateToken(server) {
|
|
3
|
+
server.registerTool("generate_token", {
|
|
4
|
+
description: "Generate secure random tokens",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
length: z.number().describe("Token length").optional(),
|
|
7
|
+
charset: z.enum(["alphanumeric", "hex", "base64", "custom"]).describe("Character set to use").optional(),
|
|
8
|
+
customChars: z.string().optional().describe("Custom characters (required if charset is 'custom')"),
|
|
9
|
+
},
|
|
10
|
+
// VS Code compliance annotations
|
|
11
|
+
annotations: {
|
|
12
|
+
title: "Generate Token",
|
|
13
|
+
description: "Generate secure random tokens",
|
|
14
|
+
readOnlyHint: false
|
|
15
|
+
}
|
|
7
16
|
}, async ({ length = 32, charset = "alphanumeric", customChars }) => {
|
|
8
17
|
try {
|
|
9
18
|
if (length < 8 || length > 256) {
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import bcryptjs from "bcryptjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
export function
|
|
4
|
-
server.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export function registerHashBcrypt(server) {
|
|
4
|
+
server.registerTool("hash_bcrypt", {
|
|
5
|
+
description: "Generate bcrypt hash or verify password against hash",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
password: z.string().describe("Password to hash or verify"),
|
|
8
|
+
rounds: z.number().describe("Number of salt rounds (4-12, default 10)").optional(),
|
|
9
|
+
hash: z.string().optional().describe("Existing hash to verify against (for verification)"),
|
|
10
|
+
},
|
|
11
|
+
// VS Code compliance annotations
|
|
12
|
+
annotations: {
|
|
13
|
+
title: "Hash Bcrypt",
|
|
14
|
+
description: "Generate bcrypt hash or verify password against hash",
|
|
15
|
+
readOnlyHint: false
|
|
16
|
+
}
|
|
8
17
|
}, async ({ password, rounds = 10, hash }) => {
|
|
9
18
|
try {
|
|
10
19
|
if (rounds < 4 || rounds > 12) {
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { createHash } from "crypto";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export function registerHashMd5(server) {
|
|
4
|
-
server.
|
|
5
|
-
|
|
4
|
+
server.registerTool("hash_md5", {
|
|
5
|
+
description: "Generate MD5 hash",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
text: z.string().describe("Text to hash with MD5"),
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Hash Md5",
|
|
12
|
+
description: "Generate MD5 hash",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ text }) => {
|
|
7
16
|
const hash = createHash('md5');
|
|
8
17
|
hash.update(text);
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { createHash } from "crypto";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export function registerHashSha1(server) {
|
|
4
|
-
server.
|
|
5
|
-
|
|
4
|
+
server.registerTool("hash_sha1", {
|
|
5
|
+
description: "Generate SHA1 hash",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
text: z.string().describe("Text to hash with SHA1"),
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Hash Sha1",
|
|
12
|
+
description: "Generate SHA1 hash",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ text }) => {
|
|
7
16
|
const hash = createHash('sha1');
|
|
8
17
|
hash.update(text);
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { createHash } from "crypto";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export function registerHashSha256(server) {
|
|
4
|
-
server.
|
|
5
|
-
|
|
4
|
+
server.registerTool("hash_sha256", {
|
|
5
|
+
description: 'Generate SHA256 hash of input text. Example: "hello" → "2cf24dba4f21d..."',
|
|
6
|
+
inputSchema: {
|
|
7
|
+
text: z.string().describe("Text to hash with SHA256"),
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Hash Sha256",
|
|
12
|
+
description: "Generate SHA256 hash of input text",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ text }) => {
|
|
7
16
|
const hash = createHash('sha256');
|
|
8
17
|
hash.update(text);
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { createHash } from "crypto";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export function registerHashSha512(server) {
|
|
4
|
-
server.
|
|
5
|
-
|
|
4
|
+
server.registerTool("hash_sha512", {
|
|
5
|
+
description: "Generate SHA512 hash",
|
|
6
|
+
inputSchema: {
|
|
7
|
+
text: z.string().describe("Text to hash with SHA512"),
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Hash Sha512",
|
|
12
|
+
description: "Generate SHA512 hash",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ text }) => {
|
|
7
16
|
const hash = createHash('sha512');
|
|
8
17
|
hash.update(text);
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export function registerDiffJson(server) {
|
|
3
|
+
server.registerTool("compare_json", {
|
|
4
|
+
description: "Compare two JSON objects and show differences",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
json1: z.string().describe("First JSON object"),
|
|
7
|
+
json2: z.string().describe("Second JSON object"),
|
|
8
|
+
},
|
|
9
|
+
// VS Code compliance annotations
|
|
10
|
+
annotations: {
|
|
11
|
+
title: "Compare Json",
|
|
12
|
+
description: "Compare two JSON objects and show differences",
|
|
13
|
+
readOnlyHint: false
|
|
14
|
+
}
|
|
6
15
|
}, async ({ json1, json2 }) => {
|
|
7
16
|
try {
|
|
8
17
|
const obj1 = JSON.parse(json1);
|
package/build/tools/{dataFormat/html-to-markdown → data_format/convert_html_to_markdown}/index.js
RENAMED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export function
|
|
3
|
-
server.
|
|
4
|
-
|
|
2
|
+
export function registerConvertHtmlMarkdown(server) {
|
|
3
|
+
server.registerTool("convert_html_to_markdown", {
|
|
4
|
+
description: "Convert HTML to Markdown",
|
|
5
|
+
inputSchema: {
|
|
6
|
+
html: z.string().describe("HTML content to convert to Markdown"),
|
|
7
|
+
},
|
|
8
|
+
// VS Code compliance annotations
|
|
9
|
+
annotations: {
|
|
10
|
+
title: "Convert Html To Markdown",
|
|
11
|
+
description: "Convert HTML to Markdown",
|
|
12
|
+
readOnlyHint: false
|
|
13
|
+
}
|
|
5
14
|
}, async ({ html }) => {
|
|
6
15
|
try {
|
|
7
16
|
const TurndownService = (await import("turndown")).default;
|