it-tools-mcp 3.2.12 → 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 (117) hide show
  1. package/build/index.js +60 -67
  2. package/build/tools/ansible/ansible-inventory-generator/index.js +5 -2
  3. package/build/tools/ansible/ansible-playbook-validator/index.js +5 -2
  4. package/build/tools/ansible/ansible-reference/index.js +4 -1
  5. package/build/tools/ansible/ansible-vault-decrypt/index.js +6 -3
  6. package/build/tools/ansible/ansible-vault-encrypt/index.js +7 -4
  7. package/build/tools/color/color-hex-to-rgb/index.js +5 -2
  8. package/build/tools/color/color-rgb-to-hex/index.js +7 -4
  9. package/build/tools/crypto/basic-auth-generator/index.js +6 -3
  10. package/build/tools/crypto/bcrypt-hash/index.js +7 -4
  11. package/build/tools/crypto/bip39-generate/index.js +5 -2
  12. package/build/tools/crypto/hash-md5/index.js +5 -2
  13. package/build/tools/crypto/hash-sha1/index.js +5 -2
  14. package/build/tools/crypto/hash-sha256/index.js +5 -2
  15. package/build/tools/crypto/hash-sha512/index.js +5 -2
  16. package/build/tools/crypto/hmac-generator/index.js +7 -4
  17. package/build/tools/crypto/jwt-decode/index.js +5 -2
  18. package/build/tools/crypto/otp-code-generator/index.js +7 -4
  19. package/build/tools/crypto/password-generate/index.js +9 -6
  20. package/build/tools/crypto/token-generator/index.js +7 -4
  21. package/build/tools/dataFormat/html-to-markdown/index.js +5 -2
  22. package/build/tools/dataFormat/json-diff/index.js +6 -3
  23. package/build/tools/dataFormat/json-format/index.js +7 -3
  24. package/build/tools/dataFormat/json-minify/index.js +5 -2
  25. package/build/tools/dataFormat/json-to-csv/index.js +6 -3
  26. package/build/tools/dataFormat/json-to-toml/index.js +5 -2
  27. package/build/tools/dataFormat/markdown-to-html/index.js +5 -2
  28. package/build/tools/dataFormat/phone-format/index.js +6 -3
  29. package/build/tools/dataFormat/sql-format/index.js +6 -3
  30. package/build/tools/dataFormat/toml-to-json/index.js +5 -2
  31. package/build/tools/dataFormat/xml-format/index.js +6 -3
  32. package/build/tools/dataFormat/yaml-format/index.js +5 -2
  33. package/build/tools/development/crontab-generate/index.js +9 -6
  34. package/build/tools/development/html-prettifier/index.js +6 -3
  35. package/build/tools/development/javascript-prettifier/index.js +7 -4
  36. package/build/tools/development/list-converter/index.js +8 -5
  37. package/build/tools/development/markdown-toc-generator/index.js +7 -4
  38. package/build/tools/development/regex-tester/index.js +7 -4
  39. package/build/tools/docker/docker-compose-to-docker-run/index.js +5 -2
  40. package/build/tools/docker/docker-compose-validator/index.js +5 -2
  41. package/build/tools/docker/docker-reference/index.js +4 -1
  42. package/build/tools/docker/docker-run-to-docker-compose/index.js +5 -2
  43. package/build/tools/docker/traefik-compose-generator/index.js +9 -6
  44. package/build/tools/encoding/base64-decode/index.js +6 -2
  45. package/build/tools/encoding/base64-encode/index.js +27 -11
  46. package/build/tools/encoding/html-decode/index.js +5 -2
  47. package/build/tools/encoding/html-encode/index.js +5 -2
  48. package/build/tools/encoding/html-entities-extended/index.js +6 -3
  49. package/build/tools/encoding/text-to-binary/index.js +6 -3
  50. package/build/tools/encoding/url-decode/index.js +5 -2
  51. package/build/tools/encoding/url-encode/index.js +5 -2
  52. package/build/tools/forensic/file-type-identifier/index.js +6 -3
  53. package/build/tools/forensic/safelink-decoder/index.js +5 -2
  54. package/build/tools/forensic/url-fanger/index.js +6 -3
  55. package/build/tools/idGenerators/qr-generate/index.js +6 -3
  56. package/build/tools/idGenerators/svg-placeholder-generator/index.js +9 -6
  57. package/build/tools/idGenerators/ulid-generate/index.js +4 -1
  58. package/build/tools/idGenerators/uuid-generate/index.js +4 -1
  59. package/build/tools/math/math-evaluate/index.js +5 -2
  60. package/build/tools/math/number-base-converter/index.js +7 -4
  61. package/build/tools/math/percentage-calculator/index.js +7 -4
  62. package/build/tools/math/roman-numeral-converter/index.js +5 -2
  63. package/build/tools/math/temperature-converter/index.js +7 -4
  64. package/build/tools/math/unix-timestamp-converter/index.js +5 -2
  65. package/build/tools/network/cat/index.js +5 -2
  66. package/build/tools/network/cidr-to-ip-range/index.js +5 -2
  67. package/build/tools/network/curl/index.js +11 -6
  68. package/build/tools/network/dig/index.js +6 -3
  69. package/build/tools/network/grep/index.js +6 -3
  70. package/build/tools/network/head/index.js +6 -3
  71. package/build/tools/network/iban-validate/index.js +5 -2
  72. package/build/tools/network/ip-range-to-cidr/index.js +6 -3
  73. package/build/tools/network/ip-subnet-calculator/index.js +6 -3
  74. package/build/tools/network/ipv4-subnet-calc/index.js +5 -2
  75. package/build/tools/network/ipv6-subnet-calculator/index.js +6 -3
  76. package/build/tools/network/ipv6-ula-generator/index.js +5 -2
  77. package/build/tools/network/mac-address-generate/index.js +6 -3
  78. package/build/tools/network/nslookup/index.js +5 -2
  79. package/build/tools/network/ping/index.js +9 -4
  80. package/build/tools/network/ps/index.js +4 -1
  81. package/build/tools/network/random-port/index.js +8 -5
  82. package/build/tools/network/scp/index.js +10 -7
  83. package/build/tools/network/ssh/index.js +8 -5
  84. package/build/tools/network/tail/index.js +6 -3
  85. package/build/tools/network/telnet/index.js +6 -3
  86. package/build/tools/network/top/index.js +4 -1
  87. package/build/tools/network/url-parse/index.js +5 -2
  88. package/build/tools/physics/angle-converter/index.js +11 -8
  89. package/build/tools/physics/energy-converter/index.js +13 -10
  90. package/build/tools/physics/power-converter/index.js +13 -10
  91. package/build/tools/text/ascii-art-text/index.js +6 -3
  92. package/build/tools/text/distinct-words/index.js +5 -2
  93. package/build/tools/text/emoji-search/index.js +5 -2
  94. package/build/tools/text/lorem-ipsum-generator/index.js +6 -3
  95. package/build/tools/text/numeronym-generator/index.js +5 -2
  96. package/build/tools/text/slugify-string/index.js +7 -4
  97. package/build/tools/text/string-obfuscator/index.js +6 -3
  98. package/build/tools/text/text-camelcase/index.js +5 -2
  99. package/build/tools/text/text-capitalize/index.js +5 -2
  100. package/build/tools/text/text-diff/index.js +6 -3
  101. package/build/tools/text/text-kebabcase/index.js +5 -2
  102. package/build/tools/text/text-lowercase/index.js +5 -2
  103. package/build/tools/text/text-pascalcase/index.js +5 -2
  104. package/build/tools/text/text-snakecase/index.js +5 -2
  105. package/build/tools/text/text-stats/index.js +5 -2
  106. package/build/tools/text/text-to-nato-alphabet/index.js +6 -3
  107. package/build/tools/text/text-to-unicode/index.js +6 -3
  108. package/build/tools/text/text-to-unicode-names/index.js +5 -2
  109. package/build/tools/text/text-uppercase/index.js +5 -2
  110. package/build/tools/utility/css-prettifier/index.js +6 -3
  111. package/build/tools/utility/device-info/index.js +4 -1
  112. package/build/tools/utility/email-normalizer/index.js +5 -2
  113. package/build/tools/utility/http-status-codes/index.js +5 -2
  114. package/build/tools/utility/mime-types/index.js +6 -3
  115. package/build/tools/utility/port-numbers/index.js +5 -2
  116. package/build/tools/utility/rem-px-converter/index.js +8 -4
  117. package/package.json +1 -1
@@ -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(/&/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, '&')
@@ -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 {
@@ -1,9 +1,12 @@
1
1
  import { z } from "zod";
2
2
  import { Buffer } from 'buffer';
3
3
  export function registerFileTypeIdentifier(server) {
4
- server.tool("file-type-identifier", "Identify file type based on magic numbers/file signatures", {
5
- data: z.string().describe("Hex data or base64 data of file header"),
6
- format: z.enum(["hex", "base64"]).describe("Format of the input data")
4
+ server.registerTool("file-type-identifier", {
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
+ }
7
10
  }, async ({ data, format }) => {
8
11
  try {
9
12
  let buffer;
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export function registerSafelinkDecoder(server) {
3
- server.tool("safelink-decoder", "Decode Microsoft Outlook SafeLink URLs", {
4
- safelink: z.string().describe("SafeLink URL to decode")
3
+ server.registerTool("safelink-decoder", {
4
+ description: "Decode Microsoft Outlook SafeLink URLs",
5
+ inputSchema: {
6
+ safelink: z.string().describe("SafeLink URL to decode")
7
+ }
5
8
  }, async ({ safelink }) => {
6
9
  try {
7
10
  const url = new URL(safelink);
@@ -1,8 +1,11 @@
1
1
  import { z } from "zod";
2
2
  export function registerUrlFanger(server) {
3
- server.tool("url-fanger", "Defang or refang URLs for safe sharing (security analysis)", {
4
- text: z.string().describe("Text containing URLs to fang/defang"),
5
- operation: z.enum(["defang", "refang"]).describe("Whether to defang (make safe) or refang (restore) URLs")
3
+ server.registerTool("url-fanger", {
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
+ }
6
9
  }, async ({ text, operation }) => {
7
10
  try {
8
11
  let result = text;
@@ -1,8 +1,11 @@
1
1
  import { z } from "zod";
2
2
  export function registerQrGenerate(server) {
3
- server.tool("qr-generate", "Generate QR code for any text including URLs, WiFi networks, contact info, etc.", {
4
- text: z.string().describe("Text to encode in QR code (URLs, WiFi: WIFI:T:WPA;S:network;P:password;;, contact info, etc.)"),
5
- size: z.number().describe("Size multiplier (1-3)").optional(),
3
+ server.registerTool("qr-generate", {
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
+ }
6
9
  }, async ({ text, size = 1 }) => {
7
10
  try {
8
11
  const QRCode = (await import("qrcode")).default;
@@ -1,11 +1,14 @@
1
1
  import { z } from "zod";
2
2
  export function registerSvgPlaceholderGenerator(server) {
3
- server.tool("svg-placeholder-generator", "Generate SVG placeholder images", {
4
- width: z.number().describe("Width in pixels").optional(),
5
- height: z.number().describe("Height in pixels").optional(),
6
- backgroundColor: z.string().describe("Background color (hex)").optional(),
7
- textColor: z.string().describe("Text color (hex)").optional(),
8
- text: z.string().optional().describe("Custom text (default: dimensions)"),
3
+ server.registerTool("svg-placeholder-generator", {
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
+ }
9
12
  }, async ({ width = 300, height = 200, backgroundColor = "#cccccc", textColor = "#666666", text }) => {
10
13
  try {
11
14
  if (width < 1 || width > 2000 || height < 1 || height > 2000) {
@@ -1,5 +1,8 @@
1
1
  export function registerUlidGenerate(server) {
2
- server.tool("ulid-generate", "Generate Universally Unique Lexicographically Sortable Identifier", {}, async () => {
2
+ server.registerTool("ulid-generate", {
3
+ description: "Generate Universally Unique Lexicographically Sortable Identifier",
4
+ inputSchema: {}
5
+ }, async () => {
3
6
  try {
4
7
  // Simplified ULID implementation
5
8
  const timestamp = Date.now();
@@ -1,6 +1,9 @@
1
1
  import { randomUUID } from "crypto";
2
2
  export function registerUuidGenerate(server) {
3
- server.tool("uuid-generate", "Generate a random UUID v4", {}, async () => {
3
+ server.registerTool("uuid-generate", {
4
+ description: 'Generate a universally unique identifier (UUID). Example: generates "550e8400-e29b-41d4-a716-446655440000"',
5
+ inputSchema: {}
6
+ }, async () => {
4
7
  const uuid = randomUUID();
5
8
  return {
6
9
  content: [
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export function registerMathEvaluate(server) {
3
- server.tool("math-evaluate", "Safely evaluate mathematical expressions", {
4
- expression: z.string().describe("Mathematical expression to evaluate (e.g., '2 + 3 * 4')")
3
+ server.registerTool("math-evaluate", {
4
+ description: "Safely evaluate mathematical expressions",
5
+ inputSchema: {
6
+ expression: z.string().describe("Mathematical expression to evaluate (e.g., '2 + 3 * 4')")
7
+ }
5
8
  }, async ({ expression }) => {
6
9
  try {
7
10
  // @ts-ignore: Ignore missing type declarations for mathjs
@@ -1,9 +1,12 @@
1
1
  import { z } from "zod";
2
2
  export function registerNumberBaseConverter(server) {
3
- server.tool("number-base-converter", "Convert numbers between different bases (binary, octal, decimal, hexadecimal)", {
4
- number: z.string().describe("Number to convert"),
5
- fromBase: z.number().describe("Source base (2-36)"),
6
- toBase: z.number().describe("Target base (2-36)")
3
+ server.registerTool("number-base-converter", {
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
+ }
7
10
  }, async ({ number, fromBase, toBase }) => {
8
11
  try {
9
12
  if (fromBase < 2 || fromBase > 36 || toBase < 2 || toBase > 36) {
@@ -1,9 +1,12 @@
1
1
  import { z } from "zod";
2
2
  export function registerPercentageCalculator(server) {
3
- server.tool("percentage-calculator", "Calculate percentages, percentage of a number, or percentage change", {
4
- operation: z.enum(["percentage-of", "what-percentage", "percentage-change"]).describe("Type of percentage calculation"),
5
- value1: z.number().describe("First value"),
6
- value2: z.number().describe("Second value")
3
+ server.registerTool("percentage-calculator", {
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
+ }
7
10
  }, async ({ operation, value1, value2 }) => {
8
11
  try {
9
12
  let result;
@@ -1,7 +1,10 @@
1
1
  import { z } from "zod";
2
2
  export function registerRomanNumeralConverter(server) {
3
- server.tool("roman-numeral-converter", "Convert between Arabic numbers and Roman numerals", {
4
- input: z.string().describe("Number to convert (Arabic number 1-3999 or Roman numeral)")
3
+ server.registerTool("roman-numeral-converter", {
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
+ }
5
8
  }, async ({ input }) => {
6
9
  try {
7
10
  // Auto-detect if input is a number or Roman numeral
@@ -1,9 +1,12 @@
1
1
  import { z } from "zod";
2
2
  export function registerTemperatureConverter(server) {
3
- server.tool("temperature-converter", "Convert temperatures between Celsius, Fahrenheit, and Kelvin", {
4
- temperature: z.number().describe("Temperature value to convert"),
5
- from: z.enum(["celsius", "fahrenheit", "kelvin"]).describe("Source temperature unit"),
6
- to: z.enum(["celsius", "fahrenheit", "kelvin"]).describe("Target temperature unit")
3
+ server.registerTool("temperature-converter", {
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
+ }
7
10
  }, async ({ temperature, from, to }) => {
8
11
  try {
9
12
  // Convert to Celsius first