mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-02-06 05:23:08 +00:00
chore: add pre-built dist folder for npx usage
This commit is contained in:
committed by
Romuald Członkowski
parent
a70d96a373
commit
5057481e70
13
dist/mcp/tool-docs/workflow_management/index.d.ts
vendored
Normal file
13
dist/mcp/tool-docs/workflow_management/index.d.ts
vendored
Normal file
@@ -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
|
||||
1
dist/mcp/tool-docs/workflow_management/index.d.ts.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/index.d.ts.map
vendored
Normal 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"}
|
||||
28
dist/mcp/tool-docs/workflow_management/index.js
vendored
Normal file
28
dist/mcp/tool-docs/workflow_management/index.js
vendored
Normal 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
|
||||
1
dist/mcp/tool-docs/workflow_management/index.js.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/index.js.map
vendored
Normal 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"}
|
||||
3
dist/mcp/tool-docs/workflow_management/n8n-autofix-workflow.d.ts
vendored
Normal file
3
dist/mcp/tool-docs/workflow_management/n8n-autofix-workflow.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { ToolDocumentation } from '../types';
|
||||
export declare const n8nAutofixWorkflowDoc: ToolDocumentation;
|
||||
//# sourceMappingURL=n8n-autofix-workflow.d.ts.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-autofix-workflow.d.ts.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-autofix-workflow.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-autofix-workflow.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-autofix-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,qBAAqB,EAAE,iBA6JnC,CAAC"}
|
||||
162
dist/mcp/tool-docs/workflow_management/n8n-autofix-workflow.js
vendored
Normal file
162
dist/mcp/tool-docs/workflow_management/n8n-autofix-workflow.js
vendored
Normal file
@@ -0,0 +1,162 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.n8nAutofixWorkflowDoc = void 0;
|
||||
exports.n8nAutofixWorkflowDoc = {
|
||||
name: 'n8n_autofix_workflow',
|
||||
category: 'workflow_management',
|
||||
essentials: {
|
||||
description: 'Automatically fix common workflow validation errors - expression formats, typeVersions, error outputs, webhook paths, and smart version upgrades',
|
||||
keyParameters: ['id', 'applyFixes'],
|
||||
example: 'n8n_autofix_workflow({id: "wf_abc123", applyFixes: false})',
|
||||
performance: 'Network-dependent (200-1500ms) - fetches, validates, and optionally updates workflow with smart migrations',
|
||||
tips: [
|
||||
'Use applyFixes: false to preview changes before applying',
|
||||
'Set confidenceThreshold to control fix aggressiveness (high/medium/low)',
|
||||
'Supports expression formats, typeVersion issues, error outputs, node corrections, webhook paths, AND version upgrades',
|
||||
'High-confidence fixes (≥90%) are safe for auto-application',
|
||||
'Version upgrades include smart migration with breaking change detection',
|
||||
'Post-update guidance provides AI-friendly step-by-step instructions for manual changes'
|
||||
]
|
||||
},
|
||||
full: {
|
||||
description: `Automatically detects and fixes common workflow validation errors in n8n workflows. This tool:
|
||||
|
||||
- Fetches the workflow from your n8n instance
|
||||
- Runs comprehensive validation to detect issues
|
||||
- Generates targeted fixes for common problems
|
||||
- Optionally applies the fixes back to the workflow
|
||||
|
||||
The auto-fixer can resolve:
|
||||
1. **Expression Format Issues**: Missing '=' prefix in n8n expressions (e.g., {{ $json.field }} → ={{ $json.field }})
|
||||
2. **TypeVersion Corrections**: Downgrades nodes with unsupported typeVersions to maximum supported
|
||||
3. **Error Output Configuration**: Removes conflicting onError settings when error connections are missing
|
||||
4. **Node Type Corrections**: Intelligently fixes unknown node types using similarity matching:
|
||||
- Handles deprecated package prefixes (n8n-nodes-base. → nodes-base.)
|
||||
- Corrects capitalization mistakes (HttpRequest → httpRequest)
|
||||
- Suggests correct packages (nodes-base.openai → nodes-langchain.openAi)
|
||||
- Uses multi-factor scoring: name similarity, category match, package match, pattern match
|
||||
- Only auto-fixes suggestions with ≥90% confidence
|
||||
- Leverages NodeSimilarityService with 5-minute caching for performance
|
||||
5. **Webhook Path Generation**: Automatically generates UUIDs for webhook nodes missing path configuration:
|
||||
- Generates a unique UUID for webhook path
|
||||
- Sets both 'path' parameter and 'webhookId' field to the same UUID
|
||||
- Ensures webhook nodes become functional with valid endpoints
|
||||
- High confidence fix as UUID generation is deterministic
|
||||
6. **Smart Version Upgrades** (NEW): Proactively upgrades nodes to their latest versions:
|
||||
- Detects outdated node versions and recommends upgrades
|
||||
- Applies smart migrations with auto-migratable property changes
|
||||
- Handles breaking changes intelligently (Execute Workflow v1.0→v1.1, Webhook v2.0→v2.1, etc.)
|
||||
- Generates UUIDs for required fields (webhookId), sets sensible defaults
|
||||
- HIGH confidence for non-breaking upgrades, MEDIUM for breaking changes with auto-migration
|
||||
- Example: Execute Workflow v1.0→v1.1 adds inputFieldMapping automatically
|
||||
7. **Version Migration Guidance** (NEW): Documents complex migrations requiring manual intervention:
|
||||
- Identifies breaking changes that cannot be auto-migrated
|
||||
- Provides AI-friendly post-update guidance with step-by-step instructions
|
||||
- Lists required actions by priority (CRITICAL, HIGH, MEDIUM, LOW)
|
||||
- Documents behavior changes and their impact
|
||||
- Estimates time required for manual migration steps
|
||||
- MEDIUM/LOW confidence - requires review before applying
|
||||
|
||||
The tool uses a confidence-based system to ensure safe fixes:
|
||||
- **High (≥90%)**: Safe to auto-apply (exact matches, known patterns)
|
||||
- **Medium (70-89%)**: Generally safe but review recommended
|
||||
- **Low (<70%)**: Manual review strongly recommended
|
||||
|
||||
Requires N8N_API_URL and N8N_API_KEY environment variables to be configured.`,
|
||||
parameters: {
|
||||
id: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
description: 'The workflow ID to fix in your n8n instance'
|
||||
},
|
||||
applyFixes: {
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
description: 'Whether to apply fixes to the workflow (default: false - preview mode). When false, returns proposed fixes without modifying the workflow.'
|
||||
},
|
||||
fixTypes: {
|
||||
type: 'array',
|
||||
required: false,
|
||||
description: 'Types of fixes to apply. Options: ["expression-format", "typeversion-correction", "error-output-config", "node-type-correction", "webhook-missing-path", "typeversion-upgrade", "version-migration"]. Default: all types. NEW: "typeversion-upgrade" for smart version upgrades, "version-migration" for complex migration guidance.'
|
||||
},
|
||||
confidenceThreshold: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
description: 'Minimum confidence level for fixes: "high" (≥90%), "medium" (≥70%), "low" (any). Default: "medium".'
|
||||
},
|
||||
maxFixes: {
|
||||
type: 'number',
|
||||
required: false,
|
||||
description: 'Maximum number of fixes to apply (default: 50). Useful for limiting scope of changes.'
|
||||
}
|
||||
},
|
||||
returns: `AutoFixResult object containing:
|
||||
- operations: Array of diff operations that will be/were applied
|
||||
- fixes: Detailed list of individual fixes with before/after values
|
||||
- summary: Human-readable summary of fixes
|
||||
- stats: Statistics by fix type and confidence level
|
||||
- applied: Boolean indicating if fixes were applied (when applyFixes: true)
|
||||
- postUpdateGuidance: (NEW) Array of AI-friendly migration guidance for version upgrades, including:
|
||||
* Required actions by priority (CRITICAL, HIGH, MEDIUM, LOW)
|
||||
* Deprecated properties to remove
|
||||
* Behavior changes and their impact
|
||||
* Step-by-step migration instructions
|
||||
* Estimated time for manual changes`,
|
||||
examples: [
|
||||
'n8n_autofix_workflow({id: "wf_abc123"}) - Preview all possible fixes including version upgrades',
|
||||
'n8n_autofix_workflow({id: "wf_abc123", applyFixes: true}) - Apply all medium+ confidence fixes',
|
||||
'n8n_autofix_workflow({id: "wf_abc123", applyFixes: true, confidenceThreshold: "high"}) - Only apply high-confidence fixes',
|
||||
'n8n_autofix_workflow({id: "wf_abc123", fixTypes: ["expression-format"]}) - Only fix expression format issues',
|
||||
'n8n_autofix_workflow({id: "wf_abc123", fixTypes: ["webhook-missing-path"]}) - Only fix webhook path issues',
|
||||
'n8n_autofix_workflow({id: "wf_abc123", fixTypes: ["typeversion-upgrade"]}) - NEW: Only upgrade node versions with smart migrations',
|
||||
'n8n_autofix_workflow({id: "wf_abc123", fixTypes: ["typeversion-upgrade", "version-migration"]}) - NEW: Upgrade versions and provide migration guidance',
|
||||
'n8n_autofix_workflow({id: "wf_abc123", applyFixes: true, maxFixes: 10}) - Apply up to 10 fixes'
|
||||
],
|
||||
useCases: [
|
||||
'Fixing workflows imported from older n8n versions',
|
||||
'Correcting expression syntax after manual edits',
|
||||
'Resolving typeVersion conflicts after n8n upgrades',
|
||||
'Cleaning up workflows before production deployment',
|
||||
'Batch fixing common issues across multiple workflows',
|
||||
'Migrating workflows between n8n instances with different versions',
|
||||
'Repairing webhook nodes that lost their path configuration',
|
||||
'Upgrading Execute Workflow nodes from v1.0 to v1.1+ with automatic inputFieldMapping',
|
||||
'Modernizing webhook nodes to v2.1+ with stable webhookId fields',
|
||||
'Proactively keeping workflows up-to-date with latest node versions',
|
||||
'Getting detailed migration guidance for complex breaking changes'
|
||||
],
|
||||
performance: 'Depends on workflow size and number of issues. Preview mode: 200-500ms. Apply mode: 500-1500ms for medium workflows with version upgrades. Node similarity matching and version metadata are cached for 5 minutes for improved performance on repeated validations.',
|
||||
bestPractices: [
|
||||
'Always preview fixes first (applyFixes: false) before applying',
|
||||
'Start with high confidence threshold for production workflows',
|
||||
'Review the fix summary to understand what changed',
|
||||
'Test workflows after auto-fixing to ensure expected behavior',
|
||||
'Use fixTypes parameter to target specific issue categories',
|
||||
'Keep maxFixes reasonable to avoid too many changes at once',
|
||||
'NEW: Review postUpdateGuidance for version upgrades - contains step-by-step migration instructions',
|
||||
'NEW: Test workflows after version upgrades - behavior may change even with successful auto-migration',
|
||||
'NEW: Apply version upgrades incrementally - start with high-confidence, non-breaking upgrades'
|
||||
],
|
||||
pitfalls: [
|
||||
'Some fixes may change workflow behavior - always test after fixing',
|
||||
'Low confidence fixes might not be the intended solution',
|
||||
'Expression format fixes assume standard n8n syntax requirements',
|
||||
'Node type corrections only work for known node types in the database',
|
||||
'Cannot fix structural issues like missing nodes or invalid connections',
|
||||
'TypeVersion downgrades might remove node features added in newer versions',
|
||||
'Generated webhook paths are new UUIDs - existing webhook URLs will change',
|
||||
'NEW: Version upgrades may introduce breaking changes - review postUpdateGuidance carefully',
|
||||
'NEW: Auto-migrated properties use sensible defaults which may not match your use case',
|
||||
'NEW: Execute Workflow v1.1+ requires explicit inputFieldMapping - automatic mapping uses empty array',
|
||||
'NEW: Some breaking changes cannot be auto-migrated and require manual intervention',
|
||||
'NEW: Version history is based on registry - unknown nodes cannot be upgraded'
|
||||
],
|
||||
relatedTools: [
|
||||
'n8n_validate_workflow',
|
||||
'validate_workflow',
|
||||
'validate_node',
|
||||
'n8n_update_partial_workflow'
|
||||
]
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=n8n-autofix-workflow.js.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-autofix-workflow.js.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-autofix-workflow.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-autofix-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-autofix-workflow.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAAsB;IACtD,IAAI,EAAE,sBAAsB;IAC5B,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW,EAAE,kJAAkJ;QAC/J,aAAa,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC;QACnC,OAAO,EAAE,4DAA4D;QACrE,WAAW,EAAE,4GAA4G;QACzH,IAAI,EAAE;YACJ,0DAA0D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GAAsG;YACtG,+FAA+F;SAChG;QACD,QAAQ,EAAE;YACR,oEAAoE;YACpE,yDAAyD;YACzD,iEAAiE;YACjE,sEAAsE;YACtE,wEAAwE;YACxE,2EAA2E;YAC3E,2EAA2E;YAC3E,4FAA4F;YAC5F,uFAAuF;YACvF,sGAAsG;YACtG,oFAAoF;YACpF,8EAA8E;SAC/E;QACD,YAAY,EAAE;YACZ,uBAAuB;YACvB,mBAAmB;YACnB,eAAe;YACf,6BAA6B;SAC9B;KACF;CACF,CAAC"}
|
||||
3
dist/mcp/tool-docs/workflow_management/n8n-create-workflow.d.ts
vendored
Normal file
3
dist/mcp/tool-docs/workflow_management/n8n-create-workflow.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { ToolDocumentation } from '../types';
|
||||
export declare const n8nCreateWorkflowDoc: ToolDocumentation;
|
||||
//# sourceMappingURL=n8n-create-workflow.d.ts.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-create-workflow.d.ts.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-create-workflow.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-create-workflow.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-create-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,oBAAoB,EAAE,iBAiGlC,CAAC"}
|
||||
102
dist/mcp/tool-docs/workflow_management/n8n-create-workflow.js
vendored
Normal file
102
dist/mcp/tool-docs/workflow_management/n8n-create-workflow.js
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.n8nCreateWorkflowDoc = void 0;
|
||||
exports.n8nCreateWorkflowDoc = {
|
||||
name: 'n8n_create_workflow',
|
||||
category: 'workflow_management',
|
||||
essentials: {
|
||||
description: 'Create workflow. Requires: name, nodes[], connections{}. Created inactive. Returns workflow with ID.',
|
||||
keyParameters: ['name', 'nodes', 'connections'],
|
||||
example: 'n8n_create_workflow({name: "My Flow", nodes: [...], connections: {...}})',
|
||||
performance: 'Network-dependent',
|
||||
tips: [
|
||||
'Workflow created inactive',
|
||||
'Returns ID for future updates',
|
||||
'Validate first with validate_workflow',
|
||||
'Auto-sanitization fixes operator structures and missing metadata during creation'
|
||||
]
|
||||
},
|
||||
full: {
|
||||
description: 'Creates a new workflow in n8n with specified nodes and connections. Workflow is created in inactive state. Each node requires: id, name, type, typeVersion, position, and parameters.',
|
||||
parameters: {
|
||||
name: { type: 'string', required: true, description: 'Workflow name' },
|
||||
nodes: { type: 'array', required: true, description: 'Array of nodes with id, name, type, typeVersion, position, parameters' },
|
||||
connections: { type: 'object', required: true, description: 'Node connections. Keys are source node IDs' },
|
||||
settings: { type: 'object', description: 'Optional workflow settings (timezone, error handling, etc.)' }
|
||||
},
|
||||
returns: 'Created workflow object with id, name, nodes, connections, active status',
|
||||
examples: [
|
||||
`// Basic webhook to Slack workflow
|
||||
n8n_create_workflow({
|
||||
name: "Webhook to Slack",
|
||||
nodes: [
|
||||
{
|
||||
id: "webhook_1",
|
||||
name: "Webhook",
|
||||
type: "n8n-nodes-base.webhook",
|
||||
typeVersion: 1,
|
||||
position: [250, 300],
|
||||
parameters: {
|
||||
httpMethod: "POST",
|
||||
path: "slack-notify"
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "slack_1",
|
||||
name: "Slack",
|
||||
type: "n8n-nodes-base.slack",
|
||||
typeVersion: 1,
|
||||
position: [450, 300],
|
||||
parameters: {
|
||||
resource: "message",
|
||||
operation: "post",
|
||||
channel: "#general",
|
||||
text: "={{$json.message}}"
|
||||
}
|
||||
}
|
||||
],
|
||||
connections: {
|
||||
"webhook_1": {
|
||||
"main": [[{node: "slack_1", type: "main", index: 0}]]
|
||||
}
|
||||
}
|
||||
})`,
|
||||
`// Workflow with settings and error handling
|
||||
n8n_create_workflow({
|
||||
name: "Data Processing",
|
||||
nodes: [...],
|
||||
connections: {...},
|
||||
settings: {
|
||||
timezone: "America/New_York",
|
||||
errorWorkflow: "error_handler_workflow_id",
|
||||
saveDataSuccessExecution: "all",
|
||||
saveDataErrorExecution: "all"
|
||||
}
|
||||
})`
|
||||
],
|
||||
useCases: [
|
||||
'Deploy validated workflows',
|
||||
'Automate workflow creation',
|
||||
'Clone workflow structures',
|
||||
'Template deployment'
|
||||
],
|
||||
performance: 'Network-dependent - Typically 100-500ms depending on workflow size',
|
||||
bestPractices: [
|
||||
'Validate with validate_workflow first',
|
||||
'Use unique node IDs',
|
||||
'Position nodes for readability',
|
||||
'Test with n8n_test_workflow'
|
||||
],
|
||||
pitfalls: [
|
||||
'**REQUIRES N8N_API_URL and N8N_API_KEY environment variables** - tool unavailable without n8n API access',
|
||||
'Workflows created in INACTIVE state - must activate separately',
|
||||
'Node IDs must be unique within workflow',
|
||||
'Credentials must be configured separately in n8n',
|
||||
'Node type names must include package prefix (e.g., "n8n-nodes-base.slack")',
|
||||
'**Auto-sanitization runs on creation**: All nodes sanitized before workflow created (operator structures fixed, missing metadata added)',
|
||||
'**Auto-sanitization cannot prevent all failures**: Broken connections or invalid node configurations may still cause creation to fail'
|
||||
],
|
||||
relatedTools: ['validate_workflow', 'n8n_update_partial_workflow', 'n8n_test_workflow']
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=n8n-create-workflow.js.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-create-workflow.js.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-create-workflow.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-create-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-create-workflow.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAsB;IACrD,IAAI,EAAE,qBAAqB;IAC3B,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW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flow.d.ts
vendored
Normal file
3
dist/mcp/tool-docs/workflow_management/n8n-delete-workflow.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { ToolDocumentation } from '../types';
|
||||
export declare const n8nDeleteWorkflowDoc: ToolDocumentation;
|
||||
//# sourceMappingURL=n8n-delete-workflow.d.ts.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-delete-workflow.d.ts.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-delete-workflow.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-delete-workflow.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-delete-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,oBAAoB,EAAE,iBA+ClC,CAAC"}
|
||||
52
dist/mcp/tool-docs/workflow_management/n8n-delete-workflow.js
vendored
Normal file
52
dist/mcp/tool-docs/workflow_management/n8n-delete-workflow.js
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.n8nDeleteWorkflowDoc = void 0;
|
||||
exports.n8nDeleteWorkflowDoc = {
|
||||
name: 'n8n_delete_workflow',
|
||||
category: 'workflow_management',
|
||||
essentials: {
|
||||
description: 'Permanently delete a workflow. This action cannot be undone.',
|
||||
keyParameters: ['id'],
|
||||
example: 'n8n_delete_workflow({id: "workflow_123"})',
|
||||
performance: 'Fast (50-150ms)',
|
||||
tips: [
|
||||
'Action is irreversible',
|
||||
'Deletes all execution history',
|
||||
'Check workflow first with n8n_get_workflow({mode: "minimal"})'
|
||||
]
|
||||
},
|
||||
full: {
|
||||
description: 'Permanently deletes a workflow from n8n including all associated data, execution history, and settings. This is an irreversible operation that should be used with caution. The workflow must exist and the user must have appropriate permissions.',
|
||||
parameters: {
|
||||
id: { type: 'string', required: true, description: 'Workflow ID to delete permanently' }
|
||||
},
|
||||
returns: 'Success confirmation or error if workflow not found/cannot be deleted',
|
||||
examples: [
|
||||
'n8n_delete_workflow({id: "abc123"}) - Delete specific workflow',
|
||||
'if (confirm) { n8n_delete_workflow({id: wf.id}); } // With confirmation'
|
||||
],
|
||||
useCases: [
|
||||
'Remove obsolete workflows',
|
||||
'Clean up test workflows',
|
||||
'Delete failed experiments',
|
||||
'Manage workflow limits',
|
||||
'Remove duplicates'
|
||||
],
|
||||
performance: 'Fast operation - typically 50-150ms. May take longer if workflow has extensive execution history.',
|
||||
bestPractices: [
|
||||
'Always confirm before deletion',
|
||||
'Check workflow with n8n_get_workflow({mode: "minimal"}) first',
|
||||
'Consider deactivating instead of deleting',
|
||||
'Export workflow before deletion for backup'
|
||||
],
|
||||
pitfalls: [
|
||||
'Requires N8N_API_URL and N8N_API_KEY configured',
|
||||
'Cannot be undone - permanent deletion',
|
||||
'Deletes all execution history',
|
||||
'Active workflows can be deleted',
|
||||
'No built-in confirmation'
|
||||
],
|
||||
relatedTools: ['n8n_get_workflow', 'n8n_list_workflows', 'n8n_update_partial_workflow', 'n8n_executions']
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=n8n-delete-workflow.js.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-delete-workflow.js.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-delete-workflow.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-delete-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-delete-workflow.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAsB;IACrD,IAAI,EAAE,qBAAqB;IAC3B,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW,EAAE,8DAA8D;QAC3E,aAAa,EAAE,CAAC,IAAI,CAAC;QACrB,OAAO,EAAE,2CAA2C;QACpD,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE;YACJ,wBAAwB;YACxB,+BAA+B;YAC/B,+DAA+D;SAChE;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,qPAAqP;QAClQ,UAAU,EAAE;YACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,mCAAmC,EAAE;SACzF;QACD,OAAO,EAAE,uEAAuE;QAChF,QAAQ,EAAE;YACR,gEAAgE;YAChE,yEAAyE;SAC1E;QACD,QAAQ,EAAE;YACR,2BAA2B;YAC3B,yBAAyB;YACzB,2BAA2B;YAC3B,wBAAwB;YACxB,mBAAmB;SACpB;QACD,WAAW,EAAE,mGAAmG;QAChH,aAAa,EAAE;YACb,gCAAgC;YAChC,+DAA+D;YAC/D,2CAA2C;YAC3C,4CAA4C;SAC7C;QACD,QAAQ,EAAE;YACR,iDAAiD;YACjD,uCAAuC;YACvC,+BAA+B;YAC/B,iCAAiC;YACjC,0BAA0B;SAC3B;QACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,gBAAgB,CAAC;KAC1G;CACF,CAAC"}
|
||||
3
dist/mcp/tool-docs/workflow_management/n8n-deploy-template.d.ts
vendored
Normal file
3
dist/mcp/tool-docs/workflow_management/n8n-deploy-template.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { ToolDocumentation } from '../types';
|
||||
export declare const n8nDeployTemplateDoc: ToolDocumentation;
|
||||
//# sourceMappingURL=n8n-deploy-template.d.ts.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-deploy-template.d.ts.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-deploy-template.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-deploy-template.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-deploy-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,oBAAoB,EAAE,iBAoElC,CAAC"}
|
||||
73
dist/mcp/tool-docs/workflow_management/n8n-deploy-template.js
vendored
Normal file
73
dist/mcp/tool-docs/workflow_management/n8n-deploy-template.js
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.n8nDeployTemplateDoc = void 0;
|
||||
exports.n8nDeployTemplateDoc = {
|
||||
name: 'n8n_deploy_template',
|
||||
category: 'workflow_management',
|
||||
essentials: {
|
||||
description: 'Deploy a workflow template from n8n.io directly to your n8n instance. Deploys first, then auto-fixes common issues (expression format, typeVersions).',
|
||||
keyParameters: ['templateId', 'name', 'autoUpgradeVersions', 'autoFix', 'stripCredentials'],
|
||||
example: 'n8n_deploy_template({templateId: 2776, name: "My Deployed Template"})',
|
||||
performance: 'Network-dependent',
|
||||
tips: [
|
||||
'Auto-fixes expression format issues after deployment',
|
||||
'Workflow created inactive - configure credentials in n8n UI first',
|
||||
'Returns list of required credentials and fixes applied',
|
||||
'Use search_templates to find template IDs'
|
||||
]
|
||||
},
|
||||
full: {
|
||||
description: 'Deploys a workflow template from n8n.io directly to your n8n instance. This tool deploys first, then automatically fixes common issues like missing expression prefixes (=) and outdated typeVersions. Templates are stored locally and fetched from the database. The workflow is always created in an inactive state, allowing you to configure credentials before activation.',
|
||||
parameters: {
|
||||
templateId: { type: 'number', required: true, description: 'Template ID from n8n.io (find via search_templates)' },
|
||||
name: { type: 'string', description: 'Custom workflow name (default: template name)' },
|
||||
autoUpgradeVersions: { type: 'boolean', description: 'Upgrade node typeVersions to latest supported (default: true)' },
|
||||
autoFix: { type: 'boolean', description: 'Auto-apply fixes after deployment for expression format issues, missing = prefix, etc. (default: true)' },
|
||||
stripCredentials: { type: 'boolean', description: 'Remove credential references - user configures in n8n UI (default: true)' }
|
||||
},
|
||||
returns: 'Object with workflowId, name, nodeCount, triggerType, requiredCredentials array, url, templateId, templateUrl, autoFixStatus (success/failed/skipped), and fixesApplied array',
|
||||
examples: [
|
||||
`// Deploy template with default settings (auto-fix enabled)
|
||||
n8n_deploy_template({templateId: 2776})`,
|
||||
`// Deploy with custom name
|
||||
n8n_deploy_template({
|
||||
templateId: 2776,
|
||||
name: "My Google Drive to Airtable Sync"
|
||||
})`,
|
||||
`// Deploy without auto-fix (not recommended)
|
||||
n8n_deploy_template({
|
||||
templateId: 2776,
|
||||
autoFix: false
|
||||
})`,
|
||||
`// Keep original node versions (useful for compatibility)
|
||||
n8n_deploy_template({
|
||||
templateId: 2776,
|
||||
autoUpgradeVersions: false
|
||||
})`
|
||||
],
|
||||
useCases: [
|
||||
'Quickly deploy pre-built workflow templates',
|
||||
'Set up common automation patterns',
|
||||
'Bootstrap new projects with proven workflows',
|
||||
'Deploy templates found via search_templates'
|
||||
],
|
||||
performance: 'Network-dependent - Typically 300-800ms (template fetch + workflow creation + autofix)',
|
||||
bestPractices: [
|
||||
'Use search_templates to find templates by use case',
|
||||
'Review required credentials in the response',
|
||||
'Check autoFixStatus in response - "success", "failed", or "skipped"',
|
||||
'Check fixesApplied in response to see what was automatically corrected',
|
||||
'Configure credentials in n8n UI before activating',
|
||||
'Test workflow before connecting to production systems'
|
||||
],
|
||||
pitfalls: [
|
||||
'**REQUIRES N8N_API_URL and N8N_API_KEY environment variables** - tool unavailable without n8n API access',
|
||||
'Workflows created in INACTIVE state - must configure credentials and activate in n8n',
|
||||
'Templates may reference services you do not have (Slack, Google, etc.)',
|
||||
'Template database must be populated - run npm run fetch:templates if templates not found',
|
||||
'Some issues may not be auto-fixable (e.g., missing required fields that need user input)'
|
||||
],
|
||||
relatedTools: ['search_templates', 'get_template', 'n8n_create_workflow', 'n8n_autofix_workflow']
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=n8n-deploy-template.js.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-deploy-template.js.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-deploy-template.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-deploy-template.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-deploy-template.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAsB;IACrD,IAAI,EAAE,qBAAqB;IAC3B,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW,EAAE,uJAAuJ;QACpK,aAAa,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,qBAAqB,EAAE,SAAS,EAAE,kBAAkB,CAAC;QAC3F,OAAO,EAAE,uEAAuE;QAChF,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE;YACJ,sDAAsD;YACtD,mEAAmE;YACnE,wDAAwD;YACxD,2CAA2C;SAC5C;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,kXAAkX;QAC/X,UAAU,EAAE;YACV,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,qDAAqD,EAAE;YAClH,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,+CAA+C,EAAE;YACtF,mBAAmB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,+DAA+D,EAAE;YACtH,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,wGAAwG,EAAE;YACnJ,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,0EAA0E,EAAE;SAC/H;QACD,OAAO,EAAE,+KAA+K;QACxL,QAAQ,EAAE;YACR;wCACkC;YAClC;;;;GAIH;YACG;;;;GAIH;YACG;;;;GAIH;SACE;QACD,QAAQ,EAAE;YACR,6CAA6C;YAC7C,mCAAmC;YACnC,8CAA8C;YAC9C,6CAA6C;SAC9C;QACD,WAAW,EAAE,wFAAwF;QACrG,aAAa,EAAE;YACb,oDAAoD;YACpD,6CAA6C;YAC7C,qEAAqE;YACrE,wEAAwE;YACxE,mDAAmD;YACnD,uDAAuD;SACxD;QACD,QAAQ,EAAE;YACR,0GAA0G;YAC1G,sFAAsF;YACtF,wEAAwE;YACxE,0FAA0F;YAC1F,0FAA0F;SAC3F;QACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,cAAc,EAAE,qBAAqB,EAAE,sBAAsB,CAAC;KAClG;CACF,CAAC"}
|
||||
3
dist/mcp/tool-docs/workflow_management/n8n-executions.d.ts
vendored
Normal file
3
dist/mcp/tool-docs/workflow_management/n8n-executions.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { ToolDocumentation } from '../types';
|
||||
export declare const n8nExecutionsDoc: ToolDocumentation;
|
||||
//# sourceMappingURL=n8n-executions.d.ts.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-executions.d.ts.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-executions.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-executions.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-executions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,gBAAgB,EAAE,iBA+E9B,CAAC"}
|
||||
84
dist/mcp/tool-docs/workflow_management/n8n-executions.js
vendored
Normal file
84
dist/mcp/tool-docs/workflow_management/n8n-executions.js
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.n8nExecutionsDoc = void 0;
|
||||
exports.n8nExecutionsDoc = {
|
||||
name: 'n8n_executions',
|
||||
category: 'workflow_management',
|
||||
essentials: {
|
||||
description: 'Manage workflow executions: get details, list, or delete. Unified tool for all execution operations.',
|
||||
keyParameters: ['action', 'id', 'workflowId', 'status'],
|
||||
example: 'n8n_executions({action: "list", workflowId: "abc123", status: "error"})',
|
||||
performance: 'Fast (50-200ms)',
|
||||
tips: [
|
||||
'action="get": Get execution details by ID',
|
||||
'action="list": List executions with filters',
|
||||
'action="delete": Delete execution record',
|
||||
'Use mode parameter for action=get to control detail level'
|
||||
]
|
||||
},
|
||||
full: {
|
||||
description: `**Actions:**
|
||||
- get: Retrieve execution details by ID with configurable detail level
|
||||
- list: List executions with filtering and pagination
|
||||
- delete: Remove an execution record from history
|
||||
|
||||
**Detail Modes for action="get":**
|
||||
- preview: Structure only, no data
|
||||
- summary: 2 items per node (default)
|
||||
- filtered: Custom items limit, optionally filter by node names
|
||||
- full: All execution data (can be very large)`,
|
||||
parameters: {
|
||||
action: { type: 'string', required: true, description: 'Operation: "get", "list", or "delete"' },
|
||||
id: { type: 'string', required: false, description: 'Execution ID (required for action=get or action=delete)' },
|
||||
mode: { type: 'string', required: false, description: 'For action=get: "preview", "summary" (default), "filtered", "full"' },
|
||||
nodeNames: { type: 'array', required: false, description: 'For action=get with mode=filtered: Filter to specific nodes by name' },
|
||||
itemsLimit: { type: 'number', required: false, description: 'For action=get with mode=filtered: Items per node (0=structure, 2=default, -1=unlimited)' },
|
||||
includeInputData: { type: 'boolean', required: false, description: 'For action=get: Include input data in addition to output (default: false)' },
|
||||
workflowId: { type: 'string', required: false, description: 'For action=list: Filter by workflow ID' },
|
||||
status: { type: 'string', required: false, description: 'For action=list: Filter by status ("success", "error", "waiting")' },
|
||||
limit: { type: 'number', required: false, description: 'For action=list: Number of results (1-100, default: 100)' },
|
||||
cursor: { type: 'string', required: false, description: 'For action=list: Pagination cursor from previous response' },
|
||||
projectId: { type: 'string', required: false, description: 'For action=list: Filter by project ID (enterprise)' },
|
||||
includeData: { type: 'boolean', required: false, description: 'For action=list: Include execution data (default: false)' }
|
||||
},
|
||||
returns: `Depends on action:
|
||||
- get: Execution object with data based on mode
|
||||
- list: { data: [...executions], nextCursor?: string }
|
||||
- delete: { success: boolean, message: string }`,
|
||||
examples: [
|
||||
'// List recent executions for a workflow\nn8n_executions({action: "list", workflowId: "abc123", limit: 10})',
|
||||
'// List failed executions\nn8n_executions({action: "list", status: "error"})',
|
||||
'// Get execution summary\nn8n_executions({action: "get", id: "exec_456"})',
|
||||
'// Get full execution data\nn8n_executions({action: "get", id: "exec_456", mode: "full"})',
|
||||
'// Get specific nodes from execution\nn8n_executions({action: "get", id: "exec_456", mode: "filtered", nodeNames: ["HTTP Request", "Slack"]})',
|
||||
'// Delete an execution\nn8n_executions({action: "delete", id: "exec_456"})'
|
||||
],
|
||||
useCases: [
|
||||
'Debug workflow failures (get with mode=full)',
|
||||
'Monitor workflow health (list with status filter)',
|
||||
'Audit execution history',
|
||||
'Clean up old execution records',
|
||||
'Analyze specific node outputs'
|
||||
],
|
||||
performance: `Response times:
|
||||
- list: 50-150ms depending on filters
|
||||
- get (preview/summary): 30-100ms
|
||||
- get (full): 100-500ms+ depending on data size
|
||||
- delete: 30-80ms`,
|
||||
bestPractices: [
|
||||
'Use mode="summary" (default) for debugging - shows enough data',
|
||||
'Use mode="filtered" with nodeNames for large workflows',
|
||||
'Filter by workflowId when listing to reduce results',
|
||||
'Use cursor for pagination through large result sets',
|
||||
'Delete old executions to save storage'
|
||||
],
|
||||
pitfalls: [
|
||||
'Requires N8N_API_URL and N8N_API_KEY configured',
|
||||
'mode="full" can return very large responses for complex workflows',
|
||||
'Execution must exist or returns 404',
|
||||
'Delete is permanent - cannot undo'
|
||||
],
|
||||
relatedTools: ['n8n_get_workflow', 'n8n_test_workflow', 'n8n_validate_workflow']
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=n8n-executions.js.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-executions.js.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-executions.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-executions.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-executions.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,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AE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,0DAA0D,EAAE;YACnH,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,2DAA2D,EAAE;YACrH,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,oDAAoD,EAAE;YACjH,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,0DAA0D,EAAE;SAC3H;QACD,OAAO,EAAE;;;gDAGmC;QAC5C,QAAQ,EAAE;YACR,6GAA6G;YAC7G,8EAA8E;YAC9E,2EAA2E;YAC3E,2FAA2F;YAC3F,+IAA+I;YAC/I,4EAA4E;SAC7E;QACD,QAAQ,EAAE;YACR,8CAA8C;YAC9C,mDAAmD;YACnD,yBAAyB;YACzB,gCAAgC;YAChC,+BAA+B;SAChC;QACD,WAAW,EAAE;;;;kBAIC;QACd,aAAa,EAAE;YACb,gEAAgE;YAChE,wDAAwD;YACxD,qDAAqD;YACrD,qDAAqD;YACrD,uCAAuC;SACxC;QACD,QAAQ,EAAE;YACR,iDAAiD;YACjD,mEAAmE;YACnE,qCAAqC;YACrC,mCAAmC;SACpC;QACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,uBAAuB,CAAC;KACjF;CACF,CAAC"}
|
||||
3
dist/mcp/tool-docs/workflow_management/n8n-get-workflow.d.ts
vendored
Normal file
3
dist/mcp/tool-docs/workflow_management/n8n-get-workflow.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { ToolDocumentation } from '../types';
|
||||
export declare const n8nGetWorkflowDoc: ToolDocumentation;
|
||||
//# sourceMappingURL=n8n-get-workflow.d.ts.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-get-workflow.d.ts.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-get-workflow.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-get-workflow.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-get-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,iBAAiB,EAAE,iBA+D/B,CAAC"}
|
||||
68
dist/mcp/tool-docs/workflow_management/n8n-get-workflow.js
vendored
Normal file
68
dist/mcp/tool-docs/workflow_management/n8n-get-workflow.js
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.n8nGetWorkflowDoc = void 0;
|
||||
exports.n8nGetWorkflowDoc = {
|
||||
name: 'n8n_get_workflow',
|
||||
category: 'workflow_management',
|
||||
essentials: {
|
||||
description: 'Get workflow by ID with different detail levels. Use mode to control response size and content.',
|
||||
keyParameters: ['id', 'mode'],
|
||||
example: 'n8n_get_workflow({id: "workflow_123", mode: "structure"})',
|
||||
performance: 'Fast (50-200ms)',
|
||||
tips: [
|
||||
'mode="full" (default): Complete workflow with all data',
|
||||
'mode="details": Full workflow + execution stats',
|
||||
'mode="structure": Just nodes and connections (topology)',
|
||||
'mode="minimal": Only id, name, active status, tags'
|
||||
]
|
||||
},
|
||||
full: {
|
||||
description: `**Modes:**
|
||||
- full (default): Complete workflow including all nodes with parameters, connections, and settings
|
||||
- details: Full workflow plus execution statistics (success/error counts, last execution time)
|
||||
- structure: Nodes and connections only - useful for topology analysis
|
||||
- minimal: Just id, name, active status, and tags - fastest response`,
|
||||
parameters: {
|
||||
id: { type: 'string', required: true, description: 'Workflow ID to retrieve' },
|
||||
mode: { type: 'string', required: false, description: 'Detail level: "full" (default), "details", "structure", "minimal"' }
|
||||
},
|
||||
returns: `Depends on mode:
|
||||
- full: Complete workflow object (id, name, active, nodes[], connections{}, settings, createdAt, updatedAt)
|
||||
- details: Full workflow + executionStats (successCount, errorCount, lastExecution, etc.)
|
||||
- structure: { nodes: [...], connections: {...} } - topology only
|
||||
- minimal: { id, name, active, tags, createdAt, updatedAt }`,
|
||||
examples: [
|
||||
'// Get complete workflow (default)\nn8n_get_workflow({id: "abc123"})',
|
||||
'// Get workflow with execution stats\nn8n_get_workflow({id: "abc123", mode: "details"})',
|
||||
'// Get just the topology\nn8n_get_workflow({id: "abc123", mode: "structure"})',
|
||||
'// Quick metadata check\nn8n_get_workflow({id: "abc123", mode: "minimal"})'
|
||||
],
|
||||
useCases: [
|
||||
'View and edit workflow (mode=full)',
|
||||
'Analyze workflow performance (mode=details)',
|
||||
'Clone or compare workflow structure (mode=structure)',
|
||||
'List workflows with status (mode=minimal)',
|
||||
'Debug workflow issues'
|
||||
],
|
||||
performance: `Response times vary by mode:
|
||||
- minimal: ~20-50ms (smallest response)
|
||||
- structure: ~30-80ms (nodes + connections only)
|
||||
- full: ~50-200ms (complete workflow)
|
||||
- details: ~100-300ms (includes execution queries)`,
|
||||
bestPractices: [
|
||||
'Use mode="minimal" when listing or checking status',
|
||||
'Use mode="structure" for workflow analysis or cloning',
|
||||
'Use mode="full" (default) when editing',
|
||||
'Use mode="details" for debugging execution issues',
|
||||
'Validate workflow after retrieval if planning modifications'
|
||||
],
|
||||
pitfalls: [
|
||||
'Requires N8N_API_URL and N8N_API_KEY configured',
|
||||
'mode="details" adds database queries for execution stats',
|
||||
'Workflow must exist or returns 404 error',
|
||||
'Credentials are referenced by ID but values not included'
|
||||
],
|
||||
relatedTools: ['n8n_list_workflows', 'n8n_update_full_workflow', 'n8n_update_partial_workflow', 'n8n_validate_workflow']
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=n8n-get-workflow.js.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-get-workflow.js.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-get-workflow.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-get-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-get-workflow.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAsB;IAClD,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW,EAAE,iGAAiG;QAC9G,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC;QAC7B,OAAO,EAAE,2DAA2D;QACpE,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE;YACJ,wDAAwD;YACxD,iDAAiD;YACjD,yDAAyD;YACzD,oDAAoD;SACrD;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;qEAIoD;QACjE,UAAU,EAAE;YACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,yBAAyB,EAAE;YAC9E,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,mEAAmE,EAAE;SAC5H;QACD,OAAO,EAAE;;;;4DAI+C;QACxD,QAAQ,EAAE;YACR,sEAAsE;YACtE,yFAAyF;YACzF,+EAA+E;YAC/E,4EAA4E;SAC7E;QACD,QAAQ,EAAE;YACR,oCAAoC;YACpC,6CAA6C;YAC7C,sDAAsD;YACtD,2CAA2C;YAC3C,uBAAuB;SACxB;QACD,WAAW,EAAE;;;;mDAIkC;QAC/C,aAAa,EAAE;YACb,oDAAoD;YACpD,uDAAuD;YACvD,wCAAwC;YACxC,mDAAmD;YACnD,6DAA6D;SAC9D;QACD,QAAQ,EAAE;YACR,iDAAiD;YACjD,0DAA0D;YAC1D,0CAA0C;YAC1C,0DAA0D;SAC3D;QACD,YAAY,EAAE,CAAC,oBAAoB,EAAE,0BAA0B,EAAE,6BAA6B,EAAE,uBAAuB,CAAC;KACzH;CACF,CAAC"}
|
||||
3
dist/mcp/tool-docs/workflow_management/n8n-list-workflows.d.ts
vendored
Normal file
3
dist/mcp/tool-docs/workflow_management/n8n-list-workflows.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { ToolDocumentation } from '../types';
|
||||
export declare const n8nListWorkflowsDoc: ToolDocumentation;
|
||||
//# sourceMappingURL=n8n-list-workflows.d.ts.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-list-workflows.d.ts.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-list-workflows.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-list-workflows.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-list-workflows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,mBAAmB,EAAE,iBAoDjC,CAAC"}
|
||||
57
dist/mcp/tool-docs/workflow_management/n8n-list-workflows.js
vendored
Normal file
57
dist/mcp/tool-docs/workflow_management/n8n-list-workflows.js
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.n8nListWorkflowsDoc = void 0;
|
||||
exports.n8nListWorkflowsDoc = {
|
||||
name: 'n8n_list_workflows',
|
||||
category: 'workflow_management',
|
||||
essentials: {
|
||||
description: 'List workflows (minimal metadata only - no nodes/connections). Supports pagination via cursor.',
|
||||
keyParameters: ['limit', 'active', 'tags'],
|
||||
example: 'n8n_list_workflows({limit: 20, active: true})',
|
||||
performance: 'Fast (100-300ms)',
|
||||
tips: [
|
||||
'Use cursor for pagination',
|
||||
'Filter by active status',
|
||||
'Tag filtering for organization'
|
||||
]
|
||||
},
|
||||
full: {
|
||||
description: 'Lists workflows from n8n with powerful filtering options. Returns ONLY minimal metadata (id, name, active, dates, tags, nodeCount) - no workflow structure, nodes, or connections. Use n8n_get_workflow to fetch full workflow details.',
|
||||
parameters: {
|
||||
limit: { type: 'number', description: 'Number of workflows to return (1-100, default: 100)' },
|
||||
cursor: { type: 'string', description: 'Pagination cursor from previous response for next page' },
|
||||
active: { type: 'boolean', description: 'Filter by active/inactive status' },
|
||||
tags: { type: 'array', description: 'Filter by exact tag matches (AND logic)' },
|
||||
projectId: { type: 'string', description: 'Filter by project ID (enterprise feature)' },
|
||||
excludePinnedData: { type: 'boolean', description: 'Exclude pinned data from response (default: true)' }
|
||||
},
|
||||
returns: 'Object with: workflows array (minimal fields: id, name, active, createdAt, updatedAt, tags, nodeCount), returned (count in this response), hasMore (boolean), nextCursor (for pagination), and _note (guidance when more data exists)',
|
||||
examples: [
|
||||
'n8n_list_workflows({limit: 20}) - First 20 workflows',
|
||||
'n8n_list_workflows({active: true, tags: ["production"]}) - Active production workflows',
|
||||
'n8n_list_workflows({cursor: "abc123", limit: 50}) - Next page of results'
|
||||
],
|
||||
useCases: [
|
||||
'Build workflow dashboards',
|
||||
'Find workflows by status',
|
||||
'Organize by tags',
|
||||
'Bulk workflow operations',
|
||||
'Generate workflow reports'
|
||||
],
|
||||
performance: 'Very fast - typically 50-200ms. Returns only minimal metadata without workflow structure.',
|
||||
bestPractices: [
|
||||
'Always check hasMore flag to determine if pagination is needed',
|
||||
'Use cursor from previous response to get next page',
|
||||
'The returned count is NOT the total in the system',
|
||||
'Iterate with cursor until hasMore is false for complete list'
|
||||
],
|
||||
pitfalls: [
|
||||
'Requires N8N_API_URL and N8N_API_KEY configured',
|
||||
'Maximum 100 workflows per request',
|
||||
'Server may return fewer than requested limit',
|
||||
'returned field is count of current page only, not system total'
|
||||
],
|
||||
relatedTools: ['n8n_get_workflow', 'n8n_update_partial_workflow', 'n8n_executions']
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=n8n-list-workflows.js.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-list-workflows.js.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-list-workflows.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-list-workflows.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-list-workflows.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAsB;IACpD,IAAI,EAAE,oBAAoB;IAC1B,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW,EAAE,gGAAgG;QAC7G,aAAa,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC;QAC1C,OAAO,EAAE,+CAA+C;QACxD,WAAW,EAAE,kBAAkB;QAC/B,IAAI,EAAE;YACJ,2BAA2B;YAC3B,yBAAyB;YACzB,gCAAgC;SACjC;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,yOAAyO;QACtP,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,qDAAqD,EAAE;YAC7F,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,wDAAwD,EAAE;YACjG,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,kCAAkC,EAAE;YAC5E,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,yCAAyC,EAAE;YAC/E,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2CAA2C,EAAE;YACvF,iBAAiB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,mDAAmD,EAAE;SACzG;QACD,OAAO,EAAE,uOAAuO;QAChP,QAAQ,EAAE;YACR,sDAAsD;YACtD,wFAAwF;YACxF,0EAA0E;SAC3E;QACD,QAAQ,EAAE;YACR,2BAA2B;YAC3B,0BAA0B;YAC1B,kBAAkB;YAClB,0BAA0B;YAC1B,2BAA2B;SAC5B;QACD,WAAW,EAAE,2FAA2F;QACxG,aAAa,EAAE;YACb,gEAAgE;YAChE,oDAAoD;YACpD,mDAAmD;YACnD,8DAA8D;SAC/D;QACD,QAAQ,EAAE;YACR,iDAAiD;YACjD,mCAAmC;YACnC,8CAA8C;YAC9C,gEAAgE;SACjE;QACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,6BAA6B,EAAE,gBAAgB,CAAC;KACpF;CACF,CAAC"}
|
||||
3
dist/mcp/tool-docs/workflow_management/n8n-test-workflow.d.ts
vendored
Normal file
3
dist/mcp/tool-docs/workflow_management/n8n-test-workflow.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { ToolDocumentation } from '../types';
|
||||
export declare const n8nTestWorkflowDoc: ToolDocumentation;
|
||||
//# sourceMappingURL=n8n-test-workflow.d.ts.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-test-workflow.d.ts.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-test-workflow.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-test-workflow.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-test-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,kBAAkB,EAAE,iBAuIhC,CAAC"}
|
||||
140
dist/mcp/tool-docs/workflow_management/n8n-test-workflow.js
vendored
Normal file
140
dist/mcp/tool-docs/workflow_management/n8n-test-workflow.js
vendored
Normal file
@@ -0,0 +1,140 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.n8nTestWorkflowDoc = void 0;
|
||||
exports.n8nTestWorkflowDoc = {
|
||||
name: 'n8n_test_workflow',
|
||||
category: 'workflow_management',
|
||||
essentials: {
|
||||
description: 'Test/trigger workflow execution. Auto-detects trigger type (webhook/form/chat). Only workflows with these triggers can be executed externally.',
|
||||
keyParameters: ['workflowId', 'triggerType', 'data', 'message'],
|
||||
example: 'n8n_test_workflow({workflowId: "123"}) - auto-detect trigger',
|
||||
performance: 'Immediate trigger, response time depends on workflow complexity',
|
||||
tips: [
|
||||
'Auto-detects trigger type from workflow if not specified',
|
||||
'Workflow must have a webhook, form, or chat trigger to be executable',
|
||||
'For chat triggers, message is required',
|
||||
'All trigger types require the workflow to be ACTIVE'
|
||||
]
|
||||
},
|
||||
full: {
|
||||
description: `Test and trigger n8n workflows through HTTP-based methods. This unified tool supports multiple trigger types:
|
||||
|
||||
**Trigger Types:**
|
||||
- **webhook**: HTTP-based triggers (GET/POST/PUT/DELETE)
|
||||
- **form**: Form submission triggers
|
||||
- **chat**: AI chat triggers with conversation support
|
||||
|
||||
**Important:** n8n's public API does not support direct workflow execution. Only workflows with webhook, form, or chat triggers can be executed externally. Workflows with schedule, manual, or other trigger types cannot be triggered via this API.
|
||||
|
||||
The tool auto-detects the appropriate trigger type by analyzing the workflow's trigger node. You can override this with the triggerType parameter.`,
|
||||
parameters: {
|
||||
workflowId: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
description: 'Workflow ID to execute'
|
||||
},
|
||||
triggerType: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
enum: ['webhook', 'form', 'chat'],
|
||||
description: 'Trigger type. Auto-detected if not specified. Workflow must have matching trigger node.'
|
||||
},
|
||||
httpMethod: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
enum: ['GET', 'POST', 'PUT', 'DELETE'],
|
||||
description: 'For webhook: HTTP method (default: from workflow config or POST)'
|
||||
},
|
||||
webhookPath: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
description: 'For webhook: override the webhook path'
|
||||
},
|
||||
message: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
description: 'For chat: message to send (required for chat triggers)'
|
||||
},
|
||||
sessionId: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
description: 'For chat: session ID for conversation continuity'
|
||||
},
|
||||
data: {
|
||||
type: 'object',
|
||||
required: false,
|
||||
description: 'Input data/payload for webhook or form fields'
|
||||
},
|
||||
headers: {
|
||||
type: 'object',
|
||||
required: false,
|
||||
description: 'Custom HTTP headers'
|
||||
},
|
||||
timeout: {
|
||||
type: 'number',
|
||||
required: false,
|
||||
description: 'Timeout in ms (default: 120000)'
|
||||
},
|
||||
waitForResponse: {
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
description: 'Wait for workflow completion (default: true)'
|
||||
}
|
||||
},
|
||||
returns: `Execution response including:
|
||||
- success: boolean
|
||||
- data: workflow output data
|
||||
- executionId: for tracking/debugging
|
||||
- triggerType: detected or specified trigger type
|
||||
- metadata: timing and request details`,
|
||||
examples: [
|
||||
'n8n_test_workflow({workflowId: "123"}) - Auto-detect and trigger',
|
||||
'n8n_test_workflow({workflowId: "123", triggerType: "webhook", data: {name: "John"}}) - Webhook with data',
|
||||
'n8n_test_workflow({workflowId: "123", triggerType: "chat", message: "Hello AI"}) - Chat trigger',
|
||||
'n8n_test_workflow({workflowId: "123", triggerType: "form", data: {email: "test@example.com"}}) - Form submission'
|
||||
],
|
||||
useCases: [
|
||||
'Test workflows during development',
|
||||
'Trigger AI chat workflows with messages',
|
||||
'Submit form data to form-triggered workflows',
|
||||
'Integrate n8n workflows with external systems via webhooks'
|
||||
],
|
||||
performance: `Performance varies based on workflow complexity and waitForResponse setting:
|
||||
- Webhook: Immediate trigger, depends on workflow
|
||||
- Form: Immediate trigger, depends on workflow
|
||||
- Chat: May have additional AI processing time`,
|
||||
errorHandling: `**Error Response with Execution Guidance**
|
||||
|
||||
When execution fails, the response includes guidance for debugging:
|
||||
|
||||
**With Execution ID** (workflow started but failed):
|
||||
- Use n8n_executions({action: 'get', id: executionId, mode: 'preview'}) to investigate
|
||||
|
||||
**Without Execution ID** (workflow didn't start):
|
||||
- Use n8n_executions({action: 'list', workflowId: 'wf_id'}) to find recent executions
|
||||
|
||||
**Common Errors:**
|
||||
- "Workflow not found" - Check workflow ID exists
|
||||
- "Workflow not active" - Activate workflow (required for all trigger types)
|
||||
- "Workflow cannot be triggered externally" - Workflow has no webhook/form/chat trigger
|
||||
- "Chat message required" - Provide message parameter for chat triggers
|
||||
- "SSRF protection" - URL validation failed`,
|
||||
bestPractices: [
|
||||
'Let auto-detection choose the trigger type when possible',
|
||||
'Ensure workflow has a webhook, form, or chat trigger before testing',
|
||||
'For chat workflows, provide sessionId for multi-turn conversations',
|
||||
'Use mode="preview" with n8n_executions for efficient debugging',
|
||||
'Test with small data payloads first',
|
||||
'Activate workflows before testing (use n8n_update_partial_workflow with activateWorkflow)'
|
||||
],
|
||||
pitfalls: [
|
||||
'All trigger types require the workflow to be ACTIVE',
|
||||
'Workflows without webhook/form/chat triggers cannot be executed externally',
|
||||
'Chat trigger requires message parameter',
|
||||
'Form data must match expected form fields',
|
||||
'Webhook method must match node configuration'
|
||||
],
|
||||
relatedTools: ['n8n_executions', 'n8n_get_workflow', 'n8n_create_workflow', 'n8n_validate_workflow']
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=n8n-test-workflow.js.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-test-workflow.js.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-test-workflow.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-test-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-test-workflow.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAsB;IACnD,IAAI,EAAE,mBAAmB;IACzB,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW,EAAE,gJAAgJ;QAC7J,aAAa,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,CAAC;QAC/D,OAAO,EAAE,8DAA8D;QACvE,WAAW,EAAE,iEAAiE;QAC9E,IAAI,EAAE;YACJ,0DAA0D;YAC1D,sEAAsE;YACtE,wCAAwC;YACxC,qDAAqD;SACtD;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;mJASkI;QAC/I,UAAU,EAAE;YACV,UAAU,E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AAkH;SACnH;QACD,QAAQ,EAAE;YACR,mCAAmC;YACnC,yCAAyC;YACzC,8CAA8C;YAC9C,4DAA4D;SAC7D;QACD,WAAW,EAAE;;;+CAG8B;QAC3C,aAAa,EAAE;;;;;;;;;;;;;;;4CAeyB;QACxC,aAAa,EAAE;YACb,0DAA0D;YAC1D,qEAAqE;YACrE,oEAAoE;YACpE,gEAAgE;YAChE,qCAAqC;YACrC,2FAA2F;SAC5F;QACD,QAAQ,EAAE;YACR,qDAAqD;YACrD,4EAA4E;YAC5E,yCAAyC;YACzC,2CAA2C;YAC3C,8CAA8C;SAC/C;QACD,YAAY,EAAE,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,uBAAuB,CAAC;KACrG;CACF,CAAC"}
|
||||
3
dist/mcp/tool-docs/workflow_management/n8n-update-full-workflow.d.ts
vendored
Normal file
3
dist/mcp/tool-docs/workflow_management/n8n-update-full-workflow.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { ToolDocumentation } from '../types';
|
||||
export declare const n8nUpdateFullWorkflowDoc: ToolDocumentation;
|
||||
//# sourceMappingURL=n8n-update-full-workflow.d.ts.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-update-full-workflow.d.ts.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-update-full-workflow.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-update-full-workflow.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-update-full-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,wBAAwB,EAAE,iBAwDtC,CAAC"}
|
||||
61
dist/mcp/tool-docs/workflow_management/n8n-update-full-workflow.js
vendored
Normal file
61
dist/mcp/tool-docs/workflow_management/n8n-update-full-workflow.js
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.n8nUpdateFullWorkflowDoc = void 0;
|
||||
exports.n8nUpdateFullWorkflowDoc = {
|
||||
name: 'n8n_update_full_workflow',
|
||||
category: 'workflow_management',
|
||||
essentials: {
|
||||
description: 'Full workflow update. Requires complete nodes[] and connections{}. For incremental use n8n_update_partial_workflow.',
|
||||
keyParameters: ['id', 'nodes', 'connections'],
|
||||
example: 'n8n_update_full_workflow({id: "wf_123", nodes: [...], connections: {...}})',
|
||||
performance: 'Network-dependent',
|
||||
tips: [
|
||||
'Include intent parameter in every call - helps to return better responses',
|
||||
'Must provide complete workflow',
|
||||
'Use update_partial for small changes',
|
||||
'Validate before updating'
|
||||
]
|
||||
},
|
||||
full: {
|
||||
description: 'Performs a complete workflow update by replacing the entire workflow definition. Requires providing the complete nodes array and connections object, even for small changes. This is a full replacement operation - any nodes or connections not included will be removed.',
|
||||
parameters: {
|
||||
id: { type: 'string', required: true, description: 'Workflow ID to update' },
|
||||
name: { type: 'string', description: 'New workflow name (optional)' },
|
||||
nodes: { type: 'array', description: 'Complete array of workflow nodes (required if modifying structure)' },
|
||||
connections: { type: 'object', description: 'Complete connections object (required if modifying structure)' },
|
||||
settings: { type: 'object', description: 'Workflow settings to update (timezone, error handling, etc.)' },
|
||||
intent: { type: 'string', description: 'Intent of the change - helps to return better response. Include in every tool call. Example: "Migrate workflow to new node versions".' }
|
||||
},
|
||||
returns: 'Updated workflow object with all fields including the changes applied',
|
||||
examples: [
|
||||
'n8n_update_full_workflow({id: "abc", intent: "Rename workflow for clarity", name: "New Name"}) - Rename with intent',
|
||||
'n8n_update_full_workflow({id: "abc", name: "New Name"}) - Rename only',
|
||||
'n8n_update_full_workflow({id: "xyz", intent: "Add error handling nodes", nodes: [...], connections: {...}}) - Full structure update',
|
||||
'const wf = n8n_get_workflow({id}); wf.nodes.push(newNode); n8n_update_full_workflow({...wf, intent: "Add data processing node"}); // Add node'
|
||||
],
|
||||
useCases: [
|
||||
'Major workflow restructuring',
|
||||
'Bulk node updates',
|
||||
'Workflow imports/cloning',
|
||||
'Complete workflow replacement',
|
||||
'Settings changes'
|
||||
],
|
||||
performance: 'Network-dependent - typically 200-500ms. Larger workflows take longer. Consider update_partial for better performance.',
|
||||
bestPractices: [
|
||||
'Always include intent parameter - it helps provide better responses',
|
||||
'Get workflow first, modify, then update',
|
||||
'Validate with validate_workflow before updating',
|
||||
'Use update_partial for small changes',
|
||||
'Test updates in non-production first'
|
||||
],
|
||||
pitfalls: [
|
||||
'Requires N8N_API_URL and N8N_API_KEY configured',
|
||||
'Must include ALL nodes/connections',
|
||||
'Missing nodes will be deleted',
|
||||
'Can break active workflows',
|
||||
'No partial updates - use update_partial instead'
|
||||
],
|
||||
relatedTools: ['n8n_get_workflow', 'n8n_update_partial_workflow', 'validate_workflow', 'n8n_create_workflow']
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=n8n-update-full-workflow.js.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-update-full-workflow.js.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-update-full-workflow.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-update-full-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-update-full-workflow.ts"],"names":[],"mappings":";;;AAEa,QAAA,wBAAwB,GAAsB;IACzD,IAAI,EAAE,0BAA0B;IAChC,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW,EAAE,qHAAqH;QAClI,aAAa,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC;QAC7C,OAAO,EAAE,4EAA4E;QACrF,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE;YACJ,2EAA2E;YAC3E,gCAAgC;YAChC,sCAAsC;YACtC,0BAA0B;SAC3B;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,4QAA4Q;QACzR,UAAU,EAAE;YACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE;YAC5E,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8BAA8B,EAAE;YACrE,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,oEAAoE,EAAE;YAC3G,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,+DAA+D,EAAE;YAC7G,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8DAA8D,EAAE;YACzG,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uIAAuI,EAAE;SACjL;QACD,OAAO,EAAE,uEAAuE;QAChF,QAAQ,EAAE;YACR,qHAAqH;YACrH,uEAAuE;YACvE,qIAAqI;YACrI,+IAA+I;SAChJ;QACD,QAAQ,EAAE;YACR,8BAA8B;YAC9B,mBAAmB;YACnB,0BAA0B;YAC1B,+BAA+B;YAC/B,kBAAkB;SACnB;QACD,WAAW,EAAE,wHAAwH;QACrI,aAAa,EAAE;YACb,qEAAqE;YACrE,yCAAyC;YACzC,iDAAiD;YACjD,sCAAsC;YACtC,sCAAsC;SACvC;QACD,QAAQ,EAAE;YACR,iDAAiD;YACjD,oCAAoC;YACpC,+BAA+B;YAC/B,4BAA4B;YAC5B,iDAAiD;SAClD;QACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,6BAA6B,EAAE,mBAAmB,EAAE,qBAAqB,CAAC;KAC9G;CACF,CAAC"}
|
||||
3
dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.d.ts
vendored
Normal file
3
dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { ToolDocumentation } from '../types';
|
||||
export declare const n8nUpdatePartialWorkflowDoc: ToolDocumentation;
|
||||
//# sourceMappingURL=n8n-update-partial-workflow.d.ts.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.d.ts.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-update-partial-workflow.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,2BAA2B,EAAE,iBA+ZzC,CAAC"}
|
||||
420
dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.js
vendored
Normal file
420
dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.js
vendored
Normal file
@@ -0,0 +1,420 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.n8nUpdatePartialWorkflowDoc = void 0;
|
||||
exports.n8nUpdatePartialWorkflowDoc = {
|
||||
name: 'n8n_update_partial_workflow',
|
||||
category: 'workflow_management',
|
||||
essentials: {
|
||||
description: 'Update workflow incrementally with diff operations. Types: addNode, removeNode, updateNode, moveNode, enable/disableNode, addConnection, removeConnection, rewireConnection, cleanStaleConnections, replaceConnections, updateSettings, updateName, add/removeTag, activateWorkflow, deactivateWorkflow. Supports smart parameters (branch, case) for multi-output nodes. Full support for AI connections (ai_languageModel, ai_tool, ai_memory, ai_embedding, ai_vectorStore, ai_document, ai_textSplitter, ai_outputParser).',
|
||||
keyParameters: ['id', 'operations', 'continueOnError'],
|
||||
example: 'n8n_update_partial_workflow({id: "wf_123", operations: [{type: "rewireConnection", source: "IF", from: "Old", to: "New", branch: "true"}]})',
|
||||
performance: 'Fast (50-200ms)',
|
||||
tips: [
|
||||
'ALWAYS provide intent parameter describing what you\'re doing (e.g., "Add error handling", "Fix webhook URL", "Connect Slack to error output")',
|
||||
'DON\'T use generic intent like "update workflow" or "partial update" - be specific about your goal',
|
||||
'Use rewireConnection to change connection targets',
|
||||
'Use branch="true"/"false" for IF nodes',
|
||||
'Use case=N for Switch nodes',
|
||||
'Use cleanStaleConnections to auto-remove broken connections',
|
||||
'Set ignoreErrors:true on removeConnection for cleanup',
|
||||
'Use continueOnError mode for best-effort bulk operations',
|
||||
'Validate with validateOnly first',
|
||||
'For AI connections, specify sourceOutput type (ai_languageModel, ai_tool, etc.)',
|
||||
'Batch AI component connections for atomic updates',
|
||||
'Auto-sanitization: ALL nodes auto-fixed during updates (operator structures, missing metadata)',
|
||||
'Node renames automatically update all connection references - no manual connection operations needed',
|
||||
'Activate/deactivate workflows: Use activateWorkflow/deactivateWorkflow operations (requires activatable triggers like webhook/schedule)'
|
||||
]
|
||||
},
|
||||
full: {
|
||||
description: `Updates workflows using surgical diff operations instead of full replacement. Supports 17 operation types for precise modifications. Operations are validated and applied atomically by default - all succeed or none are applied.
|
||||
|
||||
## Available Operations:
|
||||
|
||||
### Node Operations (6 types):
|
||||
- **addNode**: Add a new node with name, type, and position (required)
|
||||
- **removeNode**: Remove a node by ID or name
|
||||
- **updateNode**: Update node properties using dot notation (e.g., 'parameters.url')
|
||||
- **moveNode**: Change node position [x, y]
|
||||
- **enableNode**: Enable a disabled node
|
||||
- **disableNode**: Disable an active node
|
||||
|
||||
### Connection Operations (5 types):
|
||||
- **addConnection**: Connect nodes (source→target). Supports smart parameters: branch="true"/"false" for IF nodes, case=N for Switch nodes.
|
||||
- **removeConnection**: Remove connection between nodes (supports ignoreErrors flag)
|
||||
- **rewireConnection**: Change connection target from one node to another. Supports smart parameters.
|
||||
- **cleanStaleConnections**: Auto-remove all connections referencing non-existent nodes
|
||||
- **replaceConnections**: Replace entire connections object
|
||||
|
||||
### Metadata Operations (4 types):
|
||||
- **updateSettings**: Modify workflow settings
|
||||
- **updateName**: Rename the workflow
|
||||
- **addTag**: Add a workflow tag
|
||||
- **removeTag**: Remove a workflow tag
|
||||
|
||||
### Workflow Activation Operations (2 types):
|
||||
- **activateWorkflow**: Activate the workflow to enable automatic execution via triggers
|
||||
- **deactivateWorkflow**: Deactivate the workflow to prevent automatic execution
|
||||
|
||||
## Smart Parameters for Multi-Output Nodes
|
||||
|
||||
For **IF nodes**, use semantic 'branch' parameter instead of technical sourceIndex:
|
||||
- **branch="true"**: Routes to true branch (sourceIndex=0)
|
||||
- **branch="false"**: Routes to false branch (sourceIndex=1)
|
||||
|
||||
For **Switch nodes**, use semantic 'case' parameter:
|
||||
- **case=0**: First output
|
||||
- **case=1**: Second output
|
||||
- **case=N**: Nth output
|
||||
|
||||
Works with addConnection and rewireConnection operations. Explicit sourceIndex overrides smart parameters.
|
||||
|
||||
## AI Connection Support
|
||||
|
||||
Full support for all 8 AI connection types used in n8n AI workflows:
|
||||
|
||||
**Connection Types**:
|
||||
- **ai_languageModel**: Connect language models (OpenAI, Anthropic, Google Gemini) to AI Agents
|
||||
- **ai_tool**: Connect tools (HTTP Request Tool, Code Tool, etc.) to AI Agents
|
||||
- **ai_memory**: Connect memory systems (Window Buffer, Conversation Summary) to AI Agents
|
||||
- **ai_outputParser**: Connect output parsers (Structured, JSON) to AI Agents
|
||||
- **ai_embedding**: Connect embedding models to Vector Stores
|
||||
- **ai_vectorStore**: Connect vector stores to Vector Store Tools
|
||||
- **ai_document**: Connect document loaders to Vector Stores
|
||||
- **ai_textSplitter**: Connect text splitters to document processing chains
|
||||
|
||||
**AI Connection Examples**:
|
||||
- Single connection: \`{type: "addConnection", source: "OpenAI", target: "AI Agent", sourceOutput: "ai_languageModel"}\`
|
||||
- Fallback model: Use targetIndex (0=primary, 1=fallback) for dual language model setup
|
||||
- Multiple tools: Batch multiple \`sourceOutput: "ai_tool"\` connections to one AI Agent
|
||||
- Vector retrieval: Chain ai_embedding → ai_vectorStore → ai_tool → AI Agent
|
||||
|
||||
**Important Notes**:
|
||||
- **AI nodes do NOT require main connections**: Nodes like OpenAI Chat Model, Postgres Chat Memory, Embeddings OpenAI, and Supabase Vector Store use AI-specific connection types exclusively. They should ONLY have connections like \`ai_languageModel\`, \`ai_memory\`, \`ai_embedding\`, or \`ai_tool\` - NOT \`main\` connections.
|
||||
|
||||
**Best Practices**:
|
||||
- Always specify \`sourceOutput\` for AI connections (defaults to "main" if omitted)
|
||||
- Connect language model BEFORE creating/enabling AI Agent (validation requirement)
|
||||
- Use atomic mode (default) when setting up AI workflows to ensure complete configuration
|
||||
- Validate AI workflows after changes with \`n8n_validate_workflow\` tool
|
||||
|
||||
## Cleanup & Recovery Features
|
||||
|
||||
### Automatic Cleanup
|
||||
The **cleanStaleConnections** operation automatically removes broken connection references after node renames/deletions. Essential for workflow recovery.
|
||||
|
||||
### Best-Effort Mode
|
||||
Set **continueOnError: true** to apply valid operations even if some fail. Returns detailed results showing which operations succeeded/failed. Perfect for bulk cleanup operations.
|
||||
|
||||
### Graceful Error Handling
|
||||
Add **ignoreErrors: true** to removeConnection operations to prevent failures when connections don't exist.
|
||||
|
||||
## Auto-Sanitization System
|
||||
|
||||
### What Gets Auto-Fixed
|
||||
When ANY workflow update is made, ALL nodes in the workflow are automatically sanitized to ensure complete metadata and correct structure:
|
||||
|
||||
1. **Operator Structure Fixes**:
|
||||
- Binary operators (equals, contains, greaterThan, etc.) automatically have \`singleValue\` removed
|
||||
- Unary operators (isEmpty, isNotEmpty, true, false) automatically get \`singleValue: true\` added
|
||||
- Invalid operator structures (e.g., \`{type: "isNotEmpty"}\`) are corrected to \`{type: "boolean", operation: "isNotEmpty"}\`
|
||||
|
||||
2. **Missing Metadata Added**:
|
||||
- IF nodes with conditions get complete \`conditions.options\` structure if missing
|
||||
- Switch nodes with conditions get complete \`conditions.options\` for all rules
|
||||
- Required fields: \`{version: 2, leftValue: "", caseSensitive: true, typeValidation: "strict"}\`
|
||||
|
||||
### Sanitization Scope
|
||||
- Runs on **ALL nodes** in the workflow, not just modified ones
|
||||
- Triggered by ANY update operation (addNode, updateNode, addConnection, etc.)
|
||||
- Prevents workflow corruption that would make UI unrenderable
|
||||
|
||||
### Limitations
|
||||
Auto-sanitization CANNOT fix:
|
||||
- Broken connections (connections referencing non-existent nodes) - use \`cleanStaleConnections\`
|
||||
- Branch count mismatches (e.g., Switch with 3 rules but only 2 outputs) - requires manual connection fixes
|
||||
- Workflows in paradoxical corrupt states (API returns corrupt data, API rejects updates) - must recreate workflow
|
||||
|
||||
### Recovery Guidance
|
||||
If validation still fails after auto-sanitization:
|
||||
1. Check error details for specific issues
|
||||
2. Use \`validate_workflow\` to see all validation errors
|
||||
3. For connection issues, use \`cleanStaleConnections\` operation
|
||||
4. For branch mismatches, add missing output connections
|
||||
5. For paradoxical corrupted workflows, create new workflow and migrate nodes
|
||||
|
||||
## Automatic Connection Reference Updates
|
||||
|
||||
When you rename a node using **updateNode**, all connection references throughout the workflow are automatically updated. Both the connection source keys and target references are updated for all connection types (main, error, ai_tool, ai_languageModel, ai_memory, etc.) and all branch configurations (IF node branches, Switch node cases, error outputs).
|
||||
|
||||
### Basic Example
|
||||
\`\`\`javascript
|
||||
// Rename a node - connections update automatically
|
||||
n8n_update_partial_workflow({
|
||||
id: "wf_123",
|
||||
operations: [{
|
||||
type: "updateNode",
|
||||
nodeId: "node_abc",
|
||||
updates: { name: "Data Processor" }
|
||||
}]
|
||||
});
|
||||
// All incoming and outgoing connections now reference "Data Processor"
|
||||
\`\`\`
|
||||
|
||||
### Multi-Output Node Example
|
||||
\`\`\`javascript
|
||||
// Rename nodes in a branching workflow
|
||||
n8n_update_partial_workflow({
|
||||
id: "workflow_id",
|
||||
operations: [
|
||||
{
|
||||
type: "updateNode",
|
||||
nodeId: "if_node_id",
|
||||
updates: { name: "Value Checker" }
|
||||
},
|
||||
{
|
||||
type: "updateNode",
|
||||
nodeId: "error_node_id",
|
||||
updates: { name: "Error Handler" }
|
||||
}
|
||||
]
|
||||
});
|
||||
// IF node branches and error connections automatically updated
|
||||
\`\`\`
|
||||
|
||||
### Name Collision Protection
|
||||
Attempting to rename a node to an existing name returns a clear error:
|
||||
\`\`\`
|
||||
Cannot rename node "Old Name" to "New Name": A node with that name already exists (id: abc123...).
|
||||
Please choose a different name.
|
||||
\`\`\`
|
||||
|
||||
### Usage Notes
|
||||
- Simply rename nodes with updateNode - no manual connection operations needed
|
||||
- Multiple renames in one call work atomically
|
||||
- Can rename a node and add/remove connections using the new name in the same batch
|
||||
- Use \`validateOnly: true\` to preview effects before applying
|
||||
|
||||
## Removing Properties with undefined
|
||||
|
||||
To remove a property from a node, set its value to \`undefined\` in the updates object. This is essential when migrating from deprecated properties or cleaning up optional configuration fields.
|
||||
|
||||
### Why Use undefined?
|
||||
- **Property removal vs. null**: Setting a property to \`undefined\` removes it completely from the node object, while \`null\` sets the property to a null value
|
||||
- **Validation constraints**: Some properties are mutually exclusive (e.g., \`continueOnFail\` and \`onError\`). Simply setting one without removing the other will fail validation
|
||||
- **Deprecated property migration**: When n8n deprecates properties, you must remove the old property before the new one will work
|
||||
|
||||
### Basic Property Removal
|
||||
\`\`\`javascript
|
||||
// Remove error handling configuration
|
||||
n8n_update_partial_workflow({
|
||||
id: "wf_123",
|
||||
operations: [{
|
||||
type: "updateNode",
|
||||
nodeName: "HTTP Request",
|
||||
updates: { onError: undefined }
|
||||
}]
|
||||
});
|
||||
|
||||
// Remove disabled flag
|
||||
n8n_update_partial_workflow({
|
||||
id: "wf_456",
|
||||
operations: [{
|
||||
type: "updateNode",
|
||||
nodeId: "node_abc",
|
||||
updates: { disabled: undefined }
|
||||
}]
|
||||
});
|
||||
\`\`\`
|
||||
|
||||
### Nested Property Removal
|
||||
Use dot notation to remove nested properties:
|
||||
\`\`\`javascript
|
||||
// Remove nested parameter
|
||||
n8n_update_partial_workflow({
|
||||
id: "wf_789",
|
||||
operations: [{
|
||||
type: "updateNode",
|
||||
nodeName: "API Request",
|
||||
updates: { "parameters.authentication": undefined }
|
||||
}]
|
||||
});
|
||||
|
||||
// Remove entire array property
|
||||
n8n_update_partial_workflow({
|
||||
id: "wf_012",
|
||||
operations: [{
|
||||
type: "updateNode",
|
||||
nodeName: "HTTP Request",
|
||||
updates: { "parameters.headers": undefined }
|
||||
}]
|
||||
});
|
||||
\`\`\`
|
||||
|
||||
### Migrating from Deprecated Properties
|
||||
Common scenario: replacing \`continueOnFail\` with \`onError\`:
|
||||
\`\`\`javascript
|
||||
// WRONG: Setting only the new property leaves the old one
|
||||
n8n_update_partial_workflow({
|
||||
id: "wf_123",
|
||||
operations: [{
|
||||
type: "updateNode",
|
||||
nodeName: "HTTP Request",
|
||||
updates: { onError: "continueErrorOutput" }
|
||||
}]
|
||||
});
|
||||
// Error: continueOnFail and onError are mutually exclusive
|
||||
|
||||
// CORRECT: Remove the old property first
|
||||
n8n_update_partial_workflow({
|
||||
id: "wf_123",
|
||||
operations: [{
|
||||
type: "updateNode",
|
||||
nodeName: "HTTP Request",
|
||||
updates: {
|
||||
continueOnFail: undefined,
|
||||
onError: "continueErrorOutput"
|
||||
}
|
||||
}]
|
||||
});
|
||||
\`\`\`
|
||||
|
||||
### Batch Property Removal
|
||||
Remove multiple properties in one operation:
|
||||
\`\`\`javascript
|
||||
n8n_update_partial_workflow({
|
||||
id: "wf_345",
|
||||
operations: [{
|
||||
type: "updateNode",
|
||||
nodeName: "Data Processor",
|
||||
updates: {
|
||||
continueOnFail: undefined,
|
||||
alwaysOutputData: undefined,
|
||||
"parameters.legacy_option": undefined
|
||||
}
|
||||
}]
|
||||
});
|
||||
\`\`\`
|
||||
|
||||
### When to Use undefined
|
||||
- Removing deprecated properties during migration
|
||||
- Cleaning up optional configuration flags
|
||||
- Resolving mutual exclusivity validation errors
|
||||
- Removing stale or unnecessary node metadata
|
||||
- Simplifying node configuration`,
|
||||
parameters: {
|
||||
id: { type: 'string', required: true, description: 'Workflow ID to update' },
|
||||
operations: {
|
||||
type: 'array',
|
||||
required: true,
|
||||
description: 'Array of diff operations. Each must have "type" field and operation-specific properties. Nodes can be referenced by ID or name.'
|
||||
},
|
||||
validateOnly: { type: 'boolean', description: 'If true, only validate operations without applying them' },
|
||||
continueOnError: { type: 'boolean', description: 'If true, apply valid operations even if some fail (best-effort mode). Returns applied and failed operation indices. Default: false (atomic)' },
|
||||
intent: { type: 'string', description: 'Intent of the change - helps to return better response. Include in every tool call. Example: "Add error handling for API failures".' }
|
||||
},
|
||||
returns: 'Updated workflow object or validation results if validateOnly=true',
|
||||
examples: [
|
||||
'// Include intent parameter for better responses\nn8n_update_partial_workflow({id: "abc", intent: "Add error handling for API failures", operations: [{type: "addConnection", source: "HTTP Request", target: "Error Handler"}]})',
|
||||
'// Add a basic node (minimal configuration)\nn8n_update_partial_workflow({id: "abc", operations: [{type: "addNode", node: {name: "Process Data", type: "n8n-nodes-base.set", position: [400, 300], parameters: {}}}]})',
|
||||
'// Add node with full configuration\nn8n_update_partial_workflow({id: "def", operations: [{type: "addNode", node: {name: "Send Slack Alert", type: "n8n-nodes-base.slack", position: [600, 300], typeVersion: 2, parameters: {resource: "message", operation: "post", channel: "#alerts", text: "Success!"}}}]})',
|
||||
'// Add node AND connect it (common pattern)\nn8n_update_partial_workflow({id: "ghi", operations: [\n {type: "addNode", node: {name: "HTTP Request", type: "n8n-nodes-base.httpRequest", position: [400, 300], parameters: {url: "https://api.example.com", method: "GET"}}},\n {type: "addConnection", source: "Webhook", target: "HTTP Request"}\n]})',
|
||||
'// Rewire connection from one target to another\nn8n_update_partial_workflow({id: "xyz", operations: [{type: "rewireConnection", source: "Webhook", from: "Old Handler", to: "New Handler"}]})',
|
||||
'// Smart parameter: IF node true branch\nn8n_update_partial_workflow({id: "abc", operations: [{type: "addConnection", source: "IF", target: "Success Handler", branch: "true"}]})',
|
||||
'// Smart parameter: IF node false branch\nn8n_update_partial_workflow({id: "def", operations: [{type: "addConnection", source: "IF", target: "Error Handler", branch: "false"}]})',
|
||||
'// Smart parameter: Switch node case routing\nn8n_update_partial_workflow({id: "ghi", operations: [\n {type: "addConnection", source: "Switch", target: "Handler A", case: 0},\n {type: "addConnection", source: "Switch", target: "Handler B", case: 1},\n {type: "addConnection", source: "Switch", target: "Handler C", case: 2}\n]})',
|
||||
'// Rewire with smart parameter\nn8n_update_partial_workflow({id: "jkl", operations: [{type: "rewireConnection", source: "IF", from: "Old True Handler", to: "New True Handler", branch: "true"}]})',
|
||||
'// Add multiple nodes in batch\nn8n_update_partial_workflow({id: "mno", operations: [\n {type: "addNode", node: {name: "Filter", type: "n8n-nodes-base.filter", position: [400, 300], parameters: {}}},\n {type: "addNode", node: {name: "Transform", type: "n8n-nodes-base.set", position: [600, 300], parameters: {}}},\n {type: "addConnection", source: "Filter", target: "Transform"}\n]})',
|
||||
'// Clean up stale connections after node renames/deletions\nn8n_update_partial_workflow({id: "pqr", operations: [{type: "cleanStaleConnections"}]})',
|
||||
'// Remove connection gracefully (no error if it doesn\'t exist)\nn8n_update_partial_workflow({id: "stu", operations: [{type: "removeConnection", source: "Old Node", target: "Target", ignoreErrors: true}]})',
|
||||
'// Best-effort mode: apply what works, report what fails\nn8n_update_partial_workflow({id: "vwx", operations: [\n {type: "updateName", name: "Fixed Workflow"},\n {type: "removeConnection", source: "Broken", target: "Node"},\n {type: "cleanStaleConnections"}\n], continueOnError: true})',
|
||||
'// Update node parameter\nn8n_update_partial_workflow({id: "yza", operations: [{type: "updateNode", nodeName: "HTTP Request", updates: {"parameters.url": "https://api.example.com"}}]})',
|
||||
'// Validate before applying\nn8n_update_partial_workflow({id: "bcd", operations: [{type: "removeNode", nodeName: "Old Process"}], validateOnly: true})',
|
||||
'\n// ============ AI CONNECTION EXAMPLES ============',
|
||||
'// Connect language model to AI Agent\nn8n_update_partial_workflow({id: "ai1", operations: [{type: "addConnection", source: "OpenAI Chat Model", target: "AI Agent", sourceOutput: "ai_languageModel"}]})',
|
||||
'// Connect tool to AI Agent\nn8n_update_partial_workflow({id: "ai2", operations: [{type: "addConnection", source: "HTTP Request Tool", target: "AI Agent", sourceOutput: "ai_tool"}]})',
|
||||
'// Connect memory to AI Agent\nn8n_update_partial_workflow({id: "ai3", operations: [{type: "addConnection", source: "Window Buffer Memory", target: "AI Agent", sourceOutput: "ai_memory"}]})',
|
||||
'// Connect output parser to AI Agent\nn8n_update_partial_workflow({id: "ai4", operations: [{type: "addConnection", source: "Structured Output Parser", target: "AI Agent", sourceOutput: "ai_outputParser"}]})',
|
||||
'// Complete AI Agent setup: Add language model, tools, and memory\nn8n_update_partial_workflow({id: "ai5", operations: [\n {type: "addConnection", source: "OpenAI Chat Model", target: "AI Agent", sourceOutput: "ai_languageModel"},\n {type: "addConnection", source: "HTTP Request Tool", target: "AI Agent", sourceOutput: "ai_tool"},\n {type: "addConnection", source: "Code Tool", target: "AI Agent", sourceOutput: "ai_tool"},\n {type: "addConnection", source: "Window Buffer Memory", target: "AI Agent", sourceOutput: "ai_memory"}\n]})',
|
||||
'// Add fallback model to AI Agent for reliability\nn8n_update_partial_workflow({id: "ai6", operations: [\n {type: "addConnection", source: "OpenAI Chat Model", target: "AI Agent", sourceOutput: "ai_languageModel", targetIndex: 0},\n {type: "addConnection", source: "Anthropic Chat Model", target: "AI Agent", sourceOutput: "ai_languageModel", targetIndex: 1}\n]})',
|
||||
'// Vector Store setup: Connect embeddings and documents\nn8n_update_partial_workflow({id: "ai7", operations: [\n {type: "addConnection", source: "Embeddings OpenAI", target: "Pinecone Vector Store", sourceOutput: "ai_embedding"},\n {type: "addConnection", source: "Default Data Loader", target: "Pinecone Vector Store", sourceOutput: "ai_document"}\n]})',
|
||||
'// Connect Vector Store Tool to AI Agent (retrieval setup)\nn8n_update_partial_workflow({id: "ai8", operations: [\n {type: "addConnection", source: "Pinecone Vector Store", target: "Vector Store Tool", sourceOutput: "ai_vectorStore"},\n {type: "addConnection", source: "Vector Store Tool", target: "AI Agent", sourceOutput: "ai_tool"}\n]})',
|
||||
'// Rewire AI Agent to use different language model\nn8n_update_partial_workflow({id: "ai9", operations: [{type: "rewireConnection", source: "AI Agent", from: "OpenAI Chat Model", to: "Anthropic Chat Model", sourceOutput: "ai_languageModel"}]})',
|
||||
'// Replace all AI tools for an agent\nn8n_update_partial_workflow({id: "ai10", operations: [\n {type: "removeConnection", source: "Old Tool 1", target: "AI Agent", sourceOutput: "ai_tool"},\n {type: "removeConnection", source: "Old Tool 2", target: "AI Agent", sourceOutput: "ai_tool"},\n {type: "addConnection", source: "New HTTP Tool", target: "AI Agent", sourceOutput: "ai_tool"},\n {type: "addConnection", source: "New Code Tool", target: "AI Agent", sourceOutput: "ai_tool"}\n]})',
|
||||
'\n// ============ REMOVING PROPERTIES EXAMPLES ============',
|
||||
'// Remove a simple property\nn8n_update_partial_workflow({id: "rm1", operations: [{type: "updateNode", nodeName: "HTTP Request", updates: {onError: undefined}}]})',
|
||||
'// Migrate from deprecated continueOnFail to onError\nn8n_update_partial_workflow({id: "rm2", operations: [{type: "updateNode", nodeName: "HTTP Request", updates: {continueOnFail: undefined, onError: "continueErrorOutput"}}]})',
|
||||
'// Remove nested property\nn8n_update_partial_workflow({id: "rm3", operations: [{type: "updateNode", nodeName: "API Request", updates: {"parameters.authentication": undefined}}]})',
|
||||
'// Remove multiple properties\nn8n_update_partial_workflow({id: "rm4", operations: [{type: "updateNode", nodeName: "Data Processor", updates: {continueOnFail: undefined, alwaysOutputData: undefined, "parameters.legacy_option": undefined}}]})',
|
||||
'// Remove entire array property\nn8n_update_partial_workflow({id: "rm5", operations: [{type: "updateNode", nodeName: "HTTP Request", updates: {"parameters.headers": undefined}}]})'
|
||||
],
|
||||
useCases: [
|
||||
'Rewire connections when replacing nodes',
|
||||
'Route IF/Switch node outputs with semantic parameters',
|
||||
'Clean up broken workflows after node renames/deletions',
|
||||
'Bulk connection cleanup with best-effort mode',
|
||||
'Update single node parameters',
|
||||
'Replace all connections at once',
|
||||
'Graceful cleanup operations that don\'t fail',
|
||||
'Enable/disable nodes',
|
||||
'Rename workflows or nodes',
|
||||
'Manage tags efficiently',
|
||||
'Connect AI components (language models, tools, memory, parsers)',
|
||||
'Set up AI Agent workflows with multiple tools',
|
||||
'Add fallback language models to AI Agents',
|
||||
'Configure Vector Store retrieval systems',
|
||||
'Swap language models in existing AI workflows',
|
||||
'Batch-update AI tool connections'
|
||||
],
|
||||
performance: 'Very fast - typically 50-200ms. Much faster than full updates as only changes are processed.',
|
||||
bestPractices: [
|
||||
'Always include intent parameter with specific description (e.g., "Add error handling to HTTP Request node", "Fix authentication flow", "Connect Slack notification to errors"). Avoid generic phrases like "update workflow" or "partial update"',
|
||||
'Use rewireConnection instead of remove+add for changing targets',
|
||||
'Use branch="true"/"false" for IF nodes instead of sourceIndex',
|
||||
'Use case=N for Switch nodes instead of sourceIndex',
|
||||
'Use cleanStaleConnections after renaming/removing nodes',
|
||||
'Use continueOnError for bulk cleanup operations',
|
||||
'Set ignoreErrors:true on removeConnection for graceful cleanup',
|
||||
'Use validateOnly to test operations before applying',
|
||||
'Group related changes in one call',
|
||||
'Check operation order for dependencies',
|
||||
'Use atomic mode (default) for critical updates',
|
||||
'For AI connections, always specify sourceOutput (ai_languageModel, ai_tool, ai_memory, etc.)',
|
||||
'Connect language model BEFORE adding AI Agent to ensure validation passes',
|
||||
'Use targetIndex for fallback models (primary=0, fallback=1)',
|
||||
'Batch AI component connections in a single operation for atomicity',
|
||||
'Validate AI workflows after connection changes to catch configuration errors',
|
||||
'To remove properties, set them to undefined (not null) in the updates object',
|
||||
'When migrating from deprecated properties, remove the old property and add the new one in the same operation',
|
||||
'Use undefined to resolve mutual exclusivity validation errors between properties',
|
||||
'Batch multiple property removals in a single updateNode operation for efficiency'
|
||||
],
|
||||
pitfalls: [
|
||||
'**REQUIRES N8N_API_URL and N8N_API_KEY environment variables** - will not work without n8n API access',
|
||||
'Atomic mode (default): all operations must succeed or none are applied',
|
||||
'continueOnError breaks atomic guarantees - use with caution',
|
||||
'Order matters for dependent operations (e.g., must add node before connecting to it)',
|
||||
'Node references accept ID or name, but name must be unique',
|
||||
'Node names with special characters (apostrophes, quotes) work correctly',
|
||||
'For best compatibility, prefer node IDs over names when dealing with special characters',
|
||||
'Use "updates" property for updateNode operations: {type: "updateNode", updates: {...}}',
|
||||
'Smart parameters (branch, case) only work with IF and Switch nodes - ignored for other node types',
|
||||
'Explicit sourceIndex overrides smart parameters (branch, case) if both provided',
|
||||
'**CRITICAL**: For If nodes, ALWAYS use branch="true"/"false" instead of sourceIndex. Using sourceIndex=0 for multiple connections will put them ALL on the TRUE branch (main[0]), breaking your workflow logic!',
|
||||
'**CRITICAL**: For Switch nodes, ALWAYS use case=N instead of sourceIndex. Using same sourceIndex for multiple connections will put them on the same case output.',
|
||||
'cleanStaleConnections removes ALL broken connections - cannot be selective',
|
||||
'replaceConnections overwrites entire connections object - all previous connections lost',
|
||||
'**Auto-sanitization behavior**: Binary operators (equals, contains) automatically have singleValue removed; unary operators (isEmpty, isNotEmpty) automatically get singleValue:true added',
|
||||
'**Auto-sanitization runs on ALL nodes**: When ANY update is made, ALL nodes in the workflow are sanitized (not just modified ones)',
|
||||
'**Auto-sanitization cannot fix everything**: It fixes operator structures and missing metadata, but cannot fix broken connections or branch mismatches',
|
||||
'**Corrupted workflows beyond repair**: Workflows in paradoxical states (API returns corrupt, API rejects updates) cannot be fixed via API - must be recreated',
|
||||
'Setting a property to null does NOT remove it - use undefined instead',
|
||||
'When properties are mutually exclusive (e.g., continueOnFail and onError), setting only the new property will fail - you must remove the old one with undefined',
|
||||
'Removing a required property may cause validation errors - check node documentation first',
|
||||
'Nested property removal with dot notation only removes the specific nested field, not the entire parent object',
|
||||
'Array index notation (e.g., "parameters.headers[0]") is not supported - remove the entire array property instead'
|
||||
],
|
||||
relatedTools: ['n8n_update_full_workflow', 'n8n_get_workflow', 'validate_workflow', 'tools_documentation']
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=n8n-update-partial-workflow.js.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.js.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-update-partial-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workfl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9G,kFAAkF;YAClF,kFAAkF;SACnF;QACD,QAAQ,EAAE;YACR,uGAAuG;YACvG,wEAAwE;YACxE,6DAA6D;YAC7D,sFAAsF;YACtF,4DAA4D;YAC5D,yEAAyE;YACzE,yFAAyF;YACzF,wFAAwF;YACxF,mGAAmG;YACnG,iFAAiF;YACjF,iNAAiN;YACjN,kKAAkK;YAClK,4EAA4E;YAC5E,yFAAyF;YACzF,4LAA4L;YAC5L,oIAAoI;YACpI,wJAAwJ;YACxJ,+JAA+J;YAC/J,uEAAuE;YACvE,iKAAiK;YACjK,2FAA2F;YAC3F,gHAAgH;YAChH,kHAAkH;SACnH;QACD,YAAY,EAAE,CAAC,0BAA0B,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,qBAAqB,CAAC;KAC3G;CACF,CAAC"}
|
||||
3
dist/mcp/tool-docs/workflow_management/n8n-validate-workflow.d.ts
vendored
Normal file
3
dist/mcp/tool-docs/workflow_management/n8n-validate-workflow.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { ToolDocumentation } from '../types';
|
||||
export declare const n8nValidateWorkflowDoc: ToolDocumentation;
|
||||
//# sourceMappingURL=n8n-validate-workflow.d.ts.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-validate-workflow.d.ts.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-validate-workflow.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-validate-workflow.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-validate-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,sBAAsB,EAAE,iBAoEpC,CAAC"}
|
||||
73
dist/mcp/tool-docs/workflow_management/n8n-validate-workflow.js
vendored
Normal file
73
dist/mcp/tool-docs/workflow_management/n8n-validate-workflow.js
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.n8nValidateWorkflowDoc = void 0;
|
||||
exports.n8nValidateWorkflowDoc = {
|
||||
name: 'n8n_validate_workflow',
|
||||
category: 'workflow_management',
|
||||
essentials: {
|
||||
description: 'Validate workflow from n8n instance by ID - checks nodes, connections, expressions, and returns errors/warnings',
|
||||
keyParameters: ['id'],
|
||||
example: 'n8n_validate_workflow({id: "wf_abc123"})',
|
||||
performance: 'Network-dependent (100-500ms) - fetches and validates workflow',
|
||||
tips: [
|
||||
'Use options.profile to control validation strictness (minimal/runtime/ai-friendly/strict)',
|
||||
'Validation includes node configs, connections, and n8n expression syntax',
|
||||
'Returns categorized errors, warnings, and actionable fix suggestions'
|
||||
]
|
||||
},
|
||||
full: {
|
||||
description: `Validates a workflow stored in your n8n instance by fetching it via API and running comprehensive validation checks. This tool:
|
||||
|
||||
- Fetches the workflow from n8n using the workflow ID
|
||||
- Validates all node configurations based on their schemas
|
||||
- Checks workflow connections and data flow
|
||||
- Validates n8n expression syntax in all fields
|
||||
- Returns categorized issues with fix suggestions
|
||||
|
||||
The validation uses the same engine as validate_workflow but works with workflows already in n8n, making it perfect for validating existing workflows before execution.
|
||||
|
||||
Requires N8N_API_URL and N8N_API_KEY environment variables to be configured.`,
|
||||
parameters: {
|
||||
id: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
description: 'The workflow ID to validate from your n8n instance'
|
||||
},
|
||||
options: {
|
||||
type: 'object',
|
||||
required: false,
|
||||
description: 'Validation options: {validateNodes: bool (default true), validateConnections: bool (default true), validateExpressions: bool (default true), profile: "minimal"|"runtime"|"ai-friendly"|"strict" (default "runtime")}'
|
||||
}
|
||||
},
|
||||
returns: 'ValidationResult object containing isValid boolean, arrays of errors/warnings, and suggestions for fixes',
|
||||
examples: [
|
||||
'n8n_validate_workflow({id: "wf_abc123"}) - Validate with default settings',
|
||||
'n8n_validate_workflow({id: "wf_abc123", options: {profile: "strict"}}) - Strict validation',
|
||||
'n8n_validate_workflow({id: "wf_abc123", options: {validateExpressions: false}}) - Skip expression validation'
|
||||
],
|
||||
useCases: [
|
||||
'Validating workflows before running them in production',
|
||||
'Checking imported workflows for compatibility',
|
||||
'Debugging workflow execution failures',
|
||||
'Ensuring workflows follow best practices',
|
||||
'Pre-deployment validation in CI/CD pipelines'
|
||||
],
|
||||
performance: 'Depends on workflow size and API latency. Typically 100-500ms for medium workflows.',
|
||||
bestPractices: [
|
||||
'Run validation before activating workflows in production',
|
||||
'Use "runtime" profile for pre-execution checks',
|
||||
'Use "strict" profile for code review and best practices',
|
||||
'Fix errors before warnings - errors will likely cause execution failures',
|
||||
'Pay attention to expression validation - syntax errors are common'
|
||||
],
|
||||
pitfalls: [
|
||||
'Requires valid API credentials - check n8n_health_check first',
|
||||
'Large workflows may take longer to validate',
|
||||
'Some warnings may be intentional (e.g., optional parameters)',
|
||||
'Profile affects validation time - strict is slower but more thorough',
|
||||
'Expression validation may flag working but non-standard syntax'
|
||||
],
|
||||
relatedTools: ['validate_workflow', 'n8n_get_workflow', 'n8n_health_check', 'n8n_autofix_workflow']
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=n8n-validate-workflow.js.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-validate-workflow.js.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-validate-workflow.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-validate-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-validate-workflow.ts"],"names":[],"mappings":";;;AAEa,QAAA,sBAAsB,GAAsB;IACvD,IAAI,EAAE,uBAAuB;IAC7B,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW,EAAE,iHAAiH;QAC9H,aAAa,EAAE,CAAC,IAAI,CAAC;QACrB,OAAO,EAAE,0CAA0C;QACnD,WAAW,EAAE,gEAAgE;QAC7E,IAAI,EAAE;YACJ,2FAA2F;YAC3F,0EAA0E;YAC1E,sEAAsE;SACvE;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;6EAU4D;QACzE,UAAU,EAAE;YACV,EAAE,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,oDAAoD;aAClE;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,uNAAuN;aACrO;SACF;QACD,OAAO,EAAE,0GAA0G;QACnH,QAAQ,EAAE;YACR,2EAA2E;YAC3E,4FAA4F;YAC5F,8GAA8G;SAC/G;QACD,QAAQ,EAAE;YACR,wDAAwD;YACxD,+CAA+C;YAC/C,uCAAuC;YACvC,0CAA0C;YAC1C,8CAA8C;SAC/C;QACD,WAAW,EAAE,qFAAqF;QAClG,aAAa,EAAE;YACb,0DAA0D;YAC1D,gDAAgD;YAChD,yDAAyD;YACzD,0EAA0E;YAC1E,mEAAmE;SACpE;QACD,QAAQ,EAAE;YACR,+DAA+D;YAC/D,6CAA6C;YAC7C,8DAA8D;YAC9D,sEAAsE;YACtE,gEAAgE;SACjE;QACD,YAAY,EAAE,CAAC,mBAAmB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,sBAAsB,CAAC;KACpG;CACF,CAAC"}
|
||||
3
dist/mcp/tool-docs/workflow_management/n8n-workflow-versions.d.ts
vendored
Normal file
3
dist/mcp/tool-docs/workflow_management/n8n-workflow-versions.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { ToolDocumentation } from '../types';
|
||||
export declare const n8nWorkflowVersionsDoc: ToolDocumentation;
|
||||
//# sourceMappingURL=n8n-workflow-versions.d.ts.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-workflow-versions.d.ts.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-workflow-versions.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-workflow-versions.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-workflow-versions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,sBAAsB,EAAE,iBAqKpC,CAAC"}
|
||||
170
dist/mcp/tool-docs/workflow_management/n8n-workflow-versions.js
vendored
Normal file
170
dist/mcp/tool-docs/workflow_management/n8n-workflow-versions.js
vendored
Normal file
@@ -0,0 +1,170 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.n8nWorkflowVersionsDoc = void 0;
|
||||
exports.n8nWorkflowVersionsDoc = {
|
||||
name: 'n8n_workflow_versions',
|
||||
category: 'workflow_management',
|
||||
essentials: {
|
||||
description: 'Manage workflow version history, rollback to previous versions, and cleanup old versions',
|
||||
keyParameters: ['mode', 'workflowId', 'versionId'],
|
||||
example: 'n8n_workflow_versions({mode: "list", workflowId: "abc123"})',
|
||||
performance: 'Fast for list/get (~100ms), moderate for rollback (~200-500ms)',
|
||||
tips: [
|
||||
'Use mode="list" to see all saved versions before rollback',
|
||||
'Rollback creates a backup version automatically',
|
||||
'Use prune to clean up old versions and save storage',
|
||||
'truncate requires explicit confirmTruncate: true'
|
||||
]
|
||||
},
|
||||
full: {
|
||||
description: `Comprehensive workflow version management system. Supports six operations:
|
||||
|
||||
**list** - Show version history for a workflow
|
||||
- Returns all saved versions with timestamps, snapshot sizes, and metadata
|
||||
- Use limit parameter to control how many versions to return
|
||||
|
||||
**get** - Get details of a specific version
|
||||
- Returns the complete workflow snapshot from that version
|
||||
- Use to compare versions or extract old configurations
|
||||
|
||||
**rollback** - Restore workflow to a previous version
|
||||
- Creates a backup of the current workflow before rollback
|
||||
- Optionally validates the workflow structure before applying
|
||||
- Returns the restored workflow and backup version ID
|
||||
|
||||
**delete** - Delete specific version(s)
|
||||
- Delete a single version by versionId
|
||||
- Delete all versions for a workflow with deleteAll: true
|
||||
|
||||
**prune** - Clean up old versions
|
||||
- Keeps only the N most recent versions (default: 10)
|
||||
- Useful for managing storage and keeping history manageable
|
||||
|
||||
**truncate** - Delete ALL versions for ALL workflows
|
||||
- Dangerous operation requiring explicit confirmation
|
||||
- Use for complete version history cleanup`,
|
||||
parameters: {
|
||||
mode: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
description: 'Operation mode: "list", "get", "rollback", "delete", "prune", or "truncate"',
|
||||
enum: ['list', 'get', 'rollback', 'delete', 'prune', 'truncate']
|
||||
},
|
||||
workflowId: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
description: 'Workflow ID (required for list, rollback, delete, prune modes)'
|
||||
},
|
||||
versionId: {
|
||||
type: 'number',
|
||||
required: false,
|
||||
description: 'Version ID (required for get mode, optional for rollback to specific version, required for single delete)'
|
||||
},
|
||||
limit: {
|
||||
type: 'number',
|
||||
required: false,
|
||||
default: 10,
|
||||
description: 'Maximum versions to return in list mode'
|
||||
},
|
||||
validateBefore: {
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
default: true,
|
||||
description: 'Validate workflow structure before rollback (rollback mode only)'
|
||||
},
|
||||
deleteAll: {
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
default: false,
|
||||
description: 'Delete all versions for workflow (delete mode only)'
|
||||
},
|
||||
maxVersions: {
|
||||
type: 'number',
|
||||
required: false,
|
||||
default: 10,
|
||||
description: 'Keep N most recent versions (prune mode only)'
|
||||
},
|
||||
confirmTruncate: {
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
default: false,
|
||||
description: 'REQUIRED: Must be true to truncate all versions (truncate mode only)'
|
||||
}
|
||||
},
|
||||
returns: `Response varies by mode:
|
||||
|
||||
**list mode:**
|
||||
- versions: Array of version objects with id, workflowId, snapshotSize, createdAt
|
||||
- totalCount: Total number of versions
|
||||
|
||||
**get mode:**
|
||||
- version: Complete version object including workflow snapshot
|
||||
|
||||
**rollback mode:**
|
||||
- success: Boolean indicating success
|
||||
- restoredVersion: The version that was restored
|
||||
- backupVersionId: ID of the backup created before rollback
|
||||
|
||||
**delete mode:**
|
||||
- deletedCount: Number of versions deleted
|
||||
|
||||
**prune mode:**
|
||||
- prunedCount: Number of old versions removed
|
||||
- remainingCount: Number of versions kept
|
||||
|
||||
**truncate mode:**
|
||||
- deletedCount: Total versions deleted across all workflows`,
|
||||
examples: [
|
||||
'// List version history\nn8n_workflow_versions({mode: "list", workflowId: "abc123", limit: 5})',
|
||||
'// Get specific version details\nn8n_workflow_versions({mode: "get", versionId: 42})',
|
||||
'// Rollback to latest saved version\nn8n_workflow_versions({mode: "rollback", workflowId: "abc123"})',
|
||||
'// Rollback to specific version\nn8n_workflow_versions({mode: "rollback", workflowId: "abc123", versionId: 42})',
|
||||
'// Delete specific version\nn8n_workflow_versions({mode: "delete", workflowId: "abc123", versionId: 42})',
|
||||
'// Delete all versions for workflow\nn8n_workflow_versions({mode: "delete", workflowId: "abc123", deleteAll: true})',
|
||||
'// Prune to keep only 5 most recent\nn8n_workflow_versions({mode: "prune", workflowId: "abc123", maxVersions: 5})',
|
||||
'// Truncate all versions (dangerous!)\nn8n_workflow_versions({mode: "truncate", confirmTruncate: true})'
|
||||
],
|
||||
useCases: [
|
||||
'Recover from accidental workflow changes',
|
||||
'Compare workflow versions to understand changes',
|
||||
'Maintain audit trail of workflow modifications',
|
||||
'Clean up old versions to save database storage',
|
||||
'Roll back failed workflow deployments'
|
||||
],
|
||||
performance: `Performance varies by operation:
|
||||
- list: Fast (~100ms) - simple database query
|
||||
- get: Fast (~100ms) - single row retrieval
|
||||
- rollback: Moderate (~200-500ms) - includes backup creation and workflow update
|
||||
- delete: Fast (~50-100ms) - database delete operation
|
||||
- prune: Moderate (~100-300ms) - depends on number of versions to delete
|
||||
- truncate: Slow (1-5s) - deletes all records across all workflows`,
|
||||
modeComparison: `| Mode | Required Params | Optional Params | Risk Level |
|
||||
|------|-----------------|-----------------|------------|
|
||||
| list | workflowId | limit | Low |
|
||||
| get | versionId | - | Low |
|
||||
| rollback | workflowId | versionId, validateBefore | Medium |
|
||||
| delete | workflowId | versionId, deleteAll | High |
|
||||
| prune | workflowId | maxVersions | Medium |
|
||||
| truncate | confirmTruncate=true | - | Critical |`,
|
||||
bestPractices: [
|
||||
'Always list versions before rollback to pick the right one',
|
||||
'Enable validateBefore for rollback to catch structural issues',
|
||||
'Use prune regularly to keep version history manageable',
|
||||
'Never use truncate in production without explicit need',
|
||||
'Document why you are rolling back for audit purposes'
|
||||
],
|
||||
pitfalls: [
|
||||
'Rollback overwrites current workflow - backup is created automatically',
|
||||
'Deleted versions cannot be recovered',
|
||||
'Truncate affects ALL workflows - use with extreme caution',
|
||||
'Version IDs are sequential but may have gaps after deletes',
|
||||
'Large workflows may have significant version storage overhead'
|
||||
],
|
||||
relatedTools: [
|
||||
'n8n_get_workflow - View current workflow state',
|
||||
'n8n_update_partial_workflow - Make incremental changes',
|
||||
'n8n_validate_workflow - Validate before deployment'
|
||||
]
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=n8n-workflow-versions.js.map
|
||||
1
dist/mcp/tool-docs/workflow_management/n8n-workflow-versions.js.map
vendored
Normal file
1
dist/mcp/tool-docs/workflow_management/n8n-workflow-versions.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"n8n-workflow-versions.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-workflow-versions.ts"],"names":[],"mappings":";;;AAEa,QAAA,sBAAsB,GAAsB;IACvD,IAAI,EAAE,uBAAuB;IAC7B,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW,EAAE,0FAA0F;QACvG,aAAa,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,WAAW,CAAC;QAClD,OAAO,EAAE,6DAA6D;QACtE,WAAW,EAAE,gEAAgE;QAC7E,IAAI,EAAE;YACJ,2DAA2D;YAC3D,iDAAiD;YACjD,qDAAqD;YACrD,kDAAkD;SACnD;KACF;IACD,IAAI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