it-tools-mcp 4.1.8 → 4.1.9
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/build/index.js +20 -6
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -483,7 +483,9 @@ function getAnalysisPrompt(analysisType, content) {
|
|
|
483
483
|
async function loadModularTools(server, category) {
|
|
484
484
|
const toolsDir = path.join(__dirname, 'tools', category);
|
|
485
485
|
if (!fs.existsSync(toolsDir)) {
|
|
486
|
-
|
|
486
|
+
if (isDevelopment) {
|
|
487
|
+
console.warn(`Category directory does not exist: ${toolsDir}`);
|
|
488
|
+
}
|
|
487
489
|
return;
|
|
488
490
|
}
|
|
489
491
|
const toolDirs = fs.readdirSync(toolsDir, { withFileTypes: true })
|
|
@@ -499,22 +501,33 @@ async function loadModularTools(server, category) {
|
|
|
499
501
|
if (registerFunction) {
|
|
500
502
|
try {
|
|
501
503
|
registerFunction(server);
|
|
502
|
-
|
|
504
|
+
// Only log tool loading in development mode
|
|
505
|
+
if (isDevelopment) {
|
|
506
|
+
console.error(`Loaded tool: ${category}/${toolDir}`);
|
|
507
|
+
}
|
|
503
508
|
}
|
|
504
509
|
catch (regError) {
|
|
510
|
+
// Always log errors
|
|
505
511
|
console.error(`Failed to register tool ${category}/${toolDir}:`, regError instanceof Error ? regError.message : 'Unknown registration error');
|
|
506
512
|
}
|
|
507
513
|
}
|
|
508
514
|
else {
|
|
509
|
-
|
|
515
|
+
// Only warn in development mode
|
|
516
|
+
if (isDevelopment) {
|
|
517
|
+
console.warn(`No register function found in ${toolPath}`);
|
|
518
|
+
}
|
|
510
519
|
}
|
|
511
520
|
}
|
|
512
521
|
catch (error) {
|
|
522
|
+
// Always log errors
|
|
513
523
|
console.error(`Failed to load tool ${category}/${toolDir}:`, error instanceof Error ? error.message : 'Unknown error');
|
|
514
524
|
}
|
|
515
525
|
}
|
|
516
526
|
else {
|
|
517
|
-
|
|
527
|
+
// Only warn in development mode
|
|
528
|
+
if (isDevelopment) {
|
|
529
|
+
console.warn(`Tool index file does not exist: ${toolPath}`);
|
|
530
|
+
}
|
|
518
531
|
}
|
|
519
532
|
}
|
|
520
533
|
}
|
|
@@ -608,7 +621,9 @@ async function getCategoryDescription(category, toolNames) {
|
|
|
608
621
|
async function registerAllTools(server) {
|
|
609
622
|
const toolsBaseDir = path.join(__dirname, 'tools');
|
|
610
623
|
if (!fs.existsSync(toolsBaseDir)) {
|
|
611
|
-
|
|
624
|
+
if (isDevelopment) {
|
|
625
|
+
console.warn('Tools directory does not exist:', toolsBaseDir);
|
|
626
|
+
}
|
|
612
627
|
return;
|
|
613
628
|
}
|
|
614
629
|
// Discover categories dynamically from the filesystem
|
|
@@ -789,7 +804,6 @@ server.registerResource("readme", new ResourceTemplate("readme://{section}", {
|
|
|
789
804
|
async function main() {
|
|
790
805
|
try {
|
|
791
806
|
// VS Code MCP Compliance: Dev Mode Support
|
|
792
|
-
const isDevelopment = process.env.NODE_ENV === 'development' || process.env.MCP_DEV_MODE === 'true';
|
|
793
807
|
const isTest = process.env.NODE_ENV === 'test' && process.env.MCP_TEST_MODE === 'true';
|
|
794
808
|
if (isDevelopment) {
|
|
795
809
|
console.error("🔧 IT Tools MCP Server starting in DEVELOPMENT mode");
|
package/package.json
CHANGED