it-tools-mcp 3.2.10 → 3.6.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.
Files changed (119) hide show
  1. package/README.dockerhub.md +2 -2
  2. package/README.md +14 -7
  3. package/build/index.js +223 -53
  4. package/build/tools/ansible/ansible-inventory-generator/index.js +5 -2
  5. package/build/tools/ansible/ansible-playbook-validator/index.js +5 -2
  6. package/build/tools/ansible/ansible-reference/index.js +4 -1
  7. package/build/tools/ansible/ansible-vault-decrypt/index.js +6 -3
  8. package/build/tools/ansible/ansible-vault-encrypt/index.js +7 -4
  9. package/build/tools/color/color-hex-to-rgb/index.js +5 -2
  10. package/build/tools/color/color-rgb-to-hex/index.js +7 -4
  11. package/build/tools/crypto/basic-auth-generator/index.js +6 -3
  12. package/build/tools/crypto/bcrypt-hash/index.js +7 -4
  13. package/build/tools/crypto/bip39-generate/index.js +5 -2
  14. package/build/tools/crypto/hash-md5/index.js +5 -2
  15. package/build/tools/crypto/hash-sha1/index.js +5 -2
  16. package/build/tools/crypto/hash-sha256/index.js +5 -2
  17. package/build/tools/crypto/hash-sha512/index.js +5 -2
  18. package/build/tools/crypto/hmac-generator/index.js +7 -4
  19. package/build/tools/crypto/jwt-decode/index.js +5 -2
  20. package/build/tools/crypto/otp-code-generator/index.js +7 -4
  21. package/build/tools/crypto/password-generate/index.js +9 -6
  22. package/build/tools/crypto/token-generator/index.js +7 -4
  23. package/build/tools/dataFormat/html-to-markdown/index.js +5 -2
  24. package/build/tools/dataFormat/json-diff/index.js +6 -3
  25. package/build/tools/dataFormat/json-format/index.js +7 -3
  26. package/build/tools/dataFormat/json-minify/index.js +5 -2
  27. package/build/tools/dataFormat/json-to-csv/index.js +6 -3
  28. package/build/tools/dataFormat/json-to-toml/index.js +5 -2
  29. package/build/tools/dataFormat/markdown-to-html/index.js +5 -2
  30. package/build/tools/dataFormat/phone-format/index.js +6 -3
  31. package/build/tools/dataFormat/sql-format/index.js +6 -3
  32. package/build/tools/dataFormat/toml-to-json/index.js +5 -2
  33. package/build/tools/dataFormat/xml-format/index.js +6 -3
  34. package/build/tools/dataFormat/yaml-format/index.js +5 -2
  35. package/build/tools/development/crontab-generate/index.js +9 -6
  36. package/build/tools/development/html-prettifier/index.js +6 -3
  37. package/build/tools/development/javascript-prettifier/index.js +7 -4
  38. package/build/tools/development/list-converter/index.js +8 -5
  39. package/build/tools/development/markdown-toc-generator/index.js +7 -4
  40. package/build/tools/development/regex-tester/index.js +7 -4
  41. package/build/tools/docker/docker-compose-to-docker-run/index.js +5 -2
  42. package/build/tools/docker/docker-compose-validator/index.js +5 -2
  43. package/build/tools/docker/docker-reference/index.js +4 -1
  44. package/build/tools/docker/docker-run-to-docker-compose/index.js +5 -2
  45. package/build/tools/docker/traefik-compose-generator/index.js +9 -6
  46. package/build/tools/encoding/base64-decode/index.js +6 -2
  47. package/build/tools/encoding/base64-encode/index.js +27 -11
  48. package/build/tools/encoding/html-decode/index.js +5 -2
  49. package/build/tools/encoding/html-encode/index.js +5 -2
  50. package/build/tools/encoding/html-entities-extended/index.js +6 -3
  51. package/build/tools/encoding/text-to-binary/index.js +6 -3
  52. package/build/tools/encoding/url-decode/index.js +5 -2
  53. package/build/tools/encoding/url-encode/index.js +5 -2
  54. package/build/tools/forensic/file-type-identifier/index.js +6 -3
  55. package/build/tools/forensic/safelink-decoder/index.js +5 -2
  56. package/build/tools/forensic/url-fanger/index.js +6 -3
  57. package/build/tools/idGenerators/qr-generate/index.js +6 -3
  58. package/build/tools/idGenerators/svg-placeholder-generator/index.js +9 -6
  59. package/build/tools/idGenerators/ulid-generate/index.js +4 -1
  60. package/build/tools/idGenerators/uuid-generate/index.js +4 -1
  61. package/build/tools/math/math-evaluate/index.js +5 -2
  62. package/build/tools/math/number-base-converter/index.js +7 -4
  63. package/build/tools/math/percentage-calculator/index.js +7 -4
  64. package/build/tools/math/roman-numeral-converter/index.js +5 -2
  65. package/build/tools/math/temperature-converter/index.js +7 -4
  66. package/build/tools/math/unix-timestamp-converter/index.js +5 -2
  67. package/build/tools/network/cat/index.js +5 -2
  68. package/build/tools/network/cidr-to-ip-range/index.js +5 -2
  69. package/build/tools/network/curl/index.js +11 -6
  70. package/build/tools/network/dig/index.js +6 -3
  71. package/build/tools/network/grep/index.js +6 -3
  72. package/build/tools/network/head/index.js +6 -3
  73. package/build/tools/network/iban-validate/index.js +5 -2
  74. package/build/tools/network/ip-range-to-cidr/index.js +6 -3
  75. package/build/tools/network/ip-subnet-calculator/index.js +6 -3
  76. package/build/tools/network/ipv4-subnet-calc/index.js +5 -2
  77. package/build/tools/network/ipv6-subnet-calculator/index.js +6 -3
  78. package/build/tools/network/ipv6-ula-generator/index.js +5 -2
  79. package/build/tools/network/mac-address-generate/index.js +6 -3
  80. package/build/tools/network/nslookup/index.js +5 -2
  81. package/build/tools/network/ping/index.js +9 -4
  82. package/build/tools/network/ps/index.js +4 -1
  83. package/build/tools/network/random-port/index.js +8 -5
  84. package/build/tools/network/scp/index.js +10 -7
  85. package/build/tools/network/ssh/index.js +8 -5
  86. package/build/tools/network/tail/index.js +6 -3
  87. package/build/tools/network/telnet/index.js +6 -3
  88. package/build/tools/network/top/index.js +4 -1
  89. package/build/tools/network/url-parse/index.js +5 -2
  90. package/build/tools/physics/angle-converter/index.js +11 -8
  91. package/build/tools/physics/energy-converter/index.js +13 -10
  92. package/build/tools/physics/power-converter/index.js +13 -10
  93. package/build/tools/text/ascii-art-text/index.js +6 -3
  94. package/build/tools/text/distinct-words/index.js +5 -2
  95. package/build/tools/text/emoji-search/index.js +5 -2
  96. package/build/tools/text/lorem-ipsum-generator/index.js +6 -3
  97. package/build/tools/text/numeronym-generator/index.js +5 -2
  98. package/build/tools/text/slugify-string/index.js +7 -4
  99. package/build/tools/text/string-obfuscator/index.js +6 -3
  100. package/build/tools/text/text-camelcase/index.js +5 -2
  101. package/build/tools/text/text-capitalize/index.js +5 -2
  102. package/build/tools/text/text-diff/index.js +6 -3
  103. package/build/tools/text/text-kebabcase/index.js +5 -2
  104. package/build/tools/text/text-lowercase/index.js +5 -2
  105. package/build/tools/text/text-pascalcase/index.js +5 -2
  106. package/build/tools/text/text-snakecase/index.js +5 -2
  107. package/build/tools/text/text-stats/index.js +5 -2
  108. package/build/tools/text/text-to-nato-alphabet/index.js +6 -3
  109. package/build/tools/text/text-to-unicode/index.js +6 -3
  110. package/build/tools/text/text-to-unicode-names/index.js +5 -2
  111. package/build/tools/text/text-uppercase/index.js +5 -2
  112. package/build/tools/utility/css-prettifier/index.js +6 -3
  113. package/build/tools/utility/device-info/index.js +4 -1
  114. package/build/tools/utility/email-normalizer/index.js +5 -2
  115. package/build/tools/utility/http-status-codes/index.js +5 -2
  116. package/build/tools/utility/mime-types/index.js +6 -3
  117. package/build/tools/utility/port-numbers/index.js +5 -2
  118. package/build/tools/utility/rem-px-converter/index.js +8 -4
  119. package/package.json +1 -1
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export function registerJwtDecode(server) {
3
- server.tool("jwt-decode", "Decode JWT token (header and payload only)", {
4
- token: z.string().describe("JWT token to decode"),
3
+ server.registerTool("jwt-decode", {
4
+ description: "Decode JWT token (header and payload only)",
5
+ inputSchema: {
6
+ token: z.string().describe("JWT token to decode"),
7
+ }
5
8
  }, async ({ token }) => {
6
9
  try {
7
10
  const parts = token.split('.');
@@ -1,10 +1,13 @@
1
1
  import speakeasy from "speakeasy";
2
2
  import { z } from "zod";
3
3
  export function registerOtpCodeGenerator(server) {
4
- server.tool("otp-code-generator", "Generate Time-based One-Time Password (TOTP) codes", {
5
- secret: z.string().describe("Base32 encoded secret key"),
6
- digits: z.number().describe("Number of digits in the code").optional(),
7
- period: z.number().describe("Time period in seconds").optional(),
4
+ server.registerTool("otp-code-generator", {
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
+ }
8
11
  }, async ({ secret, digits = 6, period = 30 }) => {
9
12
  try {
10
13
  if (digits < 4 || digits > 10) {
@@ -1,11 +1,14 @@
1
1
  import { z } from "zod";
2
2
  export function registerPasswordGenerate(server) {
3
- server.tool("password-generate", "Generate a secure password", {
4
- length: z.number().describe("Password length").optional(),
5
- includeUppercase: z.boolean().describe("Include uppercase letters").optional(),
6
- includeLowercase: z.boolean().describe("Include lowercase letters").optional(),
7
- includeNumbers: z.boolean().describe("Include numbers").optional(),
8
- includeSymbols: z.boolean().describe("Include symbols").optional(),
3
+ server.registerTool("password-generate", {
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
+ }
9
12
  }, async ({ length = 16, includeUppercase = true, includeLowercase = true, includeNumbers = true, includeSymbols = true }) => {
10
13
  if (length < 4 || length > 128) {
11
14
  return {
@@ -1,9 +1,12 @@
1
1
  import { z } from "zod";
2
2
  export function registerTokenGenerator(server) {
3
- server.tool("token-generator", "Generate secure random tokens", {
4
- length: z.number().describe("Token length").optional(),
5
- charset: z.enum(["alphanumeric", "hex", "base64", "custom"]).describe("Character set to use").optional(),
6
- customChars: z.string().optional().describe("Custom characters (required if charset is 'custom')"),
3
+ server.registerTool("token-generator", {
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
+ }
7
10
  }, async ({ length = 32, charset = "alphanumeric", customChars }) => {
8
11
  try {
9
12
  if (length < 8 || length > 256) {
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export function registerHtmlToMarkdown(server) {
3
- server.tool("html-to-markdown", "Convert HTML to Markdown", {
4
- html: z.string().describe("HTML content to convert to Markdown"),
3
+ server.registerTool("html-to-markdown", {
4
+ description: "Convert HTML to Markdown",
5
+ inputSchema: {
6
+ html: z.string().describe("HTML content to convert to Markdown"),
7
+ }
5
8
  }, async ({ html }) => {
6
9
  try {
7
10
  const TurndownService = (await import("turndown")).default;
@@ -1,8 +1,11 @@
1
1
  import { z } from "zod";
2
2
  export function registerJsonDiff(server) {
3
- server.tool("json-diff", "Compare two JSON objects and show differences", {
4
- json1: z.string().describe("First JSON object"),
5
- json2: z.string().describe("Second JSON object"),
3
+ server.registerTool("json-diff", {
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
+ }
6
9
  }, async ({ json1, json2 }) => {
7
10
  try {
8
11
  const obj1 = JSON.parse(json1);
@@ -1,8 +1,11 @@
1
1
  import { z } from "zod";
2
2
  export function registerJsonFormat(server) {
3
- server.tool("json-format", "Format and validate JSON", {
4
- json: z.string().describe("JSON string to format"),
5
- indent: z.number().describe("Number of spaces for indentation").optional(),
3
+ server.registerTool("json-format", {
4
+ description: 'Format and prettify JSON with proper indentation. Example: {"a":1,"b":2} → formatted JSON',
5
+ inputSchema: {
6
+ json: z.string().describe("JSON string to format"),
7
+ indent: z.number().describe("Number of spaces for indentation").optional(),
8
+ }
6
9
  }, async ({ json, indent = 2 }) => {
7
10
  try {
8
11
  if (indent < 0 || indent > 10) {
@@ -88,6 +91,7 @@ Examples of supported formats:
88
91
  }
89
92
  catch (error) {
90
93
  return {
94
+ isError: true,
91
95
  content: [
92
96
  {
93
97
  type: "text",
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export function registerJsonMinify(server) {
3
- server.tool("json-minify", "Minify JSON by removing whitespace", {
4
- json: z.string().describe("JSON string to minify"),
3
+ server.registerTool("json-minify", {
4
+ description: "Minify JSON by removing whitespace",
5
+ inputSchema: {
6
+ json: z.string().describe("JSON string to minify"),
7
+ }
5
8
  }, async ({ json }) => {
6
9
  try {
7
10
  const parsed = JSON.parse(json);
@@ -1,8 +1,11 @@
1
1
  import { z } from "zod";
2
2
  export function registerJsonToCsv(server) {
3
- server.tool("json-to-csv", "Convert JSON to CSV format", {
4
- json: z.string().describe("JSON string to convert to CSV"),
5
- delimiter: z.string().describe("CSV delimiter").optional(),
3
+ server.registerTool("json-to-csv", {
4
+ description: "Convert JSON to CSV format",
5
+ inputSchema: {
6
+ json: z.string().describe("JSON string to convert to CSV"),
7
+ delimiter: z.string().describe("CSV delimiter").optional(),
8
+ }
6
9
  }, async ({ json, delimiter = "," }) => {
7
10
  try {
8
11
  const Papa = (await import("papaparse")).default;
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export function registerJsonToToml(server) {
3
- server.tool("json-to-toml", "Convert JSON to TOML format", {
4
- json: z.string().describe("JSON string to convert"),
3
+ server.registerTool("json-to-toml", {
4
+ description: "Convert JSON to TOML format",
5
+ inputSchema: {
6
+ json: z.string().describe("JSON string to convert"),
7
+ }
5
8
  }, async ({ json }) => {
6
9
  try {
7
10
  const toml = await import("@iarna/toml");
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export function registerMarkdownToHtml(server) {
3
- server.tool("markdown-to-html", "Convert Markdown to HTML", {
4
- markdown: z.string().describe("Markdown content to convert to HTML"),
3
+ server.registerTool("markdown-to-html", {
4
+ description: "Convert Markdown to HTML",
5
+ inputSchema: {
6
+ markdown: z.string().describe("Markdown content to convert to HTML"),
7
+ }
5
8
  }, async ({ markdown }) => {
6
9
  try {
7
10
  const { marked } = await import("marked");
@@ -1,8 +1,11 @@
1
1
  import { z } from "zod";
2
2
  export function registerPhoneFormat(server) {
3
- server.tool("phone-format", "Parse and format phone numbers", {
4
- phoneNumber: z.string().describe("Phone number to parse and format"),
5
- countryCode: z.string().optional().describe("Country code (e.g., 'US', 'GB', 'FR')"),
3
+ server.registerTool("phone-format", {
4
+ description: "Parse and format phone numbers",
5
+ inputSchema: {
6
+ phoneNumber: z.string().describe("Phone number to parse and format"),
7
+ countryCode: z.string().optional().describe("Country code (e.g., 'US', 'GB', 'FR')"),
8
+ }
6
9
  }, async ({ phoneNumber, countryCode }) => {
7
10
  try {
8
11
  const { isValidPhoneNumber, parsePhoneNumber } = await import("libphonenumber-js");
@@ -1,8 +1,11 @@
1
1
  import { z } from "zod";
2
2
  export function registerSqlFormat(server) {
3
- server.tool("sql-format", "Format and prettify SQL queries", {
4
- sql: z.string().describe("SQL query to format"),
5
- dialect: z.string().optional().describe("SQL dialect to use for formatting (e.g., 'sql', 'mysql', 'postgresql', 'sqlite', 'mariadb', 'db2', 'plsql', 'n1ql', 'redshift', 'spark', 'tsql', 'trino', 'bigquery'). Default is 'sql'."),
3
+ server.registerTool("sql-format", {
4
+ description: "Format and prettify SQL queries",
5
+ inputSchema: {
6
+ sql: z.string().describe("SQL query to format"),
7
+ dialect: z.string().optional().describe("SQL dialect to use for formatting (e.g., 'sql', 'mysql', 'postgresql', 'sqlite', 'mariadb', 'db2', 'plsql', 'n1ql', 'redshift', 'spark', 'tsql', 'trino', 'bigquery'). Default is 'sql'."),
8
+ }
6
9
  }, async ({ sql, dialect = "sql" }) => {
7
10
  try {
8
11
  const { format: formatSQL } = await import("sql-formatter");
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export function registerTomlToJson(server) {
3
- server.tool("toml-to-json", "Convert TOML to JSON format", {
4
- toml: z.string().describe("TOML string to convert"),
3
+ server.registerTool("toml-to-json", {
4
+ description: "Convert TOML to JSON format",
5
+ inputSchema: {
6
+ toml: z.string().describe("TOML string to convert"),
7
+ }
5
8
  }, async ({ toml: tomlString }) => {
6
9
  try {
7
10
  const toml = await import("@iarna/toml");
@@ -1,8 +1,11 @@
1
1
  import { z } from "zod";
2
2
  export function registerXmlFormat(server) {
3
- server.tool("xml-format", "Format and prettify XML", {
4
- xml: z.string().describe("XML string to format"),
5
- indent: z.number().describe("Number of spaces for indentation").optional(),
3
+ server.registerTool("xml-format", {
4
+ description: "Format and prettify XML",
5
+ inputSchema: {
6
+ xml: z.string().describe("XML string to format"),
7
+ indent: z.number().describe("Number of spaces for indentation").optional(),
8
+ }
6
9
  }, async ({ xml, indent = 2 }) => {
7
10
  try {
8
11
  const formatXML = (await import("xml-formatter")).default;
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export function registerYamlFormat(server) {
3
- server.tool("yaml-format", "Format and prettify YAML", {
4
- yaml: z.string().describe("YAML string to format"),
3
+ server.registerTool("yaml-format", {
4
+ description: "Format and prettify YAML",
5
+ inputSchema: {
6
+ yaml: z.string().describe("YAML string to format"),
7
+ }
5
8
  }, async ({ yaml }) => {
6
9
  try {
7
10
  const YAML = await import("js-yaml");
@@ -1,12 +1,15 @@
1
1
  import { z } from "zod";
2
2
  import { CronExpressionParser } from 'cron-parser';
3
3
  export function registerCrontabGenerate(server) {
4
- server.tool("crontab-generate", "Generate crontab expressions", {
5
- minute: z.string().describe("Minute (0-59, *, */n, n-m)").optional(),
6
- hour: z.string().describe("Hour (0-23, *, */n, n-m)").optional(),
7
- dayOfMonth: z.string().describe("Day of month (1-31, *, */n, n-m)").optional(),
8
- month: z.string().describe("Month (1-12, *, */n, n-m)").optional(),
9
- dayOfWeek: z.string().describe("Day of week (0-7, *, */n, n-m)").optional(),
4
+ server.registerTool("crontab-generate", {
5
+ description: "Generate crontab expressions",
6
+ inputSchema: {
7
+ minute: z.string().describe("Minute (0-59, *, */n, n-m)").optional(),
8
+ hour: z.string().describe("Hour (0-23, *, */n, n-m)").optional(),
9
+ dayOfMonth: z.string().describe("Day of month (1-31, *, */n, n-m)").optional(),
10
+ month: z.string().describe("Month (1-12, *, */n, n-m)").optional(),
11
+ dayOfWeek: z.string().describe("Day of week (0-7, *, */n, n-m)").optional(),
12
+ }
10
13
  }, async ({ minute = "*", hour = "*", dayOfMonth = "*", month = "*", dayOfWeek = "*" }) => {
11
14
  try {
12
15
  const cronExpression = `${minute} ${hour} ${dayOfMonth} ${month} ${dayOfWeek}`;
@@ -1,8 +1,11 @@
1
1
  import { z } from "zod";
2
2
  export function registerHtmlPrettifier(server) {
3
- server.tool("html-prettifier", "Format and beautify HTML code", {
4
- html: z.string().describe("HTML code to prettify"),
5
- indentSize: z.number().optional().default(2).describe("Number of spaces for indentation")
3
+ server.registerTool("html-prettifier", {
4
+ description: "Format and beautify HTML code",
5
+ inputSchema: {
6
+ html: z.string().describe("HTML code to prettify"),
7
+ indentSize: z.number().optional().default(2).describe("Number of spaces for indentation")
8
+ }
6
9
  }, async ({ html, indentSize }) => {
7
10
  try {
8
11
  // Simple HTML prettifier
@@ -1,9 +1,12 @@
1
1
  import { z } from "zod";
2
2
  export function registerJavascriptPrettifier(server) {
3
- server.tool("javascript-prettifier", "Format and beautify JavaScript/CSS code", {
4
- code: z.string().describe("JavaScript or CSS code to prettify"),
5
- type: z.enum(["javascript", "css"]).describe("Type of code to format"),
6
- indentSize: z.number().optional().default(2).describe("Number of spaces for indentation")
3
+ server.registerTool("javascript-prettifier", {
4
+ description: "Format and beautify JavaScript/CSS code",
5
+ inputSchema: {
6
+ code: z.string().describe("JavaScript or CSS code to prettify"),
7
+ type: z.enum(["javascript", "css"]).describe("Type of code to format"),
8
+ indentSize: z.number().optional().default(2).describe("Number of spaces for indentation")
9
+ }
7
10
  }, async ({ code, type, indentSize }) => {
8
11
  try {
9
12
  let formatted = code;
@@ -1,10 +1,13 @@
1
1
  import { z } from "zod";
2
2
  export function registerListConverter(server) {
3
- server.tool("list-converter", "Convert between different list formats (comma-separated, line-separated, etc.)", {
4
- list: z.string().describe("Input list to convert"),
5
- inputFormat: z.enum(["comma", "semicolon", "newline", "space", "pipe"]).describe("Input format"),
6
- outputFormat: z.enum(["comma", "semicolon", "newline", "space", "pipe", "json", "quoted"]).describe("Output format"),
7
- trim: z.boolean().describe("Trim whitespace from items").optional(),
3
+ server.registerTool("list-converter", {
4
+ description: "Convert between different list formats (comma-separated, line-separated, etc.)",
5
+ inputSchema: {
6
+ list: z.string().describe("Input list to convert"),
7
+ inputFormat: z.enum(["comma", "semicolon", "newline", "space", "pipe"]).describe("Input format"),
8
+ outputFormat: z.enum(["comma", "semicolon", "newline", "space", "pipe", "json", "quoted"]).describe("Output format"),
9
+ trim: z.boolean().describe("Trim whitespace from items").optional(),
10
+ }
8
11
  }, async ({ list, inputFormat, outputFormat, trim = true }) => {
9
12
  try {
10
13
  const separators = {
@@ -1,9 +1,12 @@
1
1
  import { z } from "zod";
2
2
  export function registerMarkdownTocGenerator(server) {
3
- server.tool("markdown-toc-generator", "Generate a table of contents from Markdown headers", {
4
- markdown: z.string().describe("Markdown content to generate TOC from"),
5
- maxLevel: z.number().optional().default(6).describe("Maximum header level to include (1-6)"),
6
- generateAnchors: z.boolean().optional().default(true).describe("Whether to generate anchor links")
3
+ server.registerTool("markdown-toc-generator", {
4
+ description: "Generate a table of contents from Markdown headers",
5
+ inputSchema: {
6
+ markdown: z.string().describe("Markdown content to generate TOC from"),
7
+ maxLevel: z.number().optional().default(6).describe("Maximum header level to include (1-6)"),
8
+ generateAnchors: z.boolean().optional().default(true).describe("Whether to generate anchor links")
9
+ }
7
10
  }, async ({ markdown, maxLevel, generateAnchors }) => {
8
11
  // Extract headers from markdown
9
12
  const headerRegex = /^(#{1,6})\s+(.+)$/gm;
@@ -1,9 +1,12 @@
1
1
  import { z } from "zod";
2
2
  export function registerRegexTester(server) {
3
- server.tool("regex-tester", "Test regular expressions against text", {
4
- pattern: z.string().describe("Regular expression pattern"),
5
- text: z.string().describe("Text to test against the regex"),
6
- flags: z.string().optional().describe("Regex flags (g, i, m, s, u, y)"),
3
+ server.registerTool("regex-tester", {
4
+ description: "Test regular expressions against text",
5
+ inputSchema: {
6
+ pattern: z.string().describe("Regular expression pattern"),
7
+ text: z.string().describe("Text to test against the regex"),
8
+ flags: z.string().optional().describe("Regex flags (g, i, m, s, u, y)"),
9
+ }
7
10
  }, async ({ pattern, text, flags }) => {
8
11
  try {
9
12
  const regex = new RegExp(pattern, flags);
@@ -1,8 +1,11 @@
1
1
  import { z } from "zod";
2
2
  import yaml from "js-yaml";
3
3
  export function registerDockerComposeToRun(server) {
4
- server.tool("docker-compose-to-docker-run", "Convert Docker Compose files to docker run commands", {
5
- content: z.string().describe("Docker Compose file content to convert"),
4
+ server.registerTool("docker-compose-to-docker-run", {
5
+ description: "Convert Docker Compose files to docker run commands",
6
+ inputSchema: {
7
+ content: z.string().describe("Docker Compose file content to convert"),
8
+ }
6
9
  }, async ({ content }) => {
7
10
  if (!content?.trim()) {
8
11
  return {
@@ -1,8 +1,11 @@
1
1
  import { z } from "zod";
2
2
  import yaml from "js-yaml";
3
3
  export function registerDockerComposeValidator(server) {
4
- server.tool("docker-compose-validator", "Validate Docker Compose files for syntax and compatibility", {
5
- content: z.string().describe("Docker Compose file content to validate"),
4
+ server.registerTool("docker-compose-validator", {
5
+ description: "Validate Docker Compose files for syntax and compatibility",
6
+ inputSchema: {
7
+ content: z.string().describe("Docker Compose file content to validate"),
8
+ }
6
9
  }, async ({ content }) => {
7
10
  if (!content?.trim()) {
8
11
  return {
@@ -1,5 +1,8 @@
1
1
  export function registerDockerReference(server) {
2
- server.tool("docker-reference", "Get Docker commands reference and cheatsheet", {}, async () => {
2
+ server.registerTool("docker-reference", {
3
+ description: "Get Docker commands reference and cheatsheet",
4
+ inputSchema: {}
5
+ }, async () => {
3
6
  const reference = `# Docker Quick Reference
4
7
 
5
8
  ## Installation & Setup
@@ -1,8 +1,11 @@
1
1
  import { z } from "zod";
2
2
  import yaml from "js-yaml";
3
3
  export function registerDockerRunToCompose(server) {
4
- server.tool("docker-run-to-docker-compose", "Convert docker run commands to Docker Compose format", {
5
- commands: z.string().describe("Docker run commands to convert (one per line)"),
4
+ server.registerTool("docker-run-to-docker-compose", {
5
+ description: "Convert docker run commands to Docker Compose format",
6
+ inputSchema: {
7
+ commands: z.string().describe("Docker run commands to convert (one per line)"),
8
+ }
6
9
  }, async ({ commands }) => {
7
10
  if (!commands?.trim()) {
8
11
  return {
@@ -1,12 +1,15 @@
1
1
  import { z } from "zod";
2
2
  import yaml from "js-yaml";
3
3
  export function registerTraefikComposeGenerator(server) {
4
- server.tool("traefik-compose-generator", "Generate Traefik Docker Compose configuration", {
5
- domain: z.string().optional().describe("Domain for Traefik services (default: example.com)"),
6
- email: z.string().optional().describe("Email for Let's Encrypt (default: admin@example.com)"),
7
- network: z.string().optional().describe("Docker network name (default: traefik)"),
8
- serviceName: z.string().optional().describe("Example service name (default: webapp)"),
9
- serviceImage: z.string().optional().describe("Example service image (default: nginx:latest)"),
4
+ server.registerTool("traefik-compose-generator", {
5
+ description: "Generate Traefik Docker Compose configuration",
6
+ inputSchema: {
7
+ domain: z.string().optional().describe("Domain for Traefik services (default: example.com)"),
8
+ email: z.string().optional().describe("Email for Let's Encrypt (default: admin@example.com)"),
9
+ network: z.string().optional().describe("Docker network name (default: traefik)"),
10
+ serviceName: z.string().optional().describe("Example service name (default: webapp)"),
11
+ serviceImage: z.string().optional().describe("Example service image (default: nginx:latest)"),
12
+ }
10
13
  }, async ({ domain = 'example.com', email = 'admin@example.com', network = 'traefik', serviceName = 'webapp', serviceImage = 'nginx:latest' }) => {
11
14
  try {
12
15
  const compose = {
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export function registerBase64Decode(server) {
3
- server.tool("base64-decode", "Decode Base64 text", {
4
- text: z.string().describe("Base64 text to decode"),
3
+ server.registerTool("base64-decode", {
4
+ description: 'Decode Base64 text back to original text. Example: "SGVsbG8gV29ybGQ=" → "Hello World"',
5
+ inputSchema: {
6
+ text: z.string().min(1).regex(/^[A-Za-z0-9+/]*={0,2}$/, "Invalid Base64 format").describe("Base64 text to decode"),
7
+ }
5
8
  }, async ({ text }) => {
6
9
  try {
7
10
  const decoded = Buffer.from(text, 'base64').toString('utf-8');
@@ -16,6 +19,7 @@ export function registerBase64Decode(server) {
16
19
  }
17
20
  catch (error) {
18
21
  return {
22
+ isError: true,
19
23
  content: [
20
24
  {
21
25
  type: "text",
@@ -1,16 +1,32 @@
1
1
  import { z } from "zod";
2
2
  export function registerBase64Encode(server) {
3
- server.tool("base64-encode", "Encode text to Base64", {
4
- text: z.string().describe("Text to encode to Base64"),
3
+ server.registerTool("base64-encode", {
4
+ description: 'Encode text to Base64 format. Example: "Hello World" → "SGVsbG8gV29ybGQ="',
5
+ inputSchema: {
6
+ text: z.string().min(1).describe("Text to encode to Base64"),
7
+ }
5
8
  }, async ({ text }) => {
6
- const encoded = Buffer.from(text, 'utf-8').toString('base64');
7
- return {
8
- content: [
9
- {
10
- type: "text",
11
- text: `Base64 encoded: ${encoded}`,
12
- },
13
- ],
14
- };
9
+ try {
10
+ const encoded = Buffer.from(text, 'utf-8').toString('base64');
11
+ return {
12
+ content: [
13
+ {
14
+ type: "text",
15
+ text: `Base64 encoded: ${encoded}`,
16
+ },
17
+ ],
18
+ };
19
+ }
20
+ catch (error) {
21
+ return {
22
+ isError: true,
23
+ content: [
24
+ {
25
+ type: "text",
26
+ text: `Error encoding to Base64: ${error instanceof Error ? error.message : 'Unknown error'}`,
27
+ },
28
+ ],
29
+ };
30
+ }
15
31
  });
16
32
  }
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export function registerHtmlDecode(server) {
3
- server.tool("html-decode", "Decode HTML entities", {
4
- text: z.string().describe("HTML encoded text to decode"),
3
+ server.registerTool("html-decode", {
4
+ description: "Decode HTML entities",
5
+ inputSchema: {
6
+ text: z.string().describe("HTML encoded text to decode"),
7
+ }
5
8
  }, async ({ text }) => {
6
9
  const decoded = text
7
10
  .replace(/&amp;/g, '&')
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export function registerHtmlEncode(server) {
3
- server.tool("html-encode", "Encode HTML entities", {
4
- text: z.string().describe("Text to HTML encode"),
3
+ server.registerTool("html-encode", {
4
+ description: "Encode HTML entities",
5
+ inputSchema: {
6
+ text: z.string().describe("Text to HTML encode"),
7
+ }
5
8
  }, async ({ text }) => {
6
9
  const encoded = text
7
10
  .replace(/&/g, '&amp;')
@@ -1,8 +1,11 @@
1
1
  import { z } from "zod";
2
2
  export function registerHtmlEntitiesExtended(server) {
3
- server.tool("html-entities-extended", "Extended HTML entity encoding/decoding", {
4
- text: z.string().describe("Text to encode or decode"),
5
- operation: z.enum(["encode", "decode"]).describe("Operation to perform"),
3
+ server.registerTool("html-entities-extended", {
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
+ }
6
9
  }, async ({ text, operation }) => {
7
10
  try {
8
11
  if (operation === "encode") {
@@ -1,8 +1,11 @@
1
1
  import { z } from "zod";
2
2
  export function registerTextToBinary(server) {
3
- server.tool("text-to-binary", "Convert text to binary and vice versa", {
4
- input: z.string().describe("Text to convert to binary, or binary to convert to text"),
5
- operation: z.enum(["encode", "decode"]).describe("Operation: encode text to binary or decode binary to text"),
3
+ server.registerTool("text-to-binary", {
4
+ description: "Convert text to binary and vice versa",
5
+ inputSchema: {
6
+ input: z.string().describe("Text to convert to binary, or binary to convert to text"),
7
+ operation: z.enum(["encode", "decode"]).describe("Operation: encode text to binary or decode binary to text"),
8
+ }
6
9
  }, async ({ input, operation }) => {
7
10
  try {
8
11
  if (operation === "encode") {
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export function registerUrlDecode(server) {
3
- server.tool("url-decode", "URL decode text", {
4
- text: z.string().describe("URL encoded text to decode"),
3
+ server.registerTool("url-decode", {
4
+ description: "URL decode text",
5
+ inputSchema: {
6
+ text: z.string().describe("URL encoded text to decode"),
7
+ }
5
8
  }, async ({ text }) => {
6
9
  try {
7
10
  const decoded = decodeURIComponent(text);
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export function registerUrlEncode(server) {
3
- server.tool("url-encode", "URL encode text", {
4
- text: z.string().describe("Text to URL encode"),
3
+ server.registerTool("url-encode", {
4
+ description: "URL encode text",
5
+ inputSchema: {
6
+ text: z.string().describe("Text to URL encode"),
7
+ }
5
8
  }, async ({ text }) => {
6
9
  const encoded = encodeURIComponent(text);
7
10
  return {