chore: add pre-built dist folder for npx usage

This commit is contained in:
thesved
2025-12-04 20:22:02 +02:00
committed by Romuald Członkowski
parent a70d96a373
commit 5057481e70
716 changed files with 48021 additions and 0 deletions

29
dist/mcp/handlers-n8n-manager.d.ts vendored Normal file
View File

@@ -0,0 +1,29 @@
import { N8nApiClient } from '../services/n8n-api-client';
import { McpToolResponse } from '../types/n8n-api';
import { NodeRepository } from '../database/node-repository';
import { InstanceContext } from '../types/instance-context';
import { TemplateService } from '../templates/template-service';
export declare function getInstanceCacheStatistics(): string;
export declare function getInstanceCacheMetrics(): import("../utils/cache-utils").CacheMetrics;
export declare function clearInstanceCache(): void;
export declare function getN8nApiClient(context?: InstanceContext): N8nApiClient | null;
export declare function handleCreateWorkflow(args: unknown, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleGetWorkflow(args: unknown, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleGetWorkflowDetails(args: unknown, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleGetWorkflowStructure(args: unknown, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleGetWorkflowMinimal(args: unknown, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleUpdateWorkflow(args: unknown, repository: NodeRepository, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleDeleteWorkflow(args: unknown, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleListWorkflows(args: unknown, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleValidateWorkflow(args: unknown, repository: NodeRepository, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleAutofixWorkflow(args: unknown, repository: NodeRepository, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleTestWorkflow(args: unknown, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleGetExecution(args: unknown, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleListExecutions(args: unknown, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleDeleteExecution(args: unknown, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleHealthCheck(context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleDiagnostic(request: any, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleWorkflowVersions(args: unknown, repository: NodeRepository, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleDeployTemplate(args: unknown, templateService: TemplateService, repository: NodeRepository, context?: InstanceContext): Promise<McpToolResponse>;
export declare function handleTriggerWebhookWorkflow(args: unknown, context?: InstanceContext): Promise<McpToolResponse>;
//# sourceMappingURL=handlers-n8n-manager.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"handlers-n8n-manager.d.ts","sourceRoot":"","sources":["../../src/mcp/handlers-n8n-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAML,eAAe,EAGhB,MAAM,kBAAkB,CAAC;AAkB1B,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAA2B,MAAM,2BAA2B,CAAC;AAOrF,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAqNhE,wBAAgB,0BAA0B,IAAI,MAAM,CAEnD;AAMD,wBAAgB,uBAAuB,gDAEtC;AAKD,wBAAgB,kBAAkB,IAAI,IAAI,CAIzC;AAED,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,YAAY,GAAG,IAAI,CAgF9E;AAqHD,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CA8E7G;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAiC1G;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe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7G;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAiC9G;AAID,wBAAsB,iBAAiB,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAwG3F;AAkLD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAkQxG;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,cAAc,EAC1B,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,eAAe,CAAC,CAsL1B;AA+BD,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,OAAO,EACb,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,cAAc,EAC1B,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,eAAe,CAAC,CAoM1B;AAQD,wBAAsB,4BAA4B,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAyErH"}

1993
dist/mcp/handlers-n8n-manager.js vendored Normal file

File diff suppressed because it is too large Load Diff

1
dist/mcp/handlers-n8n-manager.js.map vendored Normal file

File diff suppressed because one or more lines are too long

5
dist/mcp/handlers-workflow-diff.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
import { McpToolResponse } from '../types/n8n-api';
import { InstanceContext } from '../types/instance-context';
import { NodeRepository } from '../database/node-repository';
export declare function handleUpdatePartialWorkflow(args: unknown, repository: NodeRepository, context?: InstanceContext): Promise<McpToolResponse>;
//# sourceMappingURL=handlers-workflow-diff.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"handlers-workflow-diff.d.ts","sourceRoot":"","sources":["../../src/mcp/handlers-workflow-diff.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAMnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AA0D7D,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,cAAc,EAC1B,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,eAAe,CAAC,CA2V1B"}

459
dist/mcp/handlers-workflow-diff.js vendored Normal file
View File

@@ -0,0 +1,459 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.handleUpdatePartialWorkflow = handleUpdatePartialWorkflow;
const zod_1 = require("zod");
const workflow_diff_engine_1 = require("../services/workflow-diff-engine");
const handlers_n8n_manager_1 = require("./handlers-n8n-manager");
const n8n_errors_1 = require("../utils/n8n-errors");
const logger_1 = require("../utils/logger");
const n8n_validation_1 = require("../services/n8n-validation");
const workflow_versioning_service_1 = require("../services/workflow-versioning-service");
const workflow_validator_1 = require("../services/workflow-validator");
const enhanced_config_validator_1 = require("../services/enhanced-config-validator");
let cachedValidator = null;
function getValidator(repository) {
if (!cachedValidator) {
cachedValidator = new workflow_validator_1.WorkflowValidator(repository, enhanced_config_validator_1.EnhancedConfigValidator);
}
return cachedValidator;
}
const workflowDiffSchema = zod_1.z.object({
id: zod_1.z.string(),
operations: zod_1.z.array(zod_1.z.object({
type: zod_1.z.string(),
description: zod_1.z.string().optional(),
node: zod_1.z.any().optional(),
nodeId: zod_1.z.string().optional(),
nodeName: zod_1.z.string().optional(),
updates: zod_1.z.any().optional(),
position: zod_1.z.tuple([zod_1.z.number(), zod_1.z.number()]).optional(),
source: zod_1.z.string().optional(),
target: zod_1.z.string().optional(),
from: zod_1.z.string().optional(),
to: zod_1.z.string().optional(),
sourceOutput: zod_1.z.string().optional(),
targetInput: zod_1.z.string().optional(),
sourceIndex: zod_1.z.number().optional(),
targetIndex: zod_1.z.number().optional(),
branch: zod_1.z.enum(['true', 'false']).optional(),
case: zod_1.z.number().optional(),
ignoreErrors: zod_1.z.boolean().optional(),
dryRun: zod_1.z.boolean().optional(),
connections: zod_1.z.any().optional(),
settings: zod_1.z.any().optional(),
name: zod_1.z.string().optional(),
tag: zod_1.z.string().optional(),
})),
validateOnly: zod_1.z.boolean().optional(),
continueOnError: zod_1.z.boolean().optional(),
createBackup: zod_1.z.boolean().optional(),
intent: zod_1.z.string().optional(),
});
async function handleUpdatePartialWorkflow(args, repository, context) {
const startTime = Date.now();
const sessionId = `mutation_${Date.now()}_${Math.random().toString(36).slice(2, 11)}`;
let workflowBefore = null;
let validationBefore = null;
let validationAfter = null;
try {
if (process.env.DEBUG_MCP === 'true') {
logger_1.logger.debug('Workflow diff request received', {
argsType: typeof args,
hasWorkflowId: args && typeof args === 'object' && 'workflowId' in args,
operationCount: args && typeof args === 'object' && 'operations' in args ?
args.operations?.length : 0
});
}
const input = workflowDiffSchema.parse(args);
const client = (0, handlers_n8n_manager_1.getN8nApiClient)(context);
if (!client) {
return {
success: false,
error: 'n8n API not configured. Please set N8N_API_URL and N8N_API_KEY environment variables.'
};
}
let workflow;
try {
workflow = await client.getWorkflow(input.id);
workflowBefore = JSON.parse(JSON.stringify(workflow));
try {
const validator = getValidator(repository);
validationBefore = await validator.validateWorkflow(workflowBefore, {
validateNodes: true,
validateConnections: true,
validateExpressions: true,
profile: 'runtime'
});
}
catch (validationError) {
logger_1.logger.debug('Pre-mutation validation failed (non-blocking):', validationError);
validationBefore = {
valid: false,
errors: [{ type: 'validation_error', message: 'Validation failed' }]
};
}
}
catch (error) {
if (error instanceof n8n_errors_1.N8nApiError) {
return {
success: false,
error: (0, n8n_errors_1.getUserFriendlyErrorMessage)(error),
code: error.code
};
}
throw error;
}
if (input.createBackup !== false && !input.validateOnly) {
try {
const versioningService = new workflow_versioning_service_1.WorkflowVersioningService(repository, client);
const backupResult = await versioningService.createBackup(input.id, workflow, {
trigger: 'partial_update',
operations: input.operations
});
logger_1.logger.info('Workflow backup created', {
workflowId: input.id,
versionId: backupResult.versionId,
versionNumber: backupResult.versionNumber,
pruned: backupResult.pruned
});
}
catch (error) {
logger_1.logger.warn('Failed to create workflow backup', {
workflowId: input.id,
error: error.message
});
}
}
const diffEngine = new workflow_diff_engine_1.WorkflowDiffEngine();
const diffRequest = input;
const diffResult = await diffEngine.applyDiff(workflow, diffRequest);
if (!diffResult.success) {
if (diffRequest.continueOnError && diffResult.workflow && diffResult.operationsApplied && diffResult.operationsApplied > 0) {
logger_1.logger.info(`continueOnError mode: Applying ${diffResult.operationsApplied} successful operations despite ${diffResult.failed?.length || 0} failures`);
}
else {
return {
success: false,
error: 'Failed to apply diff operations',
details: {
errors: diffResult.errors,
warnings: diffResult.warnings,
operationsApplied: diffResult.operationsApplied,
applied: diffResult.applied,
failed: diffResult.failed
}
};
}
}
if (input.validateOnly) {
return {
success: true,
message: diffResult.message,
data: {
valid: true,
operationsToApply: input.operations.length
},
details: {
warnings: diffResult.warnings
}
};
}
if (diffResult.workflow) {
const structureErrors = (0, n8n_validation_1.validateWorkflowStructure)(diffResult.workflow);
if (structureErrors.length > 0) {
const skipValidation = process.env.SKIP_WORKFLOW_VALIDATION === 'true';
logger_1.logger.warn('Workflow structure validation failed after applying diff operations', {
workflowId: input.id,
errors: structureErrors,
blocking: !skipValidation
});
const errorTypes = new Set();
structureErrors.forEach(err => {
if (err.includes('operator') || err.includes('singleValue'))
errorTypes.add('operator_issues');
if (err.includes('connection') || err.includes('referenced'))
errorTypes.add('connection_issues');
if (err.includes('Missing') || err.includes('missing'))
errorTypes.add('missing_metadata');
if (err.includes('branch') || err.includes('output'))
errorTypes.add('branch_mismatch');
});
const recoverySteps = [];
if (errorTypes.has('operator_issues')) {
recoverySteps.push('Operator structure issue detected. Use validate_node_operation to check specific nodes.');
recoverySteps.push('Binary operators (equals, contains, greaterThan, etc.) must NOT have singleValue:true');
recoverySteps.push('Unary operators (isEmpty, isNotEmpty, true, false) REQUIRE singleValue:true');
}
if (errorTypes.has('connection_issues')) {
recoverySteps.push('Connection validation failed. Check all node connections reference existing nodes.');
recoverySteps.push('Use cleanStaleConnections operation to remove connections to non-existent nodes.');
}
if (errorTypes.has('missing_metadata')) {
recoverySteps.push('Missing metadata detected. Ensure filter-based nodes (IF v2.2+, Switch v3.2+) have complete conditions.options.');
recoverySteps.push('Required options: {version: 2, leftValue: "", caseSensitive: true, typeValidation: "strict"}');
}
if (errorTypes.has('branch_mismatch')) {
recoverySteps.push('Branch count mismatch. Ensure Switch nodes have outputs for all rules (e.g., 3 rules = 3 output branches).');
}
if (recoverySteps.length === 0) {
recoverySteps.push('Review the validation errors listed above');
recoverySteps.push('Fix issues using updateNode or cleanStaleConnections operations');
recoverySteps.push('Run validate_workflow again to verify fixes');
}
const errorMessage = structureErrors.length === 1
? `Workflow validation failed: ${structureErrors[0]}`
: `Workflow validation failed with ${structureErrors.length} structural issues`;
if (!skipValidation) {
return {
success: false,
error: errorMessage,
details: {
errors: structureErrors,
errorCount: structureErrors.length,
operationsApplied: diffResult.operationsApplied,
applied: diffResult.applied,
recoveryGuidance: recoverySteps,
note: 'Operations were applied but created an invalid workflow structure. The workflow was NOT saved to n8n to prevent UI rendering errors.',
autoSanitizationNote: 'Auto-sanitization runs on all nodes during updates to fix operator structures and add missing metadata. However, it cannot fix all issues (e.g., broken connections, branch mismatches). Use the recovery guidance above to resolve remaining issues.'
}
};
}
logger_1.logger.info('Workflow validation skipped (SKIP_WORKFLOW_VALIDATION=true): Allowing workflow with validation warnings to proceed', {
workflowId: input.id,
warningCount: structureErrors.length
});
}
}
try {
const updatedWorkflow = await client.updateWorkflow(input.id, diffResult.workflow);
let finalWorkflow = updatedWorkflow;
let activationMessage = '';
try {
const validator = getValidator(repository);
validationAfter = await validator.validateWorkflow(finalWorkflow, {
validateNodes: true,
validateConnections: true,
validateExpressions: true,
profile: 'runtime'
});
}
catch (validationError) {
logger_1.logger.debug('Post-mutation validation failed (non-blocking):', validationError);
validationAfter = {
valid: false,
errors: [{ type: 'validation_error', message: 'Validation failed' }]
};
}
if (diffResult.shouldActivate) {
try {
finalWorkflow = await client.activateWorkflow(input.id);
activationMessage = ' Workflow activated.';
}
catch (activationError) {
logger_1.logger.error('Failed to activate workflow after update', activationError);
return {
success: false,
error: 'Workflow updated successfully but activation failed',
details: {
workflowUpdated: true,
activationError: activationError instanceof Error ? activationError.message : 'Unknown error'
}
};
}
}
else if (diffResult.shouldDeactivate) {
try {
finalWorkflow = await client.deactivateWorkflow(input.id);
activationMessage = ' Workflow deactivated.';
}
catch (deactivationError) {
logger_1.logger.error('Failed to deactivate workflow after update', deactivationError);
return {
success: false,
error: 'Workflow updated successfully but deactivation failed',
details: {
workflowUpdated: true,
deactivationError: deactivationError instanceof Error ? deactivationError.message : 'Unknown error'
}
};
}
}
if (workflowBefore && !input.validateOnly) {
trackWorkflowMutation({
sessionId,
toolName: 'n8n_update_partial_workflow',
userIntent: input.intent || 'Partial workflow update',
operations: input.operations,
workflowBefore,
workflowAfter: finalWorkflow,
validationBefore,
validationAfter,
mutationSuccess: true,
durationMs: Date.now() - startTime,
}).catch(err => {
logger_1.logger.debug('Failed to track mutation telemetry:', err);
});
}
return {
success: true,
data: finalWorkflow,
message: `Workflow "${finalWorkflow.name}" updated successfully. Applied ${diffResult.operationsApplied} operations.${activationMessage}`,
details: {
operationsApplied: diffResult.operationsApplied,
workflowId: finalWorkflow.id,
workflowName: finalWorkflow.name,
active: finalWorkflow.active,
applied: diffResult.applied,
failed: diffResult.failed,
errors: diffResult.errors,
warnings: diffResult.warnings
}
};
}
catch (error) {
if (workflowBefore && !input.validateOnly) {
trackWorkflowMutation({
sessionId,
toolName: 'n8n_update_partial_workflow',
userIntent: input.intent || 'Partial workflow update',
operations: input.operations,
workflowBefore,
workflowAfter: workflowBefore,
validationBefore,
validationAfter: validationBefore,
mutationSuccess: false,
mutationError: error instanceof Error ? error.message : 'Unknown error',
durationMs: Date.now() - startTime,
}).catch(err => {
logger_1.logger.warn('Failed to track mutation telemetry for failed operation:', err);
});
}
if (error instanceof n8n_errors_1.N8nApiError) {
return {
success: false,
error: (0, n8n_errors_1.getUserFriendlyErrorMessage)(error),
code: error.code,
details: error.details
};
}
throw error;
}
}
catch (error) {
if (error instanceof zod_1.z.ZodError) {
return {
success: false,
error: 'Invalid input',
details: { errors: error.errors }
};
}
logger_1.logger.error('Failed to update partial workflow', error);
return {
success: false,
error: error instanceof Error ? error.message : 'Unknown error occurred'
};
}
}
function inferIntentFromOperations(operations) {
if (!operations || operations.length === 0) {
return 'Partial workflow update';
}
const opTypes = operations.map((op) => op.type);
const opCount = operations.length;
if (opCount === 1) {
const op = operations[0];
switch (op.type) {
case 'addNode':
return `Add ${op.node?.type || 'node'}`;
case 'removeNode':
return `Remove node ${op.nodeName || op.nodeId || ''}`.trim();
case 'updateNode':
return `Update node ${op.nodeName || op.nodeId || ''}`.trim();
case 'addConnection':
return `Connect ${op.source || 'node'} to ${op.target || 'node'}`;
case 'removeConnection':
return `Disconnect ${op.source || 'node'} from ${op.target || 'node'}`;
case 'rewireConnection':
return `Rewire ${op.source || 'node'} from ${op.from || ''} to ${op.to || ''}`.trim();
case 'updateName':
return `Rename workflow to "${op.name || ''}"`;
case 'activateWorkflow':
return 'Activate workflow';
case 'deactivateWorkflow':
return 'Deactivate workflow';
default:
return `Workflow ${op.type}`;
}
}
const typeSet = new Set(opTypes);
const summary = [];
if (typeSet.has('addNode')) {
const count = opTypes.filter((t) => t === 'addNode').length;
summary.push(`add ${count} node${count > 1 ? 's' : ''}`);
}
if (typeSet.has('removeNode')) {
const count = opTypes.filter((t) => t === 'removeNode').length;
summary.push(`remove ${count} node${count > 1 ? 's' : ''}`);
}
if (typeSet.has('updateNode')) {
const count = opTypes.filter((t) => t === 'updateNode').length;
summary.push(`update ${count} node${count > 1 ? 's' : ''}`);
}
if (typeSet.has('addConnection') || typeSet.has('rewireConnection')) {
summary.push('modify connections');
}
if (typeSet.has('updateName') || typeSet.has('updateSettings')) {
summary.push('update metadata');
}
return summary.length > 0
? `Workflow update: ${summary.join(', ')}`
: `Workflow update: ${opCount} operations`;
}
async function trackWorkflowMutation(data) {
try {
if (!data.userIntent ||
data.userIntent === 'Partial workflow update' ||
data.userIntent.length < 10) {
data.userIntent = inferIntentFromOperations(data.operations);
}
const { telemetry } = await Promise.resolve().then(() => __importStar(require('../telemetry/telemetry-manager.js')));
await telemetry.trackWorkflowMutation(data);
}
catch (error) {
logger_1.logger.debug('Telemetry tracking failed:', error);
}
}
//# sourceMappingURL=handlers-workflow-diff.js.map

File diff suppressed because one or more lines are too long

3
dist/mcp/index.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env node
export {};
//# sourceMappingURL=index.d.ts.map

1
dist/mcp/index.d.ts.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":""}

219
dist/mcp/index.js vendored Normal file
View File

@@ -0,0 +1,219 @@
#!/usr/bin/env node
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const server_1 = require("./server");
const logger_1 = require("../utils/logger");
const config_manager_1 = require("../telemetry/config-manager");
const early_error_logger_1 = require("../telemetry/early-error-logger");
const startup_checkpoints_1 = require("../telemetry/startup-checkpoints");
const fs_1 = require("fs");
process.on('uncaughtException', (error) => {
if (process.env.MCP_MODE !== 'stdio') {
console.error('Uncaught Exception:', error);
}
logger_1.logger.error('Uncaught Exception:', error);
process.exit(1);
});
process.on('unhandledRejection', (reason, promise) => {
if (process.env.MCP_MODE !== 'stdio') {
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
}
logger_1.logger.error('Unhandled Rejection:', reason);
process.exit(1);
});
function isContainerEnvironment() {
const dockerEnv = (process.env.IS_DOCKER || '').toLowerCase();
const containerEnv = (process.env.IS_CONTAINER || '').toLowerCase();
if (['true', '1', 'yes'].includes(dockerEnv)) {
return true;
}
if (['true', '1', 'yes'].includes(containerEnv)) {
return true;
}
try {
return (0, fs_1.existsSync)('/.dockerenv') || (0, fs_1.existsSync)('/run/.containerenv');
}
catch (error) {
logger_1.logger.debug('Container detection filesystem check failed:', error);
return false;
}
}
async function main() {
const startTime = Date.now();
const earlyLogger = early_error_logger_1.EarlyErrorLogger.getInstance();
const checkpoints = [];
try {
earlyLogger.logCheckpoint(startup_checkpoints_1.STARTUP_CHECKPOINTS.PROCESS_STARTED);
checkpoints.push(startup_checkpoints_1.STARTUP_CHECKPOINTS.PROCESS_STARTED);
const args = process.argv.slice(2);
if (args.length > 0 && args[0] === 'telemetry') {
const telemetryConfig = config_manager_1.TelemetryConfigManager.getInstance();
const action = args[1];
switch (action) {
case 'enable':
telemetryConfig.enable();
process.exit(0);
break;
case 'disable':
telemetryConfig.disable();
process.exit(0);
break;
case 'status':
console.log(telemetryConfig.getStatus());
process.exit(0);
break;
default:
console.log(`
Usage: n8n-mcp telemetry [command]
Commands:
enable Enable anonymous telemetry
disable Disable anonymous telemetry
status Show current telemetry status
Learn more: https://github.com/czlonkowski/n8n-mcp/blob/main/PRIVACY.md
`);
process.exit(args[1] ? 1 : 0);
}
}
const mode = process.env.MCP_MODE || 'stdio';
earlyLogger.logCheckpoint(startup_checkpoints_1.STARTUP_CHECKPOINTS.TELEMETRY_INITIALIZING);
checkpoints.push(startup_checkpoints_1.STARTUP_CHECKPOINTS.TELEMETRY_INITIALIZING);
earlyLogger.logCheckpoint(startup_checkpoints_1.STARTUP_CHECKPOINTS.TELEMETRY_READY);
checkpoints.push(startup_checkpoints_1.STARTUP_CHECKPOINTS.TELEMETRY_READY);
try {
if (mode === 'http') {
console.error(`Starting n8n Documentation MCP Server in ${mode} mode...`);
console.error('Current directory:', process.cwd());
console.error('Node version:', process.version);
}
earlyLogger.logCheckpoint(startup_checkpoints_1.STARTUP_CHECKPOINTS.MCP_HANDSHAKE_STARTING);
checkpoints.push(startup_checkpoints_1.STARTUP_CHECKPOINTS.MCP_HANDSHAKE_STARTING);
if (mode === 'http') {
if (process.env.USE_FIXED_HTTP === 'true') {
const { startFixedHTTPServer } = await Promise.resolve().then(() => __importStar(require('../http-server')));
await startFixedHTTPServer();
}
else {
const { SingleSessionHTTPServer } = await Promise.resolve().then(() => __importStar(require('../http-server-single-session')));
const server = new SingleSessionHTTPServer();
const shutdown = async () => {
await server.shutdown();
process.exit(0);
};
process.on('SIGTERM', shutdown);
process.on('SIGINT', shutdown);
await server.start();
}
}
else {
const server = new server_1.N8NDocumentationMCPServer(undefined, earlyLogger);
let isShuttingDown = false;
const shutdown = async (signal = 'UNKNOWN') => {
if (isShuttingDown)
return;
isShuttingDown = true;
try {
logger_1.logger.info(`Shutdown initiated by: ${signal}`);
await server.shutdown();
if (process.stdin && !process.stdin.destroyed) {
process.stdin.pause();
process.stdin.destroy();
}
setTimeout(() => {
logger_1.logger.warn('Shutdown timeout exceeded, forcing exit');
process.exit(0);
}, 1000).unref();
}
catch (error) {
logger_1.logger.error('Error during shutdown:', error);
process.exit(1);
}
};
process.on('SIGTERM', () => shutdown('SIGTERM'));
process.on('SIGINT', () => shutdown('SIGINT'));
process.on('SIGHUP', () => shutdown('SIGHUP'));
const isContainer = isContainerEnvironment();
if (!isContainer && process.stdin.readable && !process.stdin.destroyed) {
try {
process.stdin.on('end', () => shutdown('STDIN_END'));
process.stdin.on('close', () => shutdown('STDIN_CLOSE'));
}
catch (error) {
logger_1.logger.error('Failed to register stdin handlers, using signal handlers only:', error);
}
}
await server.run();
}
earlyLogger.logCheckpoint(startup_checkpoints_1.STARTUP_CHECKPOINTS.MCP_HANDSHAKE_COMPLETE);
checkpoints.push(startup_checkpoints_1.STARTUP_CHECKPOINTS.MCP_HANDSHAKE_COMPLETE);
earlyLogger.logCheckpoint(startup_checkpoints_1.STARTUP_CHECKPOINTS.SERVER_READY);
checkpoints.push(startup_checkpoints_1.STARTUP_CHECKPOINTS.SERVER_READY);
const startupDuration = Date.now() - startTime;
earlyLogger.logStartupSuccess(checkpoints, startupDuration);
logger_1.logger.info(`Server startup completed in ${startupDuration}ms (${checkpoints.length} checkpoints passed)`);
}
catch (error) {
const failedCheckpoint = (0, startup_checkpoints_1.findFailedCheckpoint)(checkpoints);
earlyLogger.logStartupError(failedCheckpoint, error);
if (mode !== 'stdio') {
console.error('Failed to start MCP server:', error);
logger_1.logger.error('Failed to start MCP server', error);
if (error instanceof Error && error.message.includes('nodes.db not found')) {
console.error('\nTo fix this issue:');
console.error('1. cd to the n8n-mcp directory');
console.error('2. Run: npm run build');
console.error('3. Run: npm run rebuild');
}
else if (error instanceof Error && error.message.includes('NODE_MODULE_VERSION')) {
console.error('\nTo fix this Node.js version mismatch:');
console.error('1. cd to the n8n-mcp directory');
console.error('2. Run: npm rebuild better-sqlite3');
console.error('3. If that doesn\'t work, try: rm -rf node_modules && npm install');
}
}
process.exit(1);
}
}
catch (outerError) {
logger_1.logger.error('Critical startup error:', outerError);
process.exit(1);
}
}
if (require.main === module) {
main().catch(console.error);
}
//# sourceMappingURL=index.js.map

1
dist/mcp/index.js.map vendored Normal file

File diff suppressed because one or more lines are too long

79
dist/mcp/server.d.ts vendored Normal file
View File

@@ -0,0 +1,79 @@
import { InstanceContext } from '../types/instance-context';
import { EarlyErrorLogger } from '../telemetry/early-error-logger';
export declare class N8NDocumentationMCPServer {
private server;
private db;
private repository;
private templateService;
private initialized;
private cache;
private clientInfo;
private instanceContext?;
private previousTool;
private previousToolTimestamp;
private earlyLogger;
private disabledToolsCache;
constructor(instanceContext?: InstanceContext, earlyLogger?: EarlyErrorLogger);
private initializeDatabase;
private initializeInMemorySchema;
private parseSQLStatements;
private ensureInitialized;
private dbHealthChecked;
private validateDatabaseHealth;
private getDisabledTools;
private setupHandlers;
private sanitizeValidationResult;
private validateToolParams;
private validateToolParamsBasic;
private validateExtractedArgs;
private listNodes;
private getNodeInfo;
private searchNodes;
private searchNodesFTS;
private searchNodesFuzzy;
private calculateFuzzyScore;
private getEditDistance;
private searchNodesLIKE;
private calculateRelevance;
private calculateRelevanceScore;
private rankSearchResults;
private listAITools;
private getNodeDocumentation;
private getDatabaseStatistics;
private getNodeEssentials;
private getNode;
private handleInfoMode;
private handleVersionMode;
private getVersionSummary;
private getVersionHistory;
private compareVersions;
private getBreakingChanges;
private getMigrations;
private enrichPropertyWithTypeInfo;
private enrichPropertiesWithTypeInfo;
private searchNodeProperties;
private getPropertyValue;
private listTasks;
private validateNodeConfig;
private getPropertyDependencies;
private getNodeAsToolInfo;
private getOutputDescriptions;
private getCommonAIToolUseCases;
private getAIToolExamples;
private validateNodeMinimal;
private getToolsDocumentation;
connect(transport: any): Promise<void>;
private listTemplates;
private listNodeTemplates;
private getTemplate;
private searchTemplates;
private getTemplatesForTask;
private searchTemplatesByMetadata;
private getTaskDescription;
private validateWorkflow;
private validateWorkflowConnections;
private validateWorkflowExpressions;
run(): Promise<void>;
shutdown(): Promise<void>;
}
//# sourceMappingURL=server.d.ts.map

1
dist/mcp/server.d.ts.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAkFnE,qBAAa,yBAAyB;IACpC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,EAAE,CAAgC;IAC1C,OAAO,CAAC,UAAU,CAA+B;IACjD,OAAO,CAAC,eAAe,CAAgC;IACvD,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,eAAe,CAAC,CAAkB;IAC1C,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,qBAAqB,CAAsB;IACnD,OAAO,CAAC,WAAW,CAAiC;IACpD,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AiB;YAoBjB,WAAW;YAwBX,eAAe;YAqBf,mBAAmB;YAwBnB,yBAAyB;IA4CvC,OAAO,CAAC,kBAAkB;YAiBZ,gBAAgB;YA6HhB,2BAA2B;YAiE3B,2BAA2B;IAyEnC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IA0BpB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAuBhC"}

2780
dist/mcp/server.js vendored Normal file

File diff suppressed because it is too large Load Diff

1
dist/mcp/server.js.map vendored Normal file

File diff suppressed because one or more lines are too long

3
dist/mcp/stdio-wrapper.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env node
export {};
//# sourceMappingURL=stdio-wrapper.d.ts.map

1
dist/mcp/stdio-wrapper.d.ts.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"stdio-wrapper.d.ts","sourceRoot":"","sources":["../../src/mcp/stdio-wrapper.ts"],"names":[],"mappings":""}

81
dist/mcp/stdio-wrapper.js vendored Normal file
View File

@@ -0,0 +1,81 @@
#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
process.env.MCP_MODE = 'stdio';
process.env.DISABLE_CONSOLE_OUTPUT = 'true';
process.env.LOG_LEVEL = 'error';
const originalConsoleLog = console.log;
const originalConsoleError = console.error;
const originalConsoleWarn = console.warn;
const originalConsoleInfo = console.info;
const originalConsoleDebug = console.debug;
const originalConsoleTrace = console.trace;
const originalConsoleDir = console.dir;
const originalConsoleTime = console.time;
const originalConsoleTimeEnd = console.timeEnd;
console.log = () => { };
console.error = () => { };
console.warn = () => { };
console.info = () => { };
console.debug = () => { };
console.trace = () => { };
console.dir = () => { };
console.time = () => { };
console.timeEnd = () => { };
console.timeLog = () => { };
console.group = () => { };
console.groupEnd = () => { };
console.table = () => { };
console.clear = () => { };
console.count = () => { };
console.countReset = () => { };
const server_1 = require("./server");
let server = null;
async function main() {
try {
server = new server_1.N8NDocumentationMCPServer();
await server.run();
}
catch (error) {
originalConsoleError('Fatal error:', error);
process.exit(1);
}
}
process.on('uncaughtException', (error) => {
originalConsoleError('Uncaught exception:', error);
process.exit(1);
});
process.on('unhandledRejection', (reason) => {
originalConsoleError('Unhandled rejection:', reason);
process.exit(1);
});
let isShuttingDown = false;
async function shutdown(signal) {
if (isShuttingDown)
return;
isShuttingDown = true;
originalConsoleError(`Received ${signal}, shutting down gracefully...`);
try {
if (server) {
await server.shutdown();
}
}
catch (error) {
originalConsoleError('Error during shutdown:', error);
}
process.stdin.pause();
process.stdin.destroy();
setTimeout(() => {
process.exit(0);
}, 500).unref();
process.exit(0);
}
process.on('SIGTERM', () => void shutdown('SIGTERM'));
process.on('SIGINT', () => void shutdown('SIGINT'));
process.on('SIGHUP', () => void shutdown('SIGHUP'));
process.stdin.on('end', () => {
originalConsoleError('stdin closed, shutting down...');
void shutdown('STDIN_CLOSE');
});
main();
//# sourceMappingURL=stdio-wrapper.js.map

1
dist/mcp/stdio-wrapper.js.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"stdio-wrapper.js","sourceRoot":"","sources":["../../src/mcp/stdio-wrapper.ts"],"names":[],"mappings":";;;AAQA,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,OAAO,CAAC;AAC/B,OAAO,CAAC,GAAG,CAAC,sBAAsB,GAAG,MAAM,CAAC;AAC5C,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,OAAO,CAAC;AAGhC,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC;AACvC,MAAM,oBAAoB,GAAG,OAAO,CAAC,KAAK,CAAC;AAC3C,MAAM,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;AACzC,MAAM,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;AACzC,MAAM,oBAAoB,GAAG,OAAO,CAAC,KAAK,CAAC;AAC3C,MAAM,oBAAoB,GAAG,OAAO,CAAC,KAAK,CAAC;AAC3C,MAAM,kBAAkB,GAAG,OAAO,CAAC,GA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I,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAGD,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,KAAK,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;AACtD,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;AACpD,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;AAGpD,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;IAC3B,oBAAoB,CAAC,gCAAgC,CAAC,CAAC;IACvD,KAAK,QAAQ,CAAC,aAAa,CAAC,CAAC;AAC/B,CAAC,CAAC,CAAC;AAEH,IAAI,EAAE,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const getNodeDoc: ToolDocumentation;
//# sourceMappingURL=get-node.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-node.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/configuration/get-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,UAAU,EAAE,iBAqFxB,CAAC"}

View File

@@ -0,0 +1,90 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getNodeDoc = void 0;
exports.getNodeDoc = {
name: 'get_node',
category: 'configuration',
essentials: {
description: 'Unified node information tool with progressive detail levels and multiple modes. Get node schema, docs, search properties, or version info.',
keyParameters: ['nodeType', 'detail', 'mode', 'includeTypeInfo', 'includeExamples'],
example: 'get_node({nodeType: "nodes-base.httpRequest", detail: "standard"})',
performance: 'Instant (<10ms) for minimal/standard, moderate for full',
tips: [
'Use detail="standard" (default) for most tasks - shows required fields',
'Use mode="docs" for readable markdown documentation',
'Use mode="search_properties" with propertyQuery to find specific fields',
'Use mode="versions" to check version history and breaking changes',
'Add includeExamples=true to get real-world configuration examples'
]
},
full: {
description: `**Detail Levels (mode="info", default):**
- minimal (~200 tokens): Basic metadata only - nodeType, displayName, description, category
- standard (~1-2K tokens): Essential properties + operations - recommended for most tasks
- full (~3-8K tokens): Complete node schema - use only when standard insufficient
**Operation Modes:**
- info (default): Node schema with configurable detail level
- docs: Readable markdown documentation with examples and patterns
- search_properties: Find specific properties within a node
- versions: List all available versions with breaking changes summary
- compare: Compare two versions with property-level changes
- breaking: Show only breaking changes between versions
- migrations: Show auto-migratable changes between versions`,
parameters: {
nodeType: { type: 'string', required: true, description: 'Full node type with prefix: "nodes-base.httpRequest" or "nodes-langchain.agent"' },
detail: { type: 'string', required: false, description: 'Detail level for mode=info: "minimal", "standard" (default), "full"' },
mode: { type: 'string', required: false, description: 'Operation mode: "info" (default), "docs", "search_properties", "versions", "compare", "breaking", "migrations"' },
includeTypeInfo: { type: 'boolean', required: false, description: 'Include type structure metadata (validation rules, JS types). Adds ~80-120 tokens per property' },
includeExamples: { type: 'boolean', required: false, description: 'Include real-world configuration examples from templates. Adds ~200-400 tokens per example' },
propertyQuery: { type: 'string', required: false, description: 'For mode=search_properties: search term to find properties (e.g., "auth", "header", "body")' },
maxPropertyResults: { type: 'number', required: false, description: 'For mode=search_properties: max results (default 20)' },
fromVersion: { type: 'string', required: false, description: 'For compare/breaking/migrations modes: source version (e.g., "1.0")' },
toVersion: { type: 'string', required: false, description: 'For compare mode: target version (e.g., "2.0"). Defaults to latest' }
},
returns: `Depends on mode:
- info: Node schema with properties based on detail level
- docs: Markdown documentation string
- search_properties: Array of matching property paths with descriptions
- versions: Version history with breaking changes flags
- compare/breaking/migrations: Version comparison details`,
examples: [
'// Standard detail (recommended for AI agents)\nget_node({nodeType: "nodes-base.httpRequest"})',
'// Minimal for quick metadata check\nget_node({nodeType: "nodes-base.slack", detail: "minimal"})',
'// Full detail with examples\nget_node({nodeType: "nodes-base.googleSheets", detail: "full", includeExamples: true})',
'// Get readable documentation\nget_node({nodeType: "nodes-base.webhook", mode: "docs"})',
'// Search for authentication properties\nget_node({nodeType: "nodes-base.httpRequest", mode: "search_properties", propertyQuery: "auth"})',
'// Check version history\nget_node({nodeType: "nodes-base.executeWorkflow", mode: "versions"})',
'// Compare specific versions\nget_node({nodeType: "nodes-base.httpRequest", mode: "compare", fromVersion: "3.0", toVersion: "4.1"})'
],
useCases: [
'Configure nodes for workflow building (use detail=standard)',
'Find specific configuration options (use mode=search_properties)',
'Get human-readable node documentation (use mode=docs)',
'Check for breaking changes before version upgrades (use mode=breaking)',
'Understand complex types with includeTypeInfo=true'
],
performance: `Token costs by detail level:
- minimal: ~200 tokens
- standard: ~1000-2000 tokens (default)
- full: ~3000-8000 tokens
- includeTypeInfo: +80-120 tokens per property
- includeExamples: +200-400 tokens per example
- Version modes: ~400-1200 tokens`,
bestPractices: [
'Start with detail="standard" - it covers 95% of use cases',
'Only use detail="full" if standard is missing required properties',
'Use mode="docs" when explaining nodes to users',
'Combine includeTypeInfo=true for complex nodes (filter, resourceMapper)',
'Check version history before configuring versioned nodes'
],
pitfalls: [
'detail="full" returns large responses (~100KB) - use sparingly',
'Node type must include prefix (nodes-base. or nodes-langchain.)',
'includeExamples only works with mode=info and detail=standard',
'Version modes require nodes with multiple versions in database'
],
relatedTools: ['search_nodes', 'validate_node', 'validate_workflow']
}
};
//# sourceMappingURL=get-node.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-node.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/configuration/get-node.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAsB;IAC3C,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,eAAe;IACzB,UAAU,EAAE;QACV,WAAW,EAAE,6IAA6I;QAC1J,aAAa,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,iBAAiB,CAAC;QACnF,OAAO,EAA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yFAAyF;YACzF,2IAA2I;YAC3I,gGAAgG;YAChG,qIAAqI;SACtI;QACD,QAAQ,EAAE;YACR,6DAA6D;YAC7D,kEAAkE;YAClE,uDAAuD;YACvD,wEAAwE;YACxE,oDAAoD;SACrD;QACD,WAAW,EAAE;;;;;;kCAMiB;QAC9B,aAAa,EAAE;YACb,2DAA2D;YAC3D,mEAAmE;YACnE,gDAAgD;YAChD,yEAAyE;YACzE,0DAA0D;SAC3D;QACD,QAAQ,EAAE;YACR,gEAAgE;YAChE,iEAAiE;YACjE,+DAA+D;YAC/D,gEAAgE;SACjE;QACD,YAAY,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,mBAAmB,CAAC;KACrE;CACF,CAAC"}

View File

@@ -0,0 +1,2 @@
export { getNodeDoc } from './get-node';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/configuration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}

View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getNodeDoc = void 0;
var get_node_1 = require("./get-node");
Object.defineProperty(exports, "getNodeDoc", { enumerable: true, get: function () { return get_node_1.getNodeDoc; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/configuration/index.ts"],"names":[],"mappings":";;;AAAA,uCAAwC;AAA/B,sGAAA,UAAU,OAAA"}

View File

@@ -0,0 +1,2 @@
export { searchNodesDoc } from './search-nodes';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/discovery/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC"}

6
dist/mcp/tool-docs/discovery/index.js vendored Normal file
View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.searchNodesDoc = void 0;
var search_nodes_1 = require("./search-nodes");
Object.defineProperty(exports, "searchNodesDoc", { enumerable: true, get: function () { return search_nodes_1.searchNodesDoc; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/discovery/index.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAAvC,8GAAA,cAAc,OAAA"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const searchNodesDoc: ToolDocumentation;
//# sourceMappingURL=search-nodes.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"search-nodes.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/discovery/search-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,iBAmD5B,CAAC"}

View File

@@ -0,0 +1,56 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.searchNodesDoc = void 0;
exports.searchNodesDoc = {
name: 'search_nodes',
category: 'discovery',
essentials: {
description: 'Text search across node names and descriptions. Returns most relevant nodes first, with frequently-used nodes (HTTP Request, Webhook, Set, Code, Slack) prioritized in results. Searches all 500+ nodes in the database.',
keyParameters: ['query', 'mode', 'limit'],
example: 'search_nodes({query: "webhook"})',
performance: '<20ms even for complex queries',
tips: [
'OR mode (default): Matches any search word',
'AND mode: Requires all words present',
'FUZZY mode: Handles typos and spelling errors',
'Use quotes for exact phrases: "google sheets"'
]
},
full: {
description: 'Full-text search engine for n8n nodes using SQLite FTS5. Searches across node names, descriptions, and aliases. Results are ranked by relevance with commonly-used nodes given priority. Common nodes include: HTTP Request, Webhook, Set, Code, IF, Switch, Merge, SplitInBatches, Slack, Google Sheets.',
parameters: {
query: { type: 'string', description: 'Search keywords. Use quotes for exact phrases like "google sheets"', required: true },
limit: { type: 'number', description: 'Maximum results to return. Default: 20, Max: 100', required: false },
mode: { type: 'string', description: 'Search mode: "OR" (any word matches, default), "AND" (all words required), "FUZZY" (typo-tolerant)', required: false }
},
returns: 'Array of node objects sorted by relevance score. Each object contains: nodeType, displayName, description, category, relevance score. Common nodes appear first when relevance is similar.',
examples: [
'search_nodes({query: "webhook"}) - Returns Webhook node as top result',
'search_nodes({query: "database"}) - Returns MySQL, Postgres, MongoDB, Redis, etc.',
'search_nodes({query: "google sheets", mode: "AND"}) - Requires both words',
'search_nodes({query: "slak", mode: "FUZZY"}) - Finds Slack despite typo',
'search_nodes({query: "http api"}) - Finds HTTP Request, GraphQL, REST nodes',
'search_nodes({query: "transform data"}) - Finds Set, Code, Function, Item Lists nodes'
],
useCases: [
'Finding nodes when you know partial names',
'Discovering nodes by functionality (e.g., "email", "database", "transform")',
'Handling user typos in node names',
'Finding all nodes related to a service (e.g., "google", "aws", "microsoft")'
],
performance: '<20ms for simple queries, <50ms for complex FUZZY searches. Uses FTS5 index for speed',
bestPractices: [
'Start with single keywords for broadest results',
'Use FUZZY mode when users might misspell node names',
'AND mode works best for 2-3 word searches',
'Combine with get_node after finding the right node'
],
pitfalls: [
'AND mode searches all fields (name, description) not just node names',
'FUZZY mode with very short queries (1-2 chars) may return unexpected results',
'Exact matches in quotes are case-sensitive'
],
relatedTools: ['get_node to configure found nodes', 'search_templates to find workflow examples', 'validate_node to check configurations']
}
};
//# sourceMappingURL=search-nodes.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"search-nodes.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/discovery/search-nodes.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,cAAc;IACpB,QAAQ,EAAE,WAAW;IACrB,UAAU,EAAE;QACV,WAAW,EAAE,0NAA0N;QACvO,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC;QACzC,OAAO,EAAE,kCAAkC;QAC3C,WAAW,EAAE,gCAAgC;QAC7C,IAAI,EAAE;YACJ,4CAA4C;YAC5C,sCAAsC;YACtC,+CAA+C;YAC/C,+CAA+C;SAChD;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,2SAA2S;QACxT,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oEAAoE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC5H,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kDAAkD,EAAE,QAAQ,EAAE,KAAK,EAAE;YAC3G,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oGAAoG,EAAE,QAAQ,EAAE,KAAK,EAAE;SAC7J;QACD,OAAO,EAAE,4LAA4L;QACrM,QAAQ,EAAE;YACR,uEAAuE;YACvE,mFAAmF;YACnF,2EAA2E;YAC3E,yEAAyE;YACzE,6EAA6E;YAC7E,uFAAuF;SACxF;QACD,QAAQ,EAAE;YACR,2CAA2C;YAC3C,6EAA6E;YAC7E,mCAAmC;YACnC,6EAA6E;SAC9E;QACD,WAAW,EAAE,uFAAuF;QACpG,aAAa,EAAE;YACb,iDAAiD;YACjD,qDAAqD;YACrD,2CAA2C;YAC3C,oDAAoD;SACrD;QACD,QAAQ,EAAE;YACR,sEAAsE;YACtE,8EAA8E;YAC9E,4CAA4C;SAC7C;QACD,YAAY,EAAE,CAAC,mCAAmC,EAAE,4CAA4C,EAAE,uCAAuC,CAAC;KAC3I;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const aiAgentsGuide: ToolDocumentation;
//# sourceMappingURL=ai-agents-guide.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ai-agents-guide.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/guides/ai-agents-guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,aAAa,EAAE,iBA8tB3B,CAAC"}

View File

@@ -0,0 +1,739 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.aiAgentsGuide = void 0;
exports.aiAgentsGuide = {
name: 'ai_agents_guide',
category: 'guides',
essentials: {
description: 'Comprehensive guide to building AI Agent workflows in n8n. Covers architecture, connections, tools, validation, and best practices for production AI systems.',
keyParameters: [],
example: 'Use tools_documentation({topic: "ai_agents_guide"}) to access this guide',
performance: 'N/A - Documentation only',
tips: [
'Start with Chat Trigger → AI Agent → Language Model pattern',
'Always connect language model BEFORE enabling AI Agent',
'Use proper toolDescription for all AI tools (15+ characters)',
'Validate workflows with n8n_validate_workflow before deployment',
'Use includeExamples=true when searching for AI nodes',
'Check FINAL_AI_VALIDATION_SPEC.md for detailed requirements'
]
},
full: {
description: `# Complete Guide to AI Agents in n8n
This comprehensive guide covers everything you need to build production-ready AI Agent workflows in n8n.
## Table of Contents
1. [AI Agent Architecture](#architecture)
2. [Essential Connection Types](#connections)
3. [Building Your First AI Agent](#first-agent)
4. [AI Tools Deep Dive](#tools)
5. [Advanced Patterns](#advanced)
6. [Validation & Best Practices](#validation)
7. [Troubleshooting](#troubleshooting)
---
## 1. AI Agent Architecture {#architecture}
### Core Components
An n8n AI Agent workflow typically consists of:
1. **Chat Trigger**: Entry point for user interactions
- Webhook-based or manual trigger
- Supports streaming responses (responseMode)
- Passes user message to AI Agent
2. **AI Agent**: The orchestrator
- Manages conversation flow
- Decides when to use tools
- Iterates until task is complete
- Supports fallback models for reliability
3. **Language Model**: The AI brain
- OpenAI GPT-4, Claude, Gemini, etc.
- Connected via ai_languageModel port
- Can have primary + fallback for reliability
4. **Tools**: AI Agent's capabilities
- HTTP Request, Code, Vector Store, etc.
- Connected via ai_tool port
- Each tool needs clear toolDescription
5. **Optional Components**:
- Memory (conversation history)
- Output Parser (structured responses)
- Vector Store (knowledge retrieval)
### Connection Flow
**CRITICAL**: AI connections flow TO the consumer (reversed from standard n8n):
\`\`\`
Standard n8n: [Source] --main--> [Target]
AI pattern: [Language Model] --ai_languageModel--> [AI Agent]
[HTTP Tool] --ai_tool--> [AI Agent]
\`\`\`
This is why you use \`sourceOutput: "ai_languageModel"\` when connecting components.
---
## 2. Essential Connection Types {#connections}
### The 8 AI Connection Types
1. **ai_languageModel**
- FROM: OpenAI Chat Model, Anthropic, Google Gemini, etc.
- TO: AI Agent, Basic LLM Chain
- REQUIRED: Every AI Agent needs 1-2 language models
- Example: \`{type: "addConnection", source: "OpenAI", target: "AI Agent", sourceOutput: "ai_languageModel"}\`
2. **ai_tool**
- FROM: Any tool node (HTTP Request Tool, Code Tool, etc.)
- TO: AI Agent
- REQUIRED: At least 1 tool recommended
- Example: \`{type: "addConnection", source: "HTTP Request Tool", target: "AI Agent", sourceOutput: "ai_tool"}\`
3. **ai_memory**
- FROM: Window Buffer Memory, Conversation Summary, etc.
- TO: AI Agent
- OPTIONAL: 0-1 memory system
- Enables conversation history tracking
4. **ai_outputParser**
- FROM: Structured Output Parser, JSON Parser, etc.
- TO: AI Agent
- OPTIONAL: For structured responses
- Must set hasOutputParser=true on AI Agent
5. **ai_embedding**
- FROM: Embeddings OpenAI, Embeddings Google, etc.
- TO: Vector Store (Pinecone, In-Memory, etc.)
- REQUIRED: For vector-based retrieval
6. **ai_vectorStore**
- FROM: Vector Store node
- TO: Vector Store Tool
- REQUIRED: For retrieval-augmented generation (RAG)
7. **ai_document**
- FROM: Document Loader, Default Data Loader
- TO: Vector Store
- REQUIRED: Provides data for vector storage
8. **ai_textSplitter**
- FROM: Text Splitter nodes
- TO: Document processing chains
- OPTIONAL: Chunk large documents
### Connection Examples
\`\`\`typescript
// Basic AI Agent setup
n8n_update_partial_workflow({
id: "workflow_id",
operations: [
// Connect language model (REQUIRED)
{
type: "addConnection",
source: "OpenAI Chat Model",
target: "AI Agent",
sourceOutput: "ai_languageModel"
},
// Connect tools
{
type: "addConnection",
source: "HTTP Request Tool",
target: "AI Agent",
sourceOutput: "ai_tool"
},
{
type: "addConnection",
source: "Code Tool",
target: "AI Agent",
sourceOutput: "ai_tool"
},
// Add memory (optional)
{
type: "addConnection",
source: "Window Buffer Memory",
target: "AI Agent",
sourceOutput: "ai_memory"
}
]
})
\`\`\`
---
## 3. Building Your First AI Agent {#first-agent}
### Step-by-Step Tutorial
#### Step 1: Create Chat Trigger
Use \`n8n_create_workflow\` or manually create a workflow with:
\`\`\`typescript
{
name: "My First AI Agent",
nodes: [
{
id: "chat_trigger",
name: "Chat Trigger",
type: "@n8n/n8n-nodes-langchain.chatTrigger",
position: [100, 100],
parameters: {
options: {
responseMode: "lastNode" // or "streaming" for real-time
}
}
}
],
connections: {}
}
\`\`\`
#### Step 2: Add Language Model
\`\`\`typescript
n8n_update_partial_workflow({
id: "workflow_id",
operations: [
{
type: "addNode",
node: {
name: "OpenAI Chat Model",
type: "@n8n/n8n-nodes-langchain.lmChatOpenAi",
position: [300, 50],
parameters: {
model: "gpt-4",
temperature: 0.7
}
}
}
]
})
\`\`\`
#### Step 3: Add AI Agent
\`\`\`typescript
n8n_update_partial_workflow({
id: "workflow_id",
operations: [
{
type: "addNode",
node: {
name: "AI Agent",
type: "@n8n/n8n-nodes-langchain.agent",
position: [300, 150],
parameters: {
promptType: "auto",
systemMessage: "You are a helpful assistant. Be concise and accurate."
}
}
}
]
})
\`\`\`
#### Step 4: Connect Components
\`\`\`typescript
n8n_update_partial_workflow({
id: "workflow_id",
operations: [
// Chat Trigger → AI Agent (main connection)
{
type: "addConnection",
source: "Chat Trigger",
target: "AI Agent"
},
// Language Model → AI Agent (AI connection)
{
type: "addConnection",
source: "OpenAI Chat Model",
target: "AI Agent",
sourceOutput: "ai_languageModel"
}
]
})
\`\`\`
#### Step 5: Validate
\`\`\`typescript
n8n_validate_workflow({id: "workflow_id"})
\`\`\`
---
## 4. AI Tools Deep Dive {#tools}
### Tool Types and When to Use Them
#### 1. HTTP Request Tool
**Use when**: AI needs to call external APIs
**Critical Requirements**:
- \`toolDescription\`: Clear, 15+ character description
- \`url\`: API endpoint (can include placeholders)
- \`placeholderDefinitions\`: Define all {placeholders}
- Proper authentication if needed
**Example**:
\`\`\`typescript
{
type: "addNode",
node: {
name: "GitHub Issues Tool",
type: "@n8n/n8n-nodes-langchain.toolHttpRequest",
position: [500, 100],
parameters: {
method: "POST",
url: "https://api.github.com/repos/{owner}/{repo}/issues",
toolDescription: "Create GitHub issues. Requires owner (username), repo (repository name), title, and body.",
placeholderDefinitions: {
values: [
{name: "owner", description: "Repository owner username"},
{name: "repo", description: "Repository name"},
{name: "title", description: "Issue title"},
{name: "body", description: "Issue description"}
]
},
sendBody: true,
jsonBody: "={{ { title: $json.title, body: $json.body } }}"
}
}
}
\`\`\`
#### 2. Code Tool
**Use when**: AI needs to run custom logic
**Critical Requirements**:
- \`name\`: Function name (alphanumeric + underscore)
- \`description\`: 10+ character explanation
- \`code\`: JavaScript or Python code
- \`inputSchema\`: Define expected inputs (recommended)
**Example**:
\`\`\`typescript
{
type: "addNode",
node: {
name: "Calculate Shipping",
type: "@n8n/n8n-nodes-langchain.toolCode",
position: [500, 200],
parameters: {
name: "calculate_shipping",
description: "Calculate shipping cost based on weight (kg) and distance (km)",
language: "javaScript",
code: "const cost = 5 + ($input.weight * 2) + ($input.distance * 0.1); return { cost };",
specifyInputSchema: true,
inputSchema: "{ \\"type\\": \\"object\\", \\"properties\\": { \\"weight\\": { \\"type\\": \\"number\\" }, \\"distance\\": { \\"type\\": \\"number\\" } } }"
}
}
}
\`\`\`
#### 3. Vector Store Tool
**Use when**: AI needs to search knowledge base
**Setup**: Requires Vector Store + Embeddings + Documents
**Example**:
\`\`\`typescript
// Step 1: Create Vector Store with embeddings and documents
n8n_update_partial_workflow({
operations: [
{type: "addConnection", source: "Embeddings OpenAI", target: "Pinecone", sourceOutput: "ai_embedding"},
{type: "addConnection", source: "Document Loader", target: "Pinecone", sourceOutput: "ai_document"}
]
})
// Step 2: Connect Vector Store to Vector Store Tool
n8n_update_partial_workflow({
operations: [
{type: "addConnection", source: "Pinecone", target: "Vector Store Tool", sourceOutput: "ai_vectorStore"}
]
})
// Step 3: Connect tool to AI Agent
n8n_update_partial_workflow({
operations: [
{type: "addConnection", source: "Vector Store Tool", target: "AI Agent", sourceOutput: "ai_tool"}
]
})
\`\`\`
#### 4. AI Agent Tool (Sub-Agents)
**Use when**: Need specialized expertise
**Example**: Research specialist sub-agent
\`\`\`typescript
{
type: "addNode",
node: {
name: "Research Specialist",
type: "@n8n/n8n-nodes-langchain.agentTool",
position: [500, 300],
parameters: {
name: "research_specialist",
description: "Expert researcher that searches multiple sources and synthesizes information. Use for detailed research tasks.",
systemMessage: "You are a research specialist. Search thoroughly, cite sources, and provide comprehensive analysis."
}
}
}
\`\`\`
#### 5. MCP Client Tool
**Use when**: Need to use Model Context Protocol servers
**Example**: Filesystem access
\`\`\`typescript
{
type: "addNode",
node: {
name: "Filesystem Tool",
type: "@n8n/n8n-nodes-langchain.mcpClientTool",
position: [500, 400],
parameters: {
description: "Access file system to read files, list directories, and search content",
mcpServer: {
transport: "stdio",
command: "npx",
args: ["-y", "@modelcontextprotocol/server-filesystem", "/allowed/path"]
},
tool: "read_file"
}
}
}
\`\`\`
---
## 5. Advanced Patterns {#advanced}
### Pattern 1: Streaming Responses
For real-time user experience:
\`\`\`typescript
// Set Chat Trigger to streaming mode
{
parameters: {
options: {
responseMode: "streaming"
}
}
}
// CRITICAL: AI Agent must NOT have main output connections in streaming mode
// Responses stream back through Chat Trigger automatically
\`\`\`
**Validation will fail if**:
- Chat Trigger has streaming but target is not AI Agent
- AI Agent in streaming mode has main output connections
### Pattern 2: Fallback Language Models
For production reliability with fallback language models:
\`\`\`typescript
n8n_update_partial_workflow({
operations: [
// Primary model
{
type: "addConnection",
source: "OpenAI GPT-4",
target: "AI Agent",
sourceOutput: "ai_languageModel",
targetIndex: 0
},
// Fallback model
{
type: "addConnection",
source: "Anthropic Claude",
target: "AI Agent",
sourceOutput: "ai_languageModel",
targetIndex: 1
}
]
})
// Enable fallback on AI Agent
{
type: "updateNode",
nodeName: "AI Agent",
updates: {
"parameters.needsFallback": true
}
}
\`\`\`
### Pattern 3: RAG (Retrieval-Augmented Generation)
Complete knowledge base setup:
\`\`\`typescript
// 1. Load documents
{type: "addConnection", source: "PDF Loader", target: "Text Splitter", sourceOutput: "ai_document"}
// 2. Split and embed
{type: "addConnection", source: "Text Splitter", target: "Vector Store"}
{type: "addConnection", source: "Embeddings", target: "Vector Store", sourceOutput: "ai_embedding"}
// 3. Create search tool
{type: "addConnection", source: "Vector Store", target: "Vector Store Tool", sourceOutput: "ai_vectorStore"}
// 4. Give tool to agent
{type: "addConnection", source: "Vector Store Tool", target: "AI Agent", sourceOutput: "ai_tool"}
\`\`\`
### Pattern 4: Multi-Agent Systems
Specialized sub-agents for complex tasks:
\`\`\`typescript
// Create sub-agents with specific expertise
[
{name: "research_agent", description: "Deep research specialist"},
{name: "data_analyst", description: "Data analysis expert"},
{name: "writer_agent", description: "Content writing specialist"}
].forEach(agent => {
// Add as AI Agent Tool to main coordinator agent
{
type: "addConnection",
source: agent.name,
target: "Coordinator Agent",
sourceOutput: "ai_tool"
}
})
\`\`\`
---
## 6. Validation & Best Practices {#validation}
### Always Validate Before Deployment
\`\`\`typescript
const result = n8n_validate_workflow({id: "workflow_id"})
if (!result.valid) {
console.log("Errors:", result.errors)
console.log("Warnings:", result.warnings)
console.log("Suggestions:", result.suggestions)
}
\`\`\`
### Common Validation Errors
1. **MISSING_LANGUAGE_MODEL**
- Problem: AI Agent has no ai_languageModel connection
- Fix: Connect a language model before creating AI Agent
2. **MISSING_TOOL_DESCRIPTION**
- Problem: HTTP Request Tool has no toolDescription
- Fix: Add clear description (15+ characters)
3. **STREAMING_WITH_MAIN_OUTPUT**
- Problem: AI Agent in streaming mode has outgoing main connections
- Fix: Remove main connections when using streaming
4. **FALLBACK_MISSING_SECOND_MODEL**
- Problem: needsFallback=true but only 1 language model
- Fix: Add second language model or disable needsFallback
### Best Practices Checklist
✅ **Before Creating AI Agent**:
- [ ] Language model is connected first
- [ ] At least one tool is prepared (or will be added)
- [ ] System message is thoughtful and specific
✅ **For Each Tool**:
- [ ] Has toolDescription/description (15+ characters)
- [ ] toolDescription explains WHEN to use the tool
- [ ] All required parameters are configured
- [ ] Credentials are set up if needed
✅ **For Production**:
- [ ] Workflow validated with n8n_validate_workflow
- [ ] Tested with real user queries
- [ ] Fallback model configured for reliability
- [ ] Error handling in place
- [ ] maxIterations set appropriately (default 10, max 50)
---
## 7. Troubleshooting {#troubleshooting}
### Problem: "AI Agent has no language model"
**Cause**: Connection created AFTER AI Agent or using wrong sourceOutput
**Solution**:
\`\`\`typescript
n8n_update_partial_workflow({
operations: [
{
type: "addConnection",
source: "OpenAI Chat Model",
target: "AI Agent",
sourceOutput: "ai_languageModel" // ← CRITICAL
}
]
})
\`\`\`
### Problem: "Tool has no description"
**Cause**: HTTP Request Tool or Code Tool missing toolDescription/description
**Solution**:
\`\`\`typescript
{
type: "updateNode",
nodeName: "HTTP Request Tool",
updates: {
"parameters.toolDescription": "Call weather API to get current conditions for a city"
}
}
\`\`\`
### Problem: "Streaming mode not working"
**Causes**:
1. Chat Trigger not set to streaming
2. AI Agent has main output connections
3. Target of Chat Trigger is not AI Agent
**Solution**:
\`\`\`typescript
// 1. Set Chat Trigger to streaming
{
type: "updateNode",
nodeName: "Chat Trigger",
updates: {
"parameters.options.responseMode": "streaming"
}
}
// 2. Remove AI Agent main outputs
{
type: "removeConnection",
source: "AI Agent",
target: "Any Output Node"
}
\`\`\`
### Problem: "Agent keeps looping"
**Cause**: Tool not returning proper response or agent stuck in reasoning loop
**Solutions**:
1. Set maxIterations lower: \`"parameters.maxIterations": 5\`
2. Improve tool descriptions to be more specific
3. Add system message guidance: "Use tools efficiently, don't repeat actions"
---
## Quick Reference
### Essential Tools
| Tool | Purpose | Key Parameters |
|------|---------|----------------|
| HTTP Request Tool | API calls | toolDescription, url, placeholders |
| Code Tool | Custom logic | name, description, code, inputSchema |
| Vector Store Tool | Knowledge search | description, topK |
| AI Agent Tool | Sub-agents | name, description, systemMessage |
| MCP Client Tool | MCP protocol | description, mcpServer, tool |
### Connection Quick Codes
\`\`\`typescript
// Language Model → AI Agent
sourceOutput: "ai_languageModel"
// Tool → AI Agent
sourceOutput: "ai_tool"
// Memory → AI Agent
sourceOutput: "ai_memory"
// Parser → AI Agent
sourceOutput: "ai_outputParser"
// Embeddings → Vector Store
sourceOutput: "ai_embedding"
// Vector Store → Vector Store Tool
sourceOutput: "ai_vectorStore"
\`\`\`
### Validation Command
\`\`\`typescript
n8n_validate_workflow({id: "workflow_id"})
\`\`\`
---
## Related Resources
- **FINAL_AI_VALIDATION_SPEC.md**: Complete validation rules
- **n8n_update_partial_workflow**: Workflow modification tool
- **search_nodes({query: "AI", includeExamples: true})**: Find AI nodes with examples
- **get_node({nodeType: "...", detail: "standard", includeExamples: true})**: Node details with examples
---
*This guide is part of the n8n-mcp documentation system. For questions or issues, refer to the validation spec or use tools_documentation() for specific topics.*`,
parameters: {},
returns: 'Complete AI Agents guide with architecture, patterns, validation, and troubleshooting',
examples: [
'tools_documentation({topic: "ai_agents_guide"}) - Full guide',
'tools_documentation({topic: "ai_agents_guide", depth: "essentials"}) - Quick reference',
'When user asks about AI Agents, Chat Trigger, or building AI workflows → Point to this guide'
],
useCases: [
'Learning AI Agent architecture in n8n',
'Understanding AI connection types and patterns',
'Building first AI Agent workflow step-by-step',
'Implementing advanced patterns (streaming, fallback, RAG, multi-agent)',
'Troubleshooting AI workflow issues',
'Validating AI workflows before deployment',
'Quick reference for connection types and tools'
],
performance: 'N/A - Static documentation',
bestPractices: [
'Reference this guide when users ask about AI Agents',
'Point to specific sections based on user needs',
'Combine with search_nodes(includeExamples=true) for working examples',
'Validate workflows after following guide instructions',
'Use FINAL_AI_VALIDATION_SPEC.md for detailed requirements'
],
pitfalls: [
'This is a guide, not an executable tool',
'Always validate workflows after making changes',
'AI connections require sourceOutput parameter',
'Streaming mode has specific constraints',
'Fallback models require AI Agent node with fallback support'
],
relatedTools: [
'n8n_create_workflow',
'n8n_update_partial_workflow',
'n8n_validate_workflow',
'search_nodes',
'get_node'
]
}
};
//# sourceMappingURL=ai-agents-guide.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ai-agents-guide.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/guides/ai-agents-guide.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAsB;IAC9C,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE;QACV,WAAW,EAAE,+JAA+J;QAC5K,aAAa,EAAE,EAAE;QACjB,OAAO,EAAE,0EAA0E;QACnF,WAAW,EAAE,0BAA0B;QACvC,IAAI,EAAE;YACJ,6DAA6D;YAC7D,wDAAwD;YACxD,8DAA8D;YAC9D,iEAAiE;YACjE,sDAAsD;YACtD,6DAA6D;SAC9D;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kKAoqBiJ;QAC9J,UAAU,EAAE,EAAE;QACd,OAAO,EAAE,uFAAuF;QAChG,QAAQ,EAAE;YACR,8DAA8D;YAC9D,wFAAwF;YACxF,8FAA8F;SAC/F;QACD,QAAQ,EAAE;YACR,uCAAuC;YACvC,gDAAgD;YAChD,+CAA+C;YAC/C,wEAAwE;YACxE,oCAAoC;YACpC,2CAA2C;YAC3C,gDAAgD;SACjD;QACD,WAAW,EAAE,4BAA4B;QACzC,aAAa,EAAE;YACb,qDAAqD;YACrD,gDAAgD;YAChD,sEAAsE;YACtE,uDAAuD;YACvD,2DAA2D;SAC5D;QACD,QAAQ,EAAE;YACR,yCAAyC;YACzC,gDAAgD;YAChD,+CAA+C;YAC/C,yCAAyC;YACzC,6DAA6D;SAC9D;QACD,YAAY,EAAE;YACZ,qBAAqB;YACrB,6BAA6B;YAC7B,uBAAuB;YACvB,cAAc;YACd,UAAU;SACX;KACF;CACF,CAAC"}

2
dist/mcp/tool-docs/guides/index.d.ts vendored Normal file
View File

@@ -0,0 +1,2 @@
export { aiAgentsGuide } from './ai-agents-guide';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/guides/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}

6
dist/mcp/tool-docs/guides/index.js vendored Normal file
View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.aiAgentsGuide = void 0;
var ai_agents_guide_1 = require("./ai-agents-guide");
Object.defineProperty(exports, "aiAgentsGuide", { enumerable: true, get: function () { return ai_agents_guide_1.aiAgentsGuide; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/guides/index.ts"],"names":[],"mappings":";;;AACA,qDAAkD;AAAzC,gHAAA,aAAa,OAAA"}

4
dist/mcp/tool-docs/index.d.ts vendored Normal file
View File

@@ -0,0 +1,4 @@
import { ToolDocumentation } from './types';
export declare const toolsDocumentation: Record<string, ToolDocumentation>;
export type { ToolDocumentation } from './types';
//# sourceMappingURL=index.d.ts.map

1
dist/mcp/tool-docs/index.d.ts.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mcp/tool-docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AA4B5C,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAmChE,CAAC;AAGF,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}

34
dist/mcp/tool-docs/index.js vendored Normal file
View File

@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toolsDocumentation = void 0;
const discovery_1 = require("./discovery");
const configuration_1 = require("./configuration");
const validation_1 = require("./validation");
const templates_1 = require("./templates");
const system_1 = require("./system");
const guides_1 = require("./guides");
const workflow_management_1 = require("./workflow_management");
exports.toolsDocumentation = {
tools_documentation: system_1.toolsDocumentationDoc,
n8n_health_check: system_1.n8nHealthCheckDoc,
ai_agents_guide: guides_1.aiAgentsGuide,
search_nodes: discovery_1.searchNodesDoc,
get_node: configuration_1.getNodeDoc,
validate_node: validation_1.validateNodeDoc,
validate_workflow: validation_1.validateWorkflowDoc,
get_template: templates_1.getTemplateDoc,
search_templates: templates_1.searchTemplatesDoc,
n8n_create_workflow: workflow_management_1.n8nCreateWorkflowDoc,
n8n_get_workflow: workflow_management_1.n8nGetWorkflowDoc,
n8n_update_full_workflow: workflow_management_1.n8nUpdateFullWorkflowDoc,
n8n_update_partial_workflow: workflow_management_1.n8nUpdatePartialWorkflowDoc,
n8n_delete_workflow: workflow_management_1.n8nDeleteWorkflowDoc,
n8n_list_workflows: workflow_management_1.n8nListWorkflowsDoc,
n8n_validate_workflow: workflow_management_1.n8nValidateWorkflowDoc,
n8n_autofix_workflow: workflow_management_1.n8nAutofixWorkflowDoc,
n8n_test_workflow: workflow_management_1.n8nTestWorkflowDoc,
n8n_executions: workflow_management_1.n8nExecutionsDoc,
n8n_workflow_versions: workflow_management_1.n8nWorkflowVersionsDoc,
n8n_deploy_template: workflow_management_1.n8nDeployTemplateDoc
};
//# sourceMappingURL=index.js.map

1
dist/mcp/tool-docs/index.js.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/tool-docs/index.ts"],"names":[],"mappings":";;;AAGA,2CAA6C;AAC7C,mDAA6C;AAC7C,6CAAoE;AACpE,2CAAiE;AACjE,qCAGkB;AAClB,qCAAyC;AACzC,+DAa+B;AAGlB,QAAA,kBAAkB,GAAsC;IAEnE,mBAAmB,EAAE,8BAAqB;IAC1C,gBAAgB,EAAE,0BAAiB;IAGnC,eAAe,EAAE,sBAAa;IAG9B,YAAY,EAAE,0BAAc;IAG5B,QAAQ,EAAE,0BAAU;IAGpB,aAAa,EAAE,4BAAe;IAC9B,iBAAiB,EAAE,gCAAmB;IAGtC,YAAY,EAAE,0BAAc;IAC5B,gBAAgB,EAAE,8BAAkB;IAGpC,mBAAmB,EAAE,0CAAoB;IACzC,gBAAgB,EAAE,uCAAiB;IACnC,wBAAwB,EAAE,8CAAwB;IAClD,2BAA2B,EAAE,iDAA2B;IACxD,mBAAmB,EAAE,0CAAoB;IACzC,kBAAkB,EAAE,yCAAmB;IACvC,qBAAqB,EAAE,4CAAsB;IAC7C,oBAAoB,EAAE,2CAAqB;IAC3C,iBAAiB,EAAE,wCAAkB;IACrC,cAAc,EAAE,sCAAgB;IAChC,qBAAqB,EAAE,4CAAsB;IAC7C,mBAAmB,EAAE,0CAAoB;CAC1C,CAAC"}

3
dist/mcp/tool-docs/system/index.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
export { toolsDocumentationDoc } from './tools-documentation';
export { n8nHealthCheckDoc } from './n8n-health-check';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}

8
dist/mcp/tool-docs/system/index.js vendored Normal file
View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.n8nHealthCheckDoc = exports.toolsDocumentationDoc = void 0;
var tools_documentation_1 = require("./tools-documentation");
Object.defineProperty(exports, "toolsDocumentationDoc", { enumerable: true, get: function () { return tools_documentation_1.toolsDocumentationDoc; } });
var n8n_health_check_1 = require("./n8n-health-check");
Object.defineProperty(exports, "n8nHealthCheckDoc", { enumerable: true, get: function () { return n8n_health_check_1.n8nHealthCheckDoc; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/index.ts"],"names":[],"mappings":";;;AAAA,6DAA8D;AAArD,4HAAA,qBAAqB,OAAA;AAC9B,uDAAuD;AAA9C,qHAAA,iBAAiB,OAAA"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const n8nDiagnosticDoc: ToolDocumentation;
//# sourceMappingURL=n8n-diagnostic.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-diagnostic.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/n8n-diagnostic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,gBAAgB,EAAE,iBA8F9B,CAAC"}

View File

@@ -0,0 +1,99 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.n8nDiagnosticDoc = void 0;
exports.n8nDiagnosticDoc = {
name: 'n8n_diagnostic',
category: 'system',
essentials: {
description: 'Comprehensive diagnostic with environment-aware debugging, version checks, performance metrics, and mode-specific troubleshooting',
keyParameters: ['verbose'],
example: 'n8n_diagnostic({verbose: true})',
performance: 'Fast - checks environment, API, and npm version (~180ms median)',
tips: [
'Now includes environment-aware debugging based on MCP_MODE (http/stdio)',
'Provides mode-specific troubleshooting (HTTP server vs Claude Desktop)',
'Detects Docker and cloud platforms for targeted guidance',
'Shows performance metrics: response time and cache statistics',
'Includes data-driven tips based on 82% user success rate'
]
},
full: {
description: `Comprehensive diagnostic tool for troubleshooting n8n API configuration and management tool availability.
This tool performs a detailed check of:
- Environment variable configuration (N8N_API_URL, N8N_API_KEY)
- API connectivity and authentication
- Tool availability status
- Common configuration issues
The diagnostic is essential when:
- n8n management tools aren't showing up in the available tools list
- API calls are failing with authentication or connection errors
- You need to verify your n8n instance configuration`,
parameters: {
verbose: {
type: 'boolean',
description: 'Include detailed debug information including full environment variables and API response details',
required: false,
default: false
}
},
returns: `Comprehensive diagnostic report containing:
- timestamp: ISO timestamp of diagnostic run
- environment: Enhanced environment variables
- N8N_API_URL, N8N_API_KEY (masked), NODE_ENV, MCP_MODE
- isDocker: Boolean indicating if running in Docker
- cloudPlatform: Detected cloud platform (railway/render/fly/etc.) or null
- nodeVersion: Node.js version
- platform: OS platform (darwin/win32/linux)
- apiConfiguration: API configuration and connectivity status
- configured, status (connected/error/version), config details
- versionInfo: Version check results (current, latest, upToDate, message, updateCommand)
- toolsAvailability: Tool availability breakdown (doc tools + management tools)
- performance: Performance metrics (responseTimeMs, cacheHitRate, cachedInstances)
- modeSpecificDebug: Mode-specific debugging (ALWAYS PRESENT)
- HTTP mode: port, authTokenConfigured, serverUrl, healthCheckUrl, troubleshooting steps, commonIssues
- stdio mode: configLocation, troubleshooting steps, commonIssues
- dockerDebug: Docker-specific guidance (if IS_DOCKER=true)
- containerDetected, troubleshooting steps, commonIssues
- cloudPlatformDebug: Cloud platform-specific tips (if platform detected)
- name, troubleshooting steps tailored to platform (Railway/Render/Fly/K8s/AWS/etc.)
- nextSteps: Context-specific guidance (if API connected)
- troubleshooting: Troubleshooting guidance (if API not connecting)
- setupGuide: Setup guidance (if API not configured)
- updateWarning: Update recommendation (if version outdated)
- debug: Verbose debug information (if verbose=true)`,
examples: [
'n8n_diagnostic({}) - Quick diagnostic check',
'n8n_diagnostic({verbose: true}) - Detailed diagnostic with environment info',
'n8n_diagnostic({verbose: false}) - Standard diagnostic without sensitive data'
],
useCases: [
'Initial setup verification after configuring N8N_API_URL and N8N_API_KEY',
'Troubleshooting when n8n management tools are not available',
'Debugging API connection failures or authentication errors',
'Verifying n8n instance compatibility and feature availability',
'Pre-deployment checks before using workflow management tools'
],
performance: `Instant response time:
- No database queries
- Only checks environment and makes one test API call
- Verbose mode adds minimal overhead
- Safe to run frequently for monitoring`,
bestPractices: [
'Always run diagnostic first when encountering n8n tool issues',
'Use verbose mode only in secure environments (may expose API URLs)',
'Check diagnostic before attempting workflow operations',
'Include diagnostic output when reporting issues',
'Run after any configuration changes to verify setup'
],
pitfalls: [
'Verbose mode may expose sensitive configuration details - use carefully',
'Requires proper environment variables to detect n8n configuration',
'API connectivity test requires network access to n8n instance',
'Does not test specific workflow operations, only basic connectivity'
],
relatedTools: ['n8n_health_check', 'n8n_list_available_tools', 'tools_documentation']
}
};
//# sourceMappingURL=n8n-diagnostic.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-diagnostic.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/n8n-diagnostic.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAsB;IACjD,IAAI,EAAE,gBAAgB;IACtB,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE;QACV,WAAW,EAAE,mIAAmI;QAChJ,aAAa,EAAE,CAAC,SAAS,CAAC;QAC1B,OAAO,EAAE,iCAAiC;QAC1C,WAAW,EAAE,iEAAiE;QAC9E,IAAI,EAAE;YACJ,yEAAyE;YACzE,wEAAwE;YACxE,0DAA0D;YAC1D,+DAA+D;YAC/D,0DAA0D;SAC3D;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;qDAWoC;QACjD,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,kGAAkG;gBAC/G,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,KAAK;aACf;SACF;QACD,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;qDAwBwC;QACjD,QAAQ,EAAE;YACR,6CAA6C;YAC7C,6EAA6E;YAC7E,+EAA+E;SAChF;QACD,QAAQ,EAAE;YACR,0EAA0E;YAC1E,6DAA6D;YAC7D,4DAA4D;YAC5D,+DAA+D;YAC/D,8DAA8D;SAC/D;QACD,WAAW,EAAE;;;;wCAIuB;QACpC,aAAa,EAAE;YACb,+DAA+D;YAC/D,oEAAoE;YACpE,wDAAwD;YACxD,iDAAiD;YACjD,qDAAqD;SACtD;QACD,QAAQ,EAAE;YACR,yEAAyE;YACzE,mEAAmE;YACnE,+DAA+D;YAC/D,qEAAqE;SACtE;QACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,0BAA0B,EAAE,qBAAqB,CAAC;KACtF;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const n8nHealthCheckDoc: ToolDocumentation;
//# sourceMappingURL=n8n-health-check.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-health-check.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/n8n-health-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,iBAAiB,EAAE,iBAiG/B,CAAC"}

View File

@@ -0,0 +1,102 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.n8nHealthCheckDoc = void 0;
exports.n8nHealthCheckDoc = {
name: 'n8n_health_check',
category: 'system',
essentials: {
description: 'Check n8n instance health, API connectivity, version status, and performance metrics',
keyParameters: ['mode', 'verbose'],
example: 'n8n_health_check({mode: "status"})',
performance: 'Fast - single API call (~150-200ms median)',
tips: [
'Use before starting workflow operations to ensure n8n is responsive',
'Automatically checks if n8n-mcp version is outdated',
'Returns version info, performance metrics, and next-step recommendations',
'New: Shows cache hit rate and response time for performance monitoring'
]
},
full: {
description: `Performs a comprehensive health check of the configured n8n instance through its API.
This tool verifies:
- API endpoint accessibility and response time
- n8n instance version and build information
- Authentication status and permissions
- Available features and enterprise capabilities
- Database connectivity (as reported by n8n)
- Queue system status (if configured)
Health checks are crucial for:
- Monitoring n8n instance availability
- Detecting performance degradation
- Verifying API compatibility before operations
- Ensuring authentication is working correctly`,
parameters: {
mode: {
type: 'string',
required: false,
description: 'Operation mode: "status" (default) for quick health check, "diagnostic" for detailed debug info including env vars and tool status',
default: 'status',
enum: ['status', 'diagnostic']
},
verbose: {
type: 'boolean',
required: false,
description: 'Include extra details in diagnostic mode',
default: false
}
},
returns: `Health status object containing:
- status: Overall health status ('healthy', 'degraded', 'error')
- n8nVersion: n8n instance version information
- instanceId: Unique identifier for the n8n instance
- features: Object listing available features and their status
- mcpVersion: Current n8n-mcp version
- supportedN8nVersion: Recommended n8n version for compatibility
- versionCheck: Version status information
- current: Current n8n-mcp version
- latest: Latest available version from npm
- upToDate: Boolean indicating if version is current
- message: Formatted version status message
- updateCommand: Command to update (if outdated)
- performance: Performance metrics
- responseTimeMs: API response time in milliseconds
- cacheHitRate: Cache efficiency percentage
- cachedInstances: Number of cached API instances
- nextSteps: Recommended actions after health check
- updateWarning: Warning if version is outdated (if applicable)`,
examples: [
'n8n_health_check({}) - Complete health check with version and performance data',
'// Use in monitoring scripts\nconst health = await n8n_health_check({});\nif (health.status !== "ok") alert("n8n is down!");\nif (!health.versionCheck.upToDate) console.log("Update available:", health.versionCheck.updateCommand);',
'// Check before critical operations\nconst health = await n8n_health_check({});\nif (health.performance.responseTimeMs > 1000) console.warn("n8n is slow");\nif (health.versionCheck.isOutdated) console.log(health.updateWarning);'
],
useCases: [
'Pre-flight checks before workflow deployments',
'Continuous monitoring of n8n instance health',
'Troubleshooting connectivity or performance issues',
'Verifying n8n version compatibility with workflows',
'Detecting feature availability (enterprise features, queue mode, etc.)'
],
performance: `Fast response expected:
- Single HTTP request to /health endpoint
- Typically responds in <100ms for healthy instances
- Timeout after 10 seconds indicates severe issues
- Minimal server load - safe for frequent polling`,
bestPractices: [
'Run health checks before batch operations or deployments',
'Set up automated monitoring with regular health checks',
'Log response times to detect performance trends',
'Check version compatibility when deploying workflows',
'Use health status to implement circuit breaker patterns'
],
pitfalls: [
'Requires N8N_API_URL and N8N_API_KEY to be configured',
'Network issues may cause false negatives',
'Does not check individual workflow health',
'Health endpoint might be cached - not real-time for all metrics'
],
relatedTools: ['n8n_list_workflows', 'n8n_validate_workflow', 'n8n_workflow_versions']
}
};
//# sourceMappingURL=n8n-health-check.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-health-check.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/n8n-health-check.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAsB;IAClD,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE;QACV,WAAW,EAAE,sFAAsF;QACnG,aAAa,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;QAClC,OAAO,EAAE,oCAAoC;QAC7C,WAAW,EAAE,4CAA4C;QACzD,IAAI,EAAE;YACJ,qEAAqE;YACrE,qDAAqD;YACrD,0EAA0E;YAC1E,wEAAwE;SACzE;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;;;;+CAc8B;QAC3C,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,oIAAoI;gBACjJ,OAAO,EAAE,QAAQ;gBACjB,IAAI,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC;aAC/B;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,0CAA0C;gBACvD,OAAO,EAAE,KAAK;aACf;SACF;QACD,OAAO,EAAE;;;;;;;;;;;;;;;;;;gEAkBmD;QAC5D,QAAQ,EAAE;YACR,gFAAgF;YAChF,uOAAuO;YACvO,qOAAqO;SACtO;QACD,QAAQ,EAAE;YACR,+CAA+C;YAC/C,8CAA8C;YAC9C,oDAAoD;YACpD,oDAAoD;YACpD,wEAAwE;SACzE;QACD,WAAW,EAAE;;;;kDAIiC;QAC9C,aAAa,EAAE;YACb,0DAA0D;YAC1D,wDAAwD;YACxD,iDAAiD;YACjD,sDAAsD;YACtD,yDAAyD;SAC1D;QACD,QAAQ,EAAE;YACR,uDAAuD;YACvD,0CAA0C;YAC1C,2CAA2C;YAC3C,iEAAiE;SAClE;QACD,YAAY,EAAE,CAAC,oBAAoB,EAAE,uBAAuB,EAAE,uBAAuB,CAAC;KACvF;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const n8nListAvailableToolsDoc: ToolDocumentation;
//# sourceMappingURL=n8n-list-available-tools.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-list-available-tools.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/n8n-list-available-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,wBAAwB,EAAE,iBAsEtC,CAAC"}

View File

@@ -0,0 +1,75 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.n8nListAvailableToolsDoc = void 0;
exports.n8nListAvailableToolsDoc = {
name: 'n8n_list_available_tools',
category: 'system',
essentials: {
description: 'List all available n8n management tools and their capabilities',
keyParameters: [],
example: 'n8n_list_available_tools({})',
performance: 'Instant - returns static tool list',
tips: [
'Shows only tools available with current API configuration',
'If no n8n tools appear, run n8n_diagnostic to troubleshoot',
'Tool availability depends on N8N_API_URL and N8N_API_KEY being set'
]
},
full: {
description: `Lists all available n8n management tools based on current configuration.
This tool provides:
- Complete list of n8n management tools (when API is configured)
- Tool descriptions and capabilities
- Categorized tool listing (workflow, execution, system)
- Dynamic availability based on API configuration
The tool list is dynamic:
- Shows 14+ management tools when N8N_API_URL and N8N_API_KEY are configured
- Shows only documentation tools when API is not configured
- Helps discover available functionality
- Provides quick reference for tool names and purposes`,
parameters: {},
returns: `Object containing:
- tools: Array of available tool objects, each with:
- name: Tool identifier (e.g., 'n8n_create_workflow')
- description: Brief description of tool functionality
- category: Tool category ('workflow', 'execution', 'system')
- requiresApi: Whether tool needs API configuration
- categories: Summary count by category
- totalTools: Total number of available tools
- apiConfigured: Whether n8n API is configured`,
examples: [
'n8n_list_available_tools({}) - List all available tools',
'// Check for specific tool availability\nconst tools = await n8n_list_available_tools({});\nconst hasWorkflowTools = tools.tools.some(t => t.category === "workflow");',
'// Discover management capabilities\nconst result = await n8n_list_available_tools({});\nconsole.log(`${result.totalTools} tools available`);'
],
useCases: [
'Discovering available n8n management capabilities',
'Checking if API configuration is working correctly',
'Finding the right tool for a specific task',
'Generating help documentation or command lists',
'Verifying tool availability before automation scripts'
],
performance: `Instant response:
- No API calls required
- Returns pre-defined tool list
- Filtered based on configuration
- Zero network overhead`,
bestPractices: [
'Check tool availability before building automation workflows',
'Use with n8n_diagnostic if expected tools are missing',
'Reference tool names exactly as returned by this tool',
'Group operations by category for better organization',
'Cache results as tool list only changes with configuration'
],
pitfalls: [
'Tool list is empty if N8N_API_URL and N8N_API_KEY are not set',
'Does not validate if tools will actually work - just shows availability',
'Tool names must be used exactly as returned',
'Does not show tool parameters - use tools_documentation for details'
],
relatedTools: ['n8n_diagnostic', 'n8n_health_check', 'tools_documentation']
}
};
//# sourceMappingURL=n8n-list-available-tools.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-list-available-tools.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/n8n-list-available-tools.ts"],"names":[],"mappings":";;;AAEa,QAAA,wBAAwB,GAAsB;IACzD,IAAI,EAAE,0BAA0B;IAChC,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE;QACV,WAAW,EAAE,gEAAgE;QAC7E,aAAa,EAAE,EAAE;QACjB,OAAO,EAAE,8BAA8B;QACvC,WAAW,EAAE,oCAAoC;QACjD,IAAI,EAAE;YACJ,2DAA2D;YAC3D,4DAA4D;YAC5D,oEAAoE;SACrE;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;;uDAYsC;QACnD,UAAU,EAAE,EAAE;QACd,OAAO,EAAE;;;;;;;;+CAQkC;QAC3C,QAAQ,EAAE;YACR,yDAAyD;YACzD,wKAAwK;YACxK,+IAA+I;SAChJ;QACD,QAAQ,EAAE;YACR,mDAAmD;YACnD,oDAAoD;YACpD,4CAA4C;YAC5C,gDAAgD;YAChD,uDAAuD;SACxD;QACD,WAAW,EAAE;;;;wBAIO;QACpB,aAAa,EAAE;YACb,8DAA8D;YAC9D,uDAAuD;YACvD,uDAAuD;YACvD,sDAAsD;YACtD,4DAA4D;SAC7D;QACD,QAAQ,EAAE;YACR,+DAA+D;YAC/D,yEAAyE;YACzE,6CAA6C;YAC7C,qEAAqE;SACtE;QACD,YAAY,EAAE,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,qBAAqB,CAAC;KAC5E;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const toolsDocumentationDoc: ToolDocumentation;
//# sourceMappingURL=tools-documentation.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"tools-documentation.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/tools-documentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,qBAAqB,EAAE,iBA4DnC,CAAC"}

View File

@@ -0,0 +1,65 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toolsDocumentationDoc = void 0;
exports.toolsDocumentationDoc = {
name: 'tools_documentation',
category: 'system',
essentials: {
description: 'The meta-documentation tool. Returns documentation for any MCP tool, including itself. Call without parameters for a comprehensive overview of all available tools. This is your starting point for discovering n8n MCP capabilities.',
keyParameters: ['topic', 'depth'],
example: 'tools_documentation({topic: "search_nodes"})',
performance: 'Instant (static content)',
tips: [
'Call without parameters first to see all tools',
'Can document itself: tools_documentation({topic: "tools_documentation"})',
'Use depth:"full" for comprehensive details'
]
},
full: {
description: 'The self-referential documentation system for all MCP tools. This tool can document any other tool, including itself. It\'s the primary discovery mechanism for understanding what tools are available and how to use them. Returns utilitarian documentation optimized for AI agent consumption.',
parameters: {
topic: { type: 'string', description: 'Tool name (e.g., "search_nodes"), special topic ("javascript_code_node_guide", "python_code_node_guide"), or "overview". Leave empty for quick reference.', required: false },
depth: { type: 'string', description: 'Level of detail: "essentials" (default, concise) or "full" (comprehensive with examples)', required: false }
},
returns: 'Markdown-formatted documentation tailored for the requested tool and depth. For essentials: key info, parameters, example, tips. For full: complete details, all examples, use cases, best practices.',
examples: [
'// Get started - see all available tools',
'tools_documentation()',
'',
'// Learn about a specific tool',
'tools_documentation({topic: "search_nodes"})',
'',
'// Get comprehensive details',
'tools_documentation({topic: "validate_workflow", depth: "full"})',
'',
'// Self-referential example - document this tool',
'tools_documentation({topic: "tools_documentation", depth: "full"})',
'',
'// Code node guides',
'tools_documentation({topic: "javascript_code_node_guide"})',
'tools_documentation({topic: "python_code_node_guide"})'
],
useCases: [
'Initial discovery of available MCP tools',
'Learning how to use specific tools',
'Finding required and optional parameters',
'Getting working examples to copy',
'Understanding tool performance characteristics',
'Discovering related tools for workflows'
],
performance: 'Instant - all documentation is pre-loaded in memory',
bestPractices: [
'Always start with tools_documentation() to see available tools',
'Use essentials for quick parameter reference during coding',
'Switch to full depth when debugging or learning new tools',
'Check Code node guides when working with Code nodes'
],
pitfalls: [
'Tool names must match exactly - use the overview to find correct names',
'Not all internal functions are documented',
'Special topics (code guides) require exact names'
],
relatedTools: ['n8n_health_check for verifying API connection', 'search_templates for workflow examples', 'search_nodes for finding nodes']
}
};
//# sourceMappingURL=tools-documentation.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"tools-documentation.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/tools-documentation.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAAsB;IACtD,IAAI,EAAE,qBAAqB;IAC3B,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE;QACV,WAAW,EAAE,uOAAuO;QACpP,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;QACjC,OAAO,EAAE,8CAA8C;QACvD,WAAW,EAAE,0BAA0B;QACvC,IAAI,EAAE;YACJ,gDAAgD;YAChD,0EAA0E;YAC1E,4CAA4C;SAC7C;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,mSAAmS;QAChT,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2JAA2J,EAAE,QAAQ,EAAE,KAAK,EAAE;YACpN,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0FAA0F,EAAE,QAAQ,EAAE,KAAK,EAAE;SACpJ;QACD,OAAO,EAAE,uMAAuM;QAChN,QAAQ,EAAE;YACR,0CAA0C;YAC1C,uBAAuB;YACvB,EAAE;YACF,gCAAgC;YAChC,8CAA8C;YAC9C,EAAE;YACF,8BAA8B;YAC9B,kEAAkE;YAClE,EAAE;YACF,kDAAkD;YAClD,oEAAoE;YACpE,EAAE;YACF,qBAAqB;YACrB,4DAA4D;YAC5D,wDAAwD;SACzD;QACD,QAAQ,EAAE;YACR,0CAA0C;YAC1C,oCAAoC;YACpC,0CAA0C;YAC1C,kCAAkC;YAClC,gDAAgD;YAChD,yCAAyC;SAC1C;QACD,WAAW,EAAE,qDAAqD;QAClE,aAAa,EAAE;YACb,gEAAgE;YAChE,4DAA4D;YAC5D,2DAA2D;YAC3D,qDAAqD;SACtD;QACD,QAAQ,EAAE;YACR,wEAAwE;YACxE,2CAA2C;YAC3C,kDAAkD;SACnD;QACD,YAAY,EAAE,CAAC,+CAA+C,EAAE,wCAAwC,EAAE,gCAAgC,CAAC;KAC5I;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const getTemplateDoc: ToolDocumentation;
//# sourceMappingURL=get-template.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-template.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/templates/get-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,iBA+E5B,CAAC"}

View File

@@ -0,0 +1,84 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTemplateDoc = void 0;
exports.getTemplateDoc = {
name: 'get_template',
category: 'templates',
essentials: {
description: 'Get workflow template by ID with configurable detail level. Ready to import. IDs from search_templates.',
keyParameters: ['templateId', 'mode'],
example: 'get_template({templateId: 1234, mode: "full"})',
performance: 'Fast (<100ms) - single database lookup',
tips: [
'Get template IDs from search_templates first',
'Use mode="nodes_only" for quick overview, "structure" for topology, "full" for import',
'Returns complete workflow JSON ready for import into n8n'
]
},
full: {
description: `Retrieves the complete workflow JSON for a specific template by its ID. The returned workflow can be directly imported into n8n through the UI or API. This tool fetches pre-built workflows from the community template library containing 2,700+ curated workflows.`,
parameters: {
templateId: {
type: 'number',
required: true,
description: 'The numeric ID of the template to retrieve. Get IDs from search_templates'
},
mode: {
type: 'string',
required: false,
description: 'Response detail level: "nodes_only" (minimal - just node list), "structure" (nodes + connections), "full" (complete workflow JSON, default)',
default: 'full',
enum: ['nodes_only', 'structure', 'full']
}
},
returns: `Returns an object containing:
- template: Complete template information including workflow JSON
- id: Template ID
- name: Template name
- description: What the workflow does
- author: Creator information (name, username, verified status)
- nodes: Array of node types used
- views: Number of times viewed
- created: Creation date
- url: Link to template on n8n.io
- workflow: Complete workflow JSON with structure:
- nodes: Array of node objects (id, name, type, typeVersion, position, parameters)
- connections: Object mapping source nodes to targets
- settings: Workflow configuration (timezone, error handling, etc.)
- usage: Instructions for using the workflow`,
examples: [
'get_template({templateId: 1234}) - Get complete workflow (default mode="full")',
'get_template({templateId: 1234, mode: "nodes_only"}) - Get just the node list',
'get_template({templateId: 1234, mode: "structure"}) - Get nodes and connections',
'get_template({templateId: 5678, mode: "full"}) - Get complete workflow JSON for import'
],
useCases: [
'Download workflows for direct import into n8n',
'Study workflow patterns and best practices',
'Get complete workflow JSON for customization',
'Clone popular workflows for your use case',
'Learn how complex automations are built'
],
performance: `Fast performance with single database lookup:
- Query time: <10ms for template retrieval
- Workflow JSON parsing: <50ms
- Total response time: <100ms
- No network calls (uses local cache)`,
bestPractices: [
'Always check if template exists before attempting modifications',
'Review workflow nodes before importing to ensure compatibility',
'Save template JSON locally if planning multiple customizations',
'Check template creation date for most recent patterns',
'Verify all required credentials are configured before import'
],
pitfalls: [
'Template IDs change when database is refreshed',
'Some templates may use deprecated node versions',
'Credentials in templates are placeholders - configure your own',
'Not all templates work with all n8n versions',
'Template may reference external services you don\'t have access to'
],
relatedTools: ['search_templates', 'n8n_create_workflow']
}
};
//# sourceMappingURL=get-template.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-template.js","sour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File

@@ -0,0 +1,3 @@
export { getTemplateDoc } from './get-template';
export { searchTemplatesDoc } from './search-templates';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}

8
dist/mcp/tool-docs/templates/index.js vendored Normal file
View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.searchTemplatesDoc = exports.getTemplateDoc = void 0;
var get_template_1 = require("./get-template");
Object.defineProperty(exports, "getTemplateDoc", { enumerable: true, get: function () { return get_template_1.getTemplateDoc; } });
var search_templates_1 = require("./search-templates");
Object.defineProperty(exports, "searchTemplatesDoc", { enumerable: true, get: function () { return search_templates_1.searchTemplatesDoc; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/templates/index.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAAvC,8GAAA,cAAc,OAAA;AACvB,uDAAwD;AAA/C,sHAAA,kBAAkB,OAAA"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const searchTemplatesDoc: ToolDocumentation;
//# sourceMappingURL=search-templates.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"search-templates.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/templates/search-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,kBAAkB,EAAE,iBA0IhC,CAAC"}

View File

@@ -0,0 +1,143 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.searchTemplatesDoc = void 0;
exports.searchTemplatesDoc = {
name: 'search_templates',
category: 'templates',
essentials: {
description: 'Unified template search with multiple modes: keyword search, by node types, by task type, or by metadata. 2,700+ templates available.',
keyParameters: ['searchMode', 'query', 'nodeTypes', 'task', 'limit'],
example: 'search_templates({searchMode: "by_task", task: "webhook_processing"})',
performance: 'Fast (<100ms) - FTS5 full-text search',
tips: [
'searchMode="keyword" (default): Search by name/description',
'searchMode="by_nodes": Find templates using specific nodes',
'searchMode="by_task": Get curated templates for common tasks',
'searchMode="by_metadata": Filter by complexity, services, audience'
]
},
full: {
description: `**Search Modes:**
- keyword (default): Full-text search across template names and descriptions
- by_nodes: Find templates that use specific node types
- by_task: Get curated templates for predefined task categories
- by_metadata: Filter by complexity, setup time, required services, or target audience
**Available Task Types (for searchMode="by_task"):**
ai_automation, data_sync, webhook_processing, email_automation, slack_integration, data_transformation, file_processing, scheduling, api_integration, database_operations`,
parameters: {
searchMode: {
type: 'string',
required: false,
description: 'Search mode: "keyword" (default), "by_nodes", "by_task", "by_metadata"'
},
query: {
type: 'string',
required: false,
description: 'For searchMode=keyword: Search keywords (e.g., "chatbot", "automation")'
},
nodeTypes: {
type: 'array',
required: false,
description: 'For searchMode=by_nodes: Array of node types (e.g., ["n8n-nodes-base.httpRequest", "n8n-nodes-base.slack"])'
},
task: {
type: 'string',
required: false,
description: 'For searchMode=by_task: Task type (ai_automation, data_sync, webhook_processing, email_automation, slack_integration, data_transformation, file_processing, scheduling, api_integration, database_operations)'
},
complexity: {
type: 'string',
required: false,
description: 'For searchMode=by_metadata: Filter by complexity ("simple", "medium", "complex")'
},
maxSetupMinutes: {
type: 'number',
required: false,
description: 'For searchMode=by_metadata: Maximum setup time in minutes (5-480)'
},
minSetupMinutes: {
type: 'number',
required: false,
description: 'For searchMode=by_metadata: Minimum setup time in minutes (5-480)'
},
requiredService: {
type: 'string',
required: false,
description: 'For searchMode=by_metadata: Filter by required service (e.g., "openai", "slack", "google")'
},
targetAudience: {
type: 'string',
required: false,
description: 'For searchMode=by_metadata: Filter by target audience (e.g., "developers", "marketers")'
},
category: {
type: 'string',
required: false,
description: 'For searchMode=by_metadata: Filter by category (e.g., "automation", "integration")'
},
fields: {
type: 'array',
required: false,
description: 'For searchMode=keyword: Fields to include (id, name, description, author, nodes, views, created, url, metadata)'
},
limit: {
type: 'number',
required: false,
description: 'Maximum results (default 20, max 100)'
},
offset: {
type: 'number',
required: false,
description: 'Pagination offset (default 0)'
}
},
returns: `Returns an object containing:
- templates: Array of matching templates
- id: Template ID for get_template()
- name: Template name
- description: What the workflow does
- author: Creator information
- nodes: Array of node types used
- views: Popularity metric
- created: Creation date
- url: Link to template
- metadata: AI-generated metadata (complexity, services, etc.)
- totalFound: Total matching templates
- searchMode: The mode used`,
examples: [
'// Keyword search (default)\nsearch_templates({query: "chatbot"})',
'// Find templates using specific nodes\nsearch_templates({searchMode: "by_nodes", nodeTypes: ["n8n-nodes-base.httpRequest", "n8n-nodes-base.slack"]})',
'// Get templates for a task type\nsearch_templates({searchMode: "by_task", task: "webhook_processing"})',
'// Filter by metadata\nsearch_templates({searchMode: "by_metadata", complexity: "simple", requiredService: "openai"})',
'// Combine metadata filters\nsearch_templates({searchMode: "by_metadata", maxSetupMinutes: 30, targetAudience: "developers"})'
],
useCases: [
'Find workflows by business purpose (keyword search)',
'Find templates using specific integrations (by_nodes)',
'Get pre-built solutions for common tasks (by_task)',
'Filter by complexity for team skill level (by_metadata)',
'Find templates requiring specific services (by_metadata)'
],
performance: `Fast performance across all modes:
- keyword: <50ms with FTS5 indexing
- by_nodes: <100ms with indexed lookups
- by_task: <50ms from curated cache
- by_metadata: <100ms with filtered queries`,
bestPractices: [
'Use searchMode="by_task" for common automation patterns',
'Use searchMode="by_nodes" when you know which integrations you need',
'Use searchMode="keyword" for general discovery',
'Combine by_metadata filters for precise matching',
'Use get_template(id) to get the full workflow JSON'
],
pitfalls: [
'searchMode="keyword" searches names/descriptions, not node types',
'by_nodes requires full node type with prefix (n8n-nodes-base.xxx)',
'by_metadata filters may return fewer results',
'Not all templates have complete metadata'
],
relatedTools: ['get_template', 'search_nodes', 'validate_workflow']
}
};
//# sourceMappingURL=search-templates.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"search-templates.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/templates/search-templates.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAsB;IACnD,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,WAAW;IACrB,UAAU,EAAE;QACV,WAAW,EAAE,uIAAuI;QACpJ,aAAa,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC;QACpE,OAAO,EAAE,uEAAuE;QAChF,WAAW,EAAE,uCAAuC;QACpD,IAAI,EAAE;YACJ,4DAA4D;YAC5D,4DAA4D;YAC5D,8DAA8D;YAC9D,oEAAoE;SACrE;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;0KAOyJ;QACtK,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,wEAAwE;aACtF;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,yEAAyE;aACvF;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,6GAA6G;aAC3H;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,+MAA+M;aAC7N;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,kFAAkF;aAChG;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,mEAAmE;aACjF;YACD,eAAe,EAAE;gBACf,IAAI,EAA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

@@ -0,0 +1,32 @@
export interface ToolDocumentation {
name: string;
category: string;
essentials: {
description: string;
keyParameters: string[];
example: string;
performance: string;
tips: string[];
};
full: {
description: string;
parameters: Record<string, {
type: string;
description: string;
required?: boolean;
default?: any;
examples?: string[];
enum?: string[];
}>;
returns: string;
examples: string[];
useCases: string[];
performance: string;
errorHandling?: string;
bestPractices: string[];
pitfalls: string[];
modeComparison?: string;
relatedTools: string[];
};
}
//# sourceMappingURL=types.d.ts.map

1
dist/mcp/tool-docs/types.d.ts.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/mcp/tool-docs/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE;QACV,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,EAAE,MAAM,EAAE,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,EAAE,CAAC;KAChB,CAAC;IACF,IAAI,EAAE;QACJ,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;YACzB,IAAI,EAAE,MAAM,CAAC;YACb,WAAW,EAAE,MAAM,CAAC;YACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;YACnB,OAAO,CAAC,EAAE,GAAG,CAAC;YACd,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;YACpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;SACjB,CAAC,CAAC;QACH,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,aAAa,EAAE,MAAM,EAAE,CAAC;QACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,YAAY,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;CACH"}

3
dist/mcp/tool-docs/types.js vendored Normal file
View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map

1
dist/mcp/tool-docs/types.js.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/mcp/tool-docs/types.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,3 @@
export { validateNodeDoc } from './validate-node';
export { validateWorkflowDoc } from './validate-workflow';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateWorkflowDoc = exports.validateNodeDoc = void 0;
var validate_node_1 = require("./validate-node");
Object.defineProperty(exports, "validateNodeDoc", { enumerable: true, get: function () { return validate_node_1.validateNodeDoc; } });
var validate_workflow_1 = require("./validate-workflow");
Object.defineProperty(exports, "validateWorkflowDoc", { enumerable: true, get: function () { return validate_workflow_1.validateWorkflowDoc; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/index.ts"],"names":[],"mappings":";;;AAAA,iDAAkD;AAAzC,gHAAA,eAAe,OAAA;AACxB,yDAA0D;AAAjD,wHAAA,mBAAmB,OAAA"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const validateNodeDoc: ToolDocumentation;
//# sourceMappingURL=validate-node.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validate-node.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/validate-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,eAAe,EAAE,iBA6E7B,CAAC"}

View File

@@ -0,0 +1,82 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateNodeDoc = void 0;
exports.validateNodeDoc = {
name: 'validate_node',
category: 'validation',
essentials: {
description: 'Validate n8n node configuration. Use mode="full" for comprehensive validation with errors/warnings/suggestions, mode="minimal" for quick required fields check.',
keyParameters: ['nodeType', 'config', 'mode', 'profile'],
example: 'validate_node({nodeType: "nodes-base.slack", config: {resource: "channel", operation: "create"}})',
performance: 'Fast (<100ms)',
tips: [
'Always call get_node({detail:"standard"}) first to see required fields',
'Use mode="minimal" for quick checks during development',
'Use mode="full" with profile="strict" before production deployment',
'Includes automatic structure validation for filter, resourceMapper, etc.'
]
},
full: {
description: `**Validation Modes:**
- full (default): Comprehensive validation with errors, warnings, suggestions, and automatic structure validation
- minimal: Quick check for required fields only - fast but less thorough
**Validation Profiles (for mode="full"):**
- minimal: Very lenient, basic checks only
- runtime: Standard validation (default)
- ai-friendly: Balanced for AI agent workflows
- strict: Most thorough, recommended for production
**Automatic Structure Validation:**
Validates complex n8n types automatically:
- filter (FilterValue): 40+ operations (equals, contains, regex, etc.)
- resourceMapper (ResourceMapperValue): Data mapping configuration
- assignmentCollection (AssignmentCollectionValue): Variable assignments
- resourceLocator (INodeParameterResourceLocator): Resource selection modes`,
parameters: {
nodeType: { type: 'string', required: true, description: 'Node type with prefix: "nodes-base.slack"' },
config: { type: 'object', required: true, description: 'Configuration object to validate. Use {} for empty config' },
mode: { type: 'string', required: false, description: 'Validation mode: "full" (default) or "minimal"' },
profile: { type: 'string', required: false, description: 'Validation profile for mode=full: "minimal", "runtime" (default), "ai-friendly", "strict"' }
},
returns: `Object containing:
- nodeType: The validated node type
- workflowNodeType: Type to use in workflow JSON
- displayName: Human-readable node name
- valid: Boolean indicating if configuration is valid
- errors: Array of error objects with type, property, message, fix
- warnings: Array of warning objects with suggestions
- suggestions: Array of improvement suggestions
- missingRequiredFields: (mode=minimal only) Array of missing required field names
- summary: Object with hasErrors, errorCount, warningCount, suggestionCount`,
examples: [
'// Full validation with default profile\nvalidate_node({nodeType: "nodes-base.slack", config: {resource: "channel", operation: "create"}})',
'// Quick required fields check\nvalidate_node({nodeType: "nodes-base.webhook", config: {}, mode: "minimal"})',
'// Strict validation for production\nvalidate_node({nodeType: "nodes-base.httpRequest", config: {...}, mode: "full", profile: "strict"})',
'// Validate IF node with filter\nvalidate_node({nodeType: "nodes-base.if", config: {conditions: {combinator: "and", conditions: [...]}}})'
],
useCases: [
'Validate node configuration before adding to workflow',
'Quick check for required fields during development',
'Pre-production validation with strict profile',
'Validate complex structures (filters, resource mappers)',
'Get suggestions for improving node configuration'
],
performance: 'Fast validation: <50ms for minimal mode, <100ms for full mode. Structure validation adds minimal overhead.',
bestPractices: [
'Always call get_node() first to understand required fields',
'Use mode="minimal" for rapid iteration during development',
'Use profile="strict" before deploying to production',
'Pay attention to warnings - they often prevent runtime issues',
'Validate after any configuration changes'
],
pitfalls: [
'Empty config {} is valid for some nodes (e.g., manual trigger)',
'mode="minimal" only checks required fields, not value validity',
'Some warnings may be acceptable for specific use cases',
'Credential validation requires runtime context'
],
relatedTools: ['get_node', 'validate_workflow', 'n8n_autofix_workflow']
}
};
//# sourceMappingURL=validate-node.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validate-node.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/validate-node.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB;IAChD,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,YAAY;IACtB,UAAU,EAAE;QACV,WAAW,EAAE,iKAAiK;QAC9K,aAAa,E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} from '../types';
export declare const validateWorkflowDoc: ToolDocumentation;
//# sourceMappingURL=validate-workflow.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validate-workflow.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/validate-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,mBAAmB,EAAE,iBAiFjC,CAAC"}

View File

@@ -0,0 +1,86 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateWorkflowDoc = void 0;
exports.validateWorkflowDoc = {
name: 'validate_workflow',
category: 'validation',
essentials: {
description: 'Full workflow validation: structure, connections, expressions, AI tools. Returns errors/warnings/fixes. Essential before deploy.',
keyParameters: ['workflow', 'options'],
example: 'validate_workflow({workflow: {nodes: [...], connections: {...}}})',
performance: 'Moderate (100-500ms)',
tips: [
'Always validate before n8n_create_workflow to catch errors early',
'Use options.profile="minimal" for quick checks during development',
'AI tool connections are automatically validated for proper node references',
'Detects operator structure issues (binary vs unary, singleValue requirements)'
]
},
full: {
description: 'Performs comprehensive validation of n8n workflows including structure, node configurations, connections, and expressions. This is a three-layer validation system that catches errors before deployment, validates complex multi-node workflows, checks all n8n expressions for syntax errors, and ensures proper node connections and data flow.',
parameters: {
workflow: {
type: 'object',
required: true,
description: 'The complete workflow JSON to validate. Must include nodes array and connections object.'
},
options: {
type: 'object',
required: false,
description: 'Validation options object'
},
'options.validateNodes': {
type: 'boolean',
required: false,
description: 'Validate individual node configurations. Default: true'
},
'options.validateConnections': {
type: 'boolean',
required: false,
description: 'Validate node connections and flow. Default: true'
},
'options.validateExpressions': {
type: 'boolean',
required: false,
description: 'Validate n8n expressions syntax and references. Default: true'
},
'options.profile': {
type: 'string',
required: false,
description: 'Validation profile for node validation: minimal, runtime (default), ai-friendly, strict'
}
},
returns: 'Object with valid (boolean), errors (array), warnings (array), statistics (object), and suggestions (array)',
examples: [
'validate_workflow({workflow: myWorkflow}) - Full validation with default settings',
'validate_workflow({workflow: myWorkflow, options: {profile: "minimal"}}) - Quick validation for editing',
'validate_workflow({workflow: myWorkflow, options: {validateExpressions: false}}) - Skip expression validation'
],
useCases: [
'Pre-deployment validation to catch all workflow issues',
'Quick validation during workflow development',
'Validate workflows with AI Agent nodes and tool connections',
'Check expression syntax before workflow execution',
'Ensure workflow structure integrity after modifications'
],
performance: 'Moderate (100-500ms). Depends on workflow size and validation options. Expression validation adds ~50-100ms.',
bestPractices: [
'Always validate workflows before creating or updating in n8n',
'Use minimal profile during development, strict profile before production',
'Pay attention to warnings - they often indicate potential runtime issues',
'Validate after any workflow modifications, especially connection changes',
'Check statistics to understand workflow complexity',
'**Auto-sanitization runs during create/update**: Operator structures and missing metadata are automatically fixed when workflows are created or updated, but validation helps catch issues before they reach n8n',
'If validation detects operator issues, they will be auto-fixed during n8n_create_workflow or n8n_update_partial_workflow'
],
pitfalls: [
'Large workflows (100+ nodes) may take longer to validate',
'Expression validation requires proper node references to exist',
'Some warnings may be acceptable depending on use case',
'Validation cannot catch all runtime errors (e.g., API failures)',
'Profile setting only affects node validation, not connection/expression checks'
],
relatedTools: ['validate_node', 'n8n_create_workflow', 'n8n_update_partial_workflow', 'n8n_autofix_workflow']
}
};
//# sourceMappingURL=validate-workflow.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validate-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/validate-workflow.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAsB;IACpD,IAAI,EAAE,mBAAmB;IACzB,QAAQ,EAAE,YAAY;IACtB,UAAU,EAAE;QACV,WAAW,EAAE,kIAAkI;QAC/I,aAAa,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;QACtC,OAAO,EAAE,mEAAmE;QAC5E,WAAW,EAAE,sBAAsB;QACnC,IAAI,EAAE;YACJ,kEAAkE;YAClE,mEAAmE;YACnE,4EAA4E;YAC5E,+EAA+E;SAChF;KAC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 -0,0 +1,13 @@
export { n8nCreateWorkflowDoc } from './n8n-create-workflow';
export { n8nGetWorkflowDoc } from './n8n-get-workflow';
export { n8nUpdateFullWorkflowDoc } from './n8n-update-full-workflow';
export { n8nUpdatePartialWorkflowDoc } from './n8n-update-partial-workflow';
export { n8nDeleteWorkflowDoc } from './n8n-delete-workflow';
export { n8nListWorkflowsDoc } from './n8n-list-workflows';
export { n8nValidateWorkflowDoc } from './n8n-validate-workflow';
export { n8nAutofixWorkflowDoc } from './n8n-autofix-workflow';
export { n8nTestWorkflowDoc } from './n8n-test-workflow';
export { n8nExecutionsDoc } from './n8n-executions';
export { n8nWorkflowVersionsDoc } from './n8n-workflow-versions';
export { n8nDeployTemplateDoc } from './n8n-deploy-template';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC"}

View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.n8nDeployTemplateDoc = exports.n8nWorkflowVersionsDoc = exports.n8nExecutionsDoc = exports.n8nTestWorkflowDoc = exports.n8nAutofixWorkflowDoc = exports.n8nValidateWorkflowDoc = exports.n8nListWorkflowsDoc = exports.n8nDeleteWorkflowDoc = exports.n8nUpdatePartialWorkflowDoc = exports.n8nUpdateFullWorkflowDoc = exports.n8nGetWorkflowDoc = exports.n8nCreateWorkflowDoc = void 0;
var n8n_create_workflow_1 = require("./n8n-create-workflow");
Object.defineProperty(exports, "n8nCreateWorkflowDoc", { enumerable: true, get: function () { return n8n_create_workflow_1.n8nCreateWorkflowDoc; } });
var n8n_get_workflow_1 = require("./n8n-get-workflow");
Object.defineProperty(exports, "n8nGetWorkflowDoc", { enumerable: true, get: function () { return n8n_get_workflow_1.n8nGetWorkflowDoc; } });
var n8n_update_full_workflow_1 = require("./n8n-update-full-workflow");
Object.defineProperty(exports, "n8nUpdateFullWorkflowDoc", { enumerable: true, get: function () { return n8n_update_full_workflow_1.n8nUpdateFullWorkflowDoc; } });
var n8n_update_partial_workflow_1 = require("./n8n-update-partial-workflow");
Object.defineProperty(exports, "n8nUpdatePartialWorkflowDoc", { enumerable: true, get: function () { return n8n_update_partial_workflow_1.n8nUpdatePartialWorkflowDoc; } });
var n8n_delete_workflow_1 = require("./n8n-delete-workflow");
Object.defineProperty(exports, "n8nDeleteWorkflowDoc", { enumerable: true, get: function () { return n8n_delete_workflow_1.n8nDeleteWorkflowDoc; } });
var n8n_list_workflows_1 = require("./n8n-list-workflows");
Object.defineProperty(exports, "n8nListWorkflowsDoc", { enumerable: true, get: function () { return n8n_list_workflows_1.n8nListWorkflowsDoc; } });
var n8n_validate_workflow_1 = require("./n8n-validate-workflow");
Object.defineProperty(exports, "n8nValidateWorkflowDoc", { enumerable: true, get: function () { return n8n_validate_workflow_1.n8nValidateWorkflowDoc; } });
var n8n_autofix_workflow_1 = require("./n8n-autofix-workflow");
Object.defineProperty(exports, "n8nAutofixWorkflowDoc", { enumerable: true, get: function () { return n8n_autofix_workflow_1.n8nAutofixWorkflowDoc; } });
var n8n_test_workflow_1 = require("./n8n-test-workflow");
Object.defineProperty(exports, "n8nTestWorkflowDoc", { enumerable: true, get: function () { return n8n_test_workflow_1.n8nTestWorkflowDoc; } });
var n8n_executions_1 = require("./n8n-executions");
Object.defineProperty(exports, "n8nExecutionsDoc", { enumerable: true, get: function () { return n8n_executions_1.n8nExecutionsDoc; } });
var n8n_workflow_versions_1 = require("./n8n-workflow-versions");
Object.defineProperty(exports, "n8nWorkflowVersionsDoc", { enumerable: true, get: function () { return n8n_workflow_versions_1.n8nWorkflowVersionsDoc; } });
var n8n_deploy_template_1 = require("./n8n-deploy-template");
Object.defineProperty(exports, "n8nDeployTemplateDoc", { enumerable: true, get: function () { return n8n_deploy_template_1.n8nDeployTemplateDoc; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/index.ts"],"names":[],"mappings":";;;AAAA,6DAA6D;AAApD,2HAAA,oBAAoB,OAAA;AAC7B,uDAAuD;AAA9C,qHAAA,iBAAiB,OAAA;AAC1B,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,6EAA4E;AAAnE,0IAAA,2BAA2B,OAAA;AACpC,6DAA6D;AAApD,2HAAA,oBAAoB,OAAA;AAC7B,2DAA2D;AAAlD,yHAAA,mBAAmB,OAAA;AAC5B,iEAAiE;AAAxD,+HAAA,sBAAsB,OAAA;AAC/B,+DAA+D;AAAtD,6HAAA,qBAAqB,OAAA;AAC9B,yDAAyD;AAAhD,uHAAA,kBAAkB,OAAA;AAC3B,mDAAoD;AAA3C,kHAAA,gBAAgB,OAAA;AACzB,iEAAiE;AAAxD,+HAAA,sBAAsB,OAAA;AAC/B,6DAA6D;AAApD,2HAAA,oBAAoB,OAAA"}

Some files were not shown because too many files have changed in this diff Show More