n8n-mcp 2.16.0 → 2.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/.env.example +34 -0
  2. package/README.md +42 -5
  3. package/data/nodes.db +0 -0
  4. package/dist/http-server-single-session.d.ts.map +1 -1
  5. package/dist/http-server-single-session.js +35 -2
  6. package/dist/http-server-single-session.js.map +1 -1
  7. package/dist/http-server.d.ts.map +1 -1
  8. package/dist/http-server.js +4 -1
  9. package/dist/http-server.js.map +1 -1
  10. package/dist/mcp/handlers-n8n-manager.d.ts.map +1 -1
  11. package/dist/mcp/handlers-n8n-manager.js +2 -0
  12. package/dist/mcp/handlers-n8n-manager.js.map +1 -1
  13. package/dist/mcp/index.js +53 -0
  14. package/dist/mcp/index.js.map +1 -1
  15. package/dist/mcp/server.d.ts.map +1 -1
  16. package/dist/mcp/server.js +1 -2
  17. package/dist/mcp/server.js.map +1 -1
  18. package/dist/mcp/tool-docs/discovery/list-ai-tools.d.ts.map +1 -1
  19. package/dist/mcp/tool-docs/discovery/list-ai-tools.js +15 -11
  20. package/dist/mcp/tool-docs/discovery/list-ai-tools.js.map +1 -1
  21. package/dist/mcp/tool-docs/guides/ai-agents-guide.d.ts +3 -0
  22. package/dist/mcp/tool-docs/guides/ai-agents-guide.d.ts.map +1 -0
  23. package/dist/mcp/tool-docs/guides/ai-agents-guide.js +740 -0
  24. package/dist/mcp/tool-docs/guides/ai-agents-guide.js.map +1 -0
  25. package/dist/mcp/tool-docs/guides/index.d.ts +2 -0
  26. package/dist/mcp/tool-docs/guides/index.d.ts.map +1 -0
  27. package/dist/mcp/tool-docs/guides/index.js +6 -0
  28. package/dist/mcp/tool-docs/guides/index.js.map +1 -0
  29. package/dist/mcp/tool-docs/index.d.ts.map +1 -1
  30. package/dist/mcp/tool-docs/index.js +2 -0
  31. package/dist/mcp/tool-docs/index.js.map +1 -1
  32. package/dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.d.ts.map +1 -1
  33. package/dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.js +55 -5
  34. package/dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.js.map +1 -1
  35. package/dist/scripts/seed-canonical-ai-examples.d.ts +4 -0
  36. package/dist/scripts/seed-canonical-ai-examples.d.ts.map +1 -0
  37. package/dist/scripts/seed-canonical-ai-examples.js +121 -0
  38. package/dist/scripts/seed-canonical-ai-examples.js.map +1 -0
  39. package/dist/services/ai-node-validator.d.ts +12 -0
  40. package/dist/services/ai-node-validator.d.ts.map +1 -0
  41. package/dist/services/ai-node-validator.js +429 -0
  42. package/dist/services/ai-node-validator.js.map +1 -0
  43. package/dist/services/ai-tool-validators.d.ts +58 -0
  44. package/dist/services/ai-tool-validators.d.ts.map +1 -0
  45. package/dist/services/ai-tool-validators.js +438 -0
  46. package/dist/services/ai-tool-validators.js.map +1 -0
  47. package/dist/services/n8n-api-client.d.ts.map +1 -1
  48. package/dist/services/n8n-api-client.js +38 -0
  49. package/dist/services/n8n-api-client.js.map +1 -1
  50. package/dist/services/universal-expression-validator.d.ts.map +1 -1
  51. package/dist/services/universal-expression-validator.js.map +1 -1
  52. package/dist/services/workflow-validator.d.ts.map +1 -1
  53. package/dist/services/workflow-validator.js +32 -4
  54. package/dist/services/workflow-validator.js.map +1 -1
  55. package/dist/telemetry/config-manager.d.ts +4 -0
  56. package/dist/telemetry/config-manager.d.ts.map +1 -1
  57. package/dist/telemetry/config-manager.js +78 -0
  58. package/dist/telemetry/config-manager.js.map +1 -1
  59. package/dist/utils/auth.d.ts +1 -0
  60. package/dist/utils/auth.d.ts.map +1 -1
  61. package/dist/utils/auth.js +17 -1
  62. package/dist/utils/auth.js.map +1 -1
  63. package/dist/utils/enhanced-documentation-fetcher.d.ts.map +1 -1
  64. package/dist/utils/enhanced-documentation-fetcher.js +66 -10
  65. package/dist/utils/enhanced-documentation-fetcher.js.map +1 -1
  66. package/dist/utils/ssrf-protection.d.ts +7 -0
  67. package/dist/utils/ssrf-protection.d.ts.map +1 -0
  68. package/dist/utils/ssrf-protection.js +118 -0
  69. package/dist/utils/ssrf-protection.js.map +1 -0
  70. package/package.json +2 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-agents-guide.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/guides/ai-agents-guide.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAsB;IAC9C,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE;QACV,WAAW,EAAE,+JAA+J;QAC5K,aAAa,EAAE,EAAE;QACjB,OAAO,EAAE,0EAA0E;QACnF,WAAW,EAAE,0BAA0B;QACvC,IAAI,EAAE;YACJ,6DAA6D;YAC7D,wDAAwD;YACxD,8DAA8D;YAC9D,iEAAiE;YACjE,sDAAsD;YACtD,6DAA6D;SAC9D;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kKAoqBiJ;QAC9J,UAAU,EAAE,EAAE;QACd,OAAO,EAAE,uFAAuF;QAChG,QAAQ,EAAE;YACR,8DAA8D;YAC9D,wFAAwF;YACxF,8FAA8F;SAC/F;QACD,QAAQ,EAAE;YACR,uCAAuC;YACvC,gDAAgD;YAChD,+CAA+C;YAC/C,wEAAwE;YACxE,oCAAoC;YACpC,2CAA2C;YAC3C,gDAAgD;SACjD;QACD,WAAW,EAAE,4BAA4B;QACzC,aAAa,EAAE;YACb,qDAAqD;YACrD,gDAAgD;YAChD,sEAAsE;YACtE,uDAAuD;YACvD,2DAA2D;SAC5D;QACD,QAAQ,EAAE;YACR,yCAAyC;YACzC,gDAAgD;YAChD,+CAA+C;YAC/C,yCAAyC;YACzC,uEAAuE;SACxE;QACD,YAAY,EAAE;YACZ,qBAAqB;YACrB,6BAA6B;YAC7B,uBAAuB;YACvB,cAAc;YACd,qBAAqB;YACrB,eAAe;SAChB;KACF;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { aiAgentsGuide } from './ai-agents-guide';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/guides/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.aiAgentsGuide = void 0;
4
+ var ai_agents_guide_1 = require("./ai-agents-guide");
5
+ Object.defineProperty(exports, "aiAgentsGuide", { enumerable: true, get: function () { return ai_agents_guide_1.aiAgentsGuide; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/guides/index.ts"],"names":[],"mappings":";;;AACA,qDAAkD;AAAzC,gHAAA,aAAa,OAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mcp/tool-docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAoD5C,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAoDhE,CAAC;AAGF,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mcp/tool-docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAuD5C,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAuDhE,CAAC;AAGF,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
@@ -6,12 +6,14 @@ const configuration_1 = require("./configuration");
6
6
  const validation_1 = require("./validation");
7
7
  const templates_1 = require("./templates");
8
8
  const system_1 = require("./system");
9
+ const guides_1 = require("./guides");
9
10
  const workflow_management_1 = require("./workflow_management");
10
11
  exports.toolsDocumentation = {
11
12
  tools_documentation: system_1.toolsDocumentationDoc,
12
13
  n8n_diagnostic: system_1.n8nDiagnosticDoc,
13
14
  n8n_health_check: system_1.n8nHealthCheckDoc,
14
15
  n8n_list_available_tools: system_1.n8nListAvailableToolsDoc,
16
+ ai_agents_guide: guides_1.aiAgentsGuide,
15
17
  search_nodes: discovery_1.searchNodesDoc,
16
18
  list_nodes: discovery_1.listNodesDoc,
17
19
  list_ai_tools: discovery_1.listAiToolsDoc,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/tool-docs/index.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IACxD,mBAAmB,EAAE,0CAAoB;IACzC,kBAAkB,EAAE,yCAAmB;IACvC,qBAAqB,EAAE,4CAAsB;IAC7C,oBAAoB,EAAE,2CAAqB;IAC3C,4BAA4B,EAAE,kDAA4B;IAC1D,iBAAiB,EAAE,wCAAkB;IACrC,mBAAmB,EAAE,0CAAoB;IACzC,oBAAoB,EAAE,2CAAqB;CAC5C,CAAC"}
@@ -1 +1 @@
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,iBAuIzC,CAAC"}
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,iBAyLzC,CAAC"}
@@ -5,7 +5,7 @@ exports.n8nUpdatePartialWorkflowDoc = {
5
5
  name: 'n8n_update_partial_workflow',
6
6
  category: 'workflow_management',
7
7
  essentials: {
8
- description: 'Update workflow incrementally with diff operations. Types: addNode, removeNode, updateNode, moveNode, enable/disableNode, addConnection, removeConnection, rewireConnection, cleanStaleConnections, replaceConnections, updateSettings, updateName, add/removeTag. Supports smart parameters (branch, case) for multi-output nodes.',
8
+ description: 'Update workflow incrementally with diff operations. Types: addNode, removeNode, updateNode, moveNode, enable/disableNode, addConnection, removeConnection, rewireConnection, cleanStaleConnections, replaceConnections, updateSettings, updateName, add/removeTag. 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).',
9
9
  keyParameters: ['id', 'operations', 'continueOnError'],
10
10
  example: 'n8n_update_partial_workflow({id: "wf_123", operations: [{type: "rewireConnection", source: "IF", from: "Old", to: "New", branch: "true"}]})',
11
11
  performance: 'Fast (50-200ms)',
@@ -16,7 +16,9 @@ exports.n8nUpdatePartialWorkflowDoc = {
16
16
  'Use cleanStaleConnections to auto-remove broken connections',
17
17
  'Set ignoreErrors:true on removeConnection for cleanup',
18
18
  'Use continueOnError mode for best-effort bulk operations',
19
- 'Validate with validateOnly first'
19
+ 'Validate with validateOnly first',
20
+ 'For AI connections, specify sourceOutput type (ai_languageModel, ai_tool, etc.)',
21
+ 'Batch AI component connections for atomic updates'
20
22
  ]
21
23
  },
22
24
  full: {
@@ -58,6 +60,32 @@ For **Switch nodes**, use semantic 'case' parameter:
58
60
 
59
61
  Works with addConnection and rewireConnection operations. Explicit sourceIndex overrides smart parameters.
60
62
 
63
+ ## AI Connection Support
64
+
65
+ Full support for all 8 AI connection types used in n8n AI workflows:
66
+
67
+ **Connection Types**:
68
+ - **ai_languageModel**: Connect language models (OpenAI, Anthropic, Google Gemini) to AI Agents
69
+ - **ai_tool**: Connect tools (HTTP Request Tool, Code Tool, etc.) to AI Agents
70
+ - **ai_memory**: Connect memory systems (Window Buffer, Conversation Summary) to AI Agents
71
+ - **ai_outputParser**: Connect output parsers (Structured, JSON) to AI Agents
72
+ - **ai_embedding**: Connect embedding models to Vector Stores
73
+ - **ai_vectorStore**: Connect vector stores to Vector Store Tools
74
+ - **ai_document**: Connect document loaders to Vector Stores
75
+ - **ai_textSplitter**: Connect text splitters to document processing chains
76
+
77
+ **AI Connection Examples**:
78
+ - Single connection: \`{type: "addConnection", source: "OpenAI", target: "AI Agent", sourceOutput: "ai_languageModel"}\`
79
+ - Fallback model: Use targetIndex (0=primary, 1=fallback) for dual language model setup
80
+ - Multiple tools: Batch multiple \`sourceOutput: "ai_tool"\` connections to one AI Agent
81
+ - Vector retrieval: Chain ai_embedding → ai_vectorStore → ai_tool → AI Agent
82
+
83
+ **Best Practices**:
84
+ - Always specify \`sourceOutput\` for AI connections (defaults to "main" if omitted)
85
+ - Connect language model BEFORE creating/enabling AI Agent (validation requirement)
86
+ - Use atomic mode (default) when setting up AI workflows to ensure complete configuration
87
+ - Validate AI workflows after changes with \`n8n_validate_workflow\` tool
88
+
61
89
  ## Cleanup & Recovery Features
62
90
 
63
91
  ### Automatic Cleanup
@@ -93,7 +121,18 @@ Add **ignoreErrors: true** to removeConnection operations to prevent failures wh
93
121
  '// 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}]})',
94
122
  '// 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})',
95
123
  '// Update node parameter\nn8n_update_partial_workflow({id: "yza", operations: [{type: "updateNode", nodeName: "HTTP Request", updates: {"parameters.url": "https://api.example.com"}}]})',
96
- '// Validate before applying\nn8n_update_partial_workflow({id: "bcd", operations: [{type: "removeNode", nodeName: "Old Process"}], validateOnly: true})'
124
+ '// Validate before applying\nn8n_update_partial_workflow({id: "bcd", operations: [{type: "removeNode", nodeName: "Old Process"}], validateOnly: true})',
125
+ '\n// ============ AI CONNECTION EXAMPLES ============',
126
+ '// 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"}]})',
127
+ '// Connect tool to AI Agent\nn8n_update_partial_workflow({id: "ai2", operations: [{type: "addConnection", source: "HTTP Request Tool", target: "AI Agent", sourceOutput: "ai_tool"}]})',
128
+ '// Connect memory to AI Agent\nn8n_update_partial_workflow({id: "ai3", operations: [{type: "addConnection", source: "Window Buffer Memory", target: "AI Agent", sourceOutput: "ai_memory"}]})',
129
+ '// 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"}]})',
130
+ '// 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]})',
131
+ '// Add fallback model to AI Agent (requires v2.1+)\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]})',
132
+ '// 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]})',
133
+ '// 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]})',
134
+ '// 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"}]})',
135
+ '// 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]})'
97
136
  ],
98
137
  useCases: [
99
138
  'Rewire connections when replacing nodes',
@@ -105,7 +144,13 @@ Add **ignoreErrors: true** to removeConnection operations to prevent failures wh
105
144
  'Graceful cleanup operations that don\'t fail',
106
145
  'Enable/disable nodes',
107
146
  'Rename workflows or nodes',
108
- 'Manage tags efficiently'
147
+ 'Manage tags efficiently',
148
+ 'Connect AI components (language models, tools, memory, parsers)',
149
+ 'Set up AI Agent workflows with multiple tools',
150
+ 'Add fallback language models to AI Agents',
151
+ 'Configure Vector Store retrieval systems',
152
+ 'Swap language models in existing AI workflows',
153
+ 'Batch-update AI tool connections'
109
154
  ],
110
155
  performance: 'Very fast - typically 50-200ms. Much faster than full updates as only changes are processed.',
111
156
  bestPractices: [
@@ -118,7 +163,12 @@ Add **ignoreErrors: true** to removeConnection operations to prevent failures wh
118
163
  'Use validateOnly to test operations before applying',
119
164
  'Group related changes in one call',
120
165
  'Check operation order for dependencies',
121
- 'Use atomic mode (default) for critical updates'
166
+ 'Use atomic mode (default) for critical updates',
167
+ 'For AI connections, always specify sourceOutput (ai_languageModel, ai_tool, ai_memory, etc.)',
168
+ 'Connect language model BEFORE adding AI Agent to ensure validation passes',
169
+ 'Use targetIndex for fallback models (primary=0, fallback=1)',
170
+ 'Batch AI component connections in a single operation for atomicity',
171
+ 'Validate AI workflows after connection changes to catch configuration errors'
122
172
  ],
123
173
  pitfalls: [
124
174
  '**REQUIRES N8N_API_URL and N8N_API_KEY environment variables** - will not work without n8n API access',
@@ -1 +1 @@
1
- {"version":3,"file":"n8n-update-partial-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.ts"],"names":[],"mappings":";;;AAEa,QAAA,2BAA2B,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ACtB,2BAA2B;YAC3B,yBAAyB;SAC1B;QACD,WAAW,EAAE,8FAA8F;QAC3G,aAAa,EAAE;YACb,iEAAiE;YACjE,+DAA+D;YAC/D,oDAAoD;YACpD,yDAAyD;YACzD,iDAAiD;YACjD,gEAAgE;YAChE,qDAAqD;YACrD,mCAAmC;YACnC,wCAAwC;YACxC,gDAAgD;SACjD;QACD,QAAQ,EAAE;YACR,uGAAuG;YACvG,wEAAwE;YACxE,6DAA6D;YAC7D,sFAAsF;YACtF,4DAA4D;YAC5D,yEAAyE;YACzE,yFAAyF;YACzF,wFAAwF;YACxF,mGAAmG;YACnG,iFAAiF;YACjF,4EAA4E;YAC5E,yFAAyF;SAC1F;QACD,YAAY,EAAE,CAAC,0BAA0B,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,qBAAqB,CAAC;KAC3G;CACF,CAAC"}
1
+ {"version":3,"file":"n8n-update-partial-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.ts"],"names":[],"mappings":";;;AAEa,QAAA,2BAA2B,GAAsB;IAC5D,IAAI,EAAE,6BAA6B;IACnC,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW,EAAE,0dAA0d;QACve,aAAa,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,iBAAiB,CAAC;QACtD,OAAO,EAAE,6IAA6I;QACtJ,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE;YACJ,mDAAmD;YACnD,wCAAwC;YACxC,6BAA6B;YAC7B,6DAA6D;YAC7D,uDAAuD;YACvD,0DAA0D;YAC1D,kCAAkC;YAClC,iFAAiF;YACjF,mDAAmD;SACpD;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4GAyE2F;QACxG,UAAU,EAAE;YACV,EAAE,EAAE,EAAE,IAAI,E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AA2E;YAC3E,6DAA6D;YAC7D,oEAAoE;YACpE,8EAA8E;SAC/E;QACD,QAAQ,EAAE;YACR,uGAAuG;YACvG,wEAAwE;YACxE,6DAA6D;YAC7D,sFAAsF;YACtF,4DAA4D;YAC5D,yEAAyE;YACzE,yFAAyF;YACzF,wFAAwF;YACxF,mGAAmG;YACnG,iFAAiF;YACjF,4EAA4E;YAC5E,yFAAyF;SAC1F;QACD,YAAY,EAAE,CAAC,0BAA0B,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,qBAAqB,CAAC;KAC3G;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ declare function seedCanonicalExamples(): Promise<void>;
3
+ export { seedCanonicalExamples };
4
+ //# sourceMappingURL=seed-canonical-ai-examples.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seed-canonical-ai-examples.d.ts","sourceRoot":"","sources":["../../src/scripts/seed-canonical-ai-examples.ts"],"names":[],"mappings":";AAmCA,iBAAe,qBAAqB,kBAsHnC;AAOD,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,121 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.seedCanonicalExamples = seedCanonicalExamples;
38
+ const fs = __importStar(require("fs"));
39
+ const path = __importStar(require("path"));
40
+ const database_adapter_1 = require("../database/database-adapter");
41
+ const logger_1 = require("../utils/logger");
42
+ async function seedCanonicalExamples() {
43
+ try {
44
+ const examplesPath = path.join(__dirname, '../data/canonical-ai-tool-examples.json');
45
+ const examplesData = fs.readFileSync(examplesPath, 'utf-8');
46
+ const canonicalExamples = JSON.parse(examplesData);
47
+ logger_1.logger.info('Loading canonical AI tool examples', {
48
+ version: canonicalExamples.version,
49
+ tools: canonicalExamples.examples.length
50
+ });
51
+ const db = await (0, database_adapter_1.createDatabaseAdapter)('./data/nodes.db');
52
+ const templateStmt = db.prepare(`
53
+ INSERT OR IGNORE INTO templates (
54
+ id,
55
+ workflow_id,
56
+ name,
57
+ description,
58
+ views,
59
+ created_at,
60
+ updated_at
61
+ ) VALUES (?, ?, ?, ?, ?, datetime('now'), datetime('now'))
62
+ `);
63
+ const canonicalTemplateId = -1000;
64
+ templateStmt.run(canonicalTemplateId, canonicalTemplateId, 'Canonical AI Tool Examples', 'Hand-crafted examples demonstrating best practices for AI tools', 99999);
65
+ const stmt = db.prepare(`
66
+ INSERT OR REPLACE INTO template_node_configs (
67
+ node_type,
68
+ template_id,
69
+ template_name,
70
+ template_views,
71
+ node_name,
72
+ parameters_json,
73
+ credentials_json,
74
+ has_credentials,
75
+ has_expressions,
76
+ complexity,
77
+ use_cases
78
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
79
+ `);
80
+ let totalInserted = 0;
81
+ for (const toolExamples of canonicalExamples.examples) {
82
+ const { node_type, display_name, examples } = toolExamples;
83
+ logger_1.logger.info(`Seeding examples for ${display_name}`, {
84
+ nodeType: node_type,
85
+ exampleCount: examples.length
86
+ });
87
+ for (let i = 0; i < examples.length; i++) {
88
+ const example = examples[i];
89
+ const templateId = canonicalTemplateId;
90
+ const templateName = `Canonical: ${display_name} - ${example.name}`;
91
+ const paramsStr = JSON.stringify(example.parameters);
92
+ const hasExpressions = paramsStr.includes('={{') || paramsStr.includes('$json') || paramsStr.includes('$node') ? 1 : 0;
93
+ stmt.run(node_type, templateId, templateName, 99999, example.name, JSON.stringify(example.parameters), example.credentials ? JSON.stringify(example.credentials) : null, example.credentials ? 1 : 0, hasExpressions, example.complexity, example.use_case);
94
+ totalInserted++;
95
+ logger_1.logger.info(` ✓ Seeded: ${example.name}`, {
96
+ complexity: example.complexity,
97
+ hasCredentials: !!example.credentials,
98
+ hasExpressions: hasExpressions === 1
99
+ });
100
+ }
101
+ }
102
+ db.close();
103
+ logger_1.logger.info('Canonical examples seeding complete', {
104
+ totalExamples: totalInserted,
105
+ tools: canonicalExamples.examples.length
106
+ });
107
+ console.log('\n✅ Successfully seeded', totalInserted, 'canonical AI tool examples');
108
+ console.log('\nExamples are now available via:');
109
+ console.log(' • search_nodes({query: "HTTP Request Tool", includeExamples: true})');
110
+ console.log(' • get_node_essentials({nodeType: "nodes-langchain.toolCode", includeExamples: true})');
111
+ }
112
+ catch (error) {
113
+ logger_1.logger.error('Failed to seed canonical examples', { error });
114
+ console.error('❌ Error:', error);
115
+ process.exit(1);
116
+ }
117
+ }
118
+ if (require.main === module) {
119
+ seedCanonicalExamples().catch(console.error);
120
+ }
121
+ //# sourceMappingURL=seed-canonical-ai-examples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seed-can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AAW;oBACrC,cAAc,EAAE,cAAc,KAAK,CAAC;iBACrC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,EAAE,CAAC,KAAK,EAAE,CAAC;QAEX,eAAM,CAAC,IAAI,CAAC,qCAAqC,EAAE;YACjD,aAAa,EAAE,aAAa;YAC5B,KAAK,EAAE,iBAAiB,CAAC,QAAQ,CAAC,MAAM;SACzC,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,aAAa,EAAE,4BAA4B,CAAC,CAAC;QACpF,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,uEAAuE,CAAC,CAAC;QACrF,OAAO,CAAC,GAAG,CAAC,wFAAwF,CAAC,CAAC;IAExG,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,eAAM,CAAC,KAAK,CAAC,mCAAmC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;QAC7D,OAAO,CAAC,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;QACjC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAGD,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,qBAAqB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { WorkflowNode, WorkflowJson, ReverseConnection, ValidationIssue } from './ai-tool-validators';
2
+ export type { WorkflowNode, WorkflowJson, ReverseConnection, ValidationIssue } from './ai-tool-validators';
3
+ export declare const AI_CONNECTION_TYPES: readonly ["ai_languageModel", "ai_memory", "ai_tool", "ai_embedding", "ai_vectorStore", "ai_document", "ai_textSplitter", "ai_outputParser"];
4
+ export declare function buildReverseConnectionMap(workflow: WorkflowJson): Map<string, ReverseConnection[]>;
5
+ export declare function getAIConnections(nodeName: string, reverseConnections: Map<string, ReverseConnection[]>, connectionType?: string): ReverseConnection[];
6
+ export declare function validateAIAgent(node: WorkflowNode, reverseConnections: Map<string, ReverseConnection[]>, workflow: WorkflowJson): ValidationIssue[];
7
+ export declare function validateChatTrigger(node: WorkflowNode, workflow: WorkflowJson, reverseConnections: Map<string, ReverseConnection[]>): ValidationIssue[];
8
+ export declare function validateBasicLLMChain(node: WorkflowNode, reverseConnections: Map<string, ReverseConnection[]>): ValidationIssue[];
9
+ export declare function validateAISpecificNodes(workflow: WorkflowJson): ValidationIssue[];
10
+ export declare function hasAINodes(workflow: WorkflowJson): boolean;
11
+ export declare function getAINodeCategory(nodeType: string): string | null;
12
+ //# sourceMappingURL=ai-node-validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-node-validator.d.ts","sourceRoot":"","sources":["../../src/services/ai-node-validator.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,eAAe,EAGhB,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EACV,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAU9B,eAAO,MAAM,mBAAmB,8IAStB,CAAC;AAmBX,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,YAAY,GACrB,GAAG,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,CA4ClC;AAKD,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,EACpD,cAAc,CAAC,EAAE,MAAM,GACtB,iBAAiB,EAAE,CAQrB;AAgBD,wBAAgB,eAAe,CAC7B,IAAI,EAAE,YAAY,EAClB,kBAAkB,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,EACpD,QAAQ,EAAE,YAAY,GACrB,eAAe,EAAE,CAqLnB;AAyCD,wBAAgB,mBAAmB,CACjC,IA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