n8n-mcp 2.22.6 → 2.22.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/data/nodes.db CHANGED
Binary file
@@ -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,iBA2RzC,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,iBAsZzC,CAAC"}
@@ -187,7 +187,115 @@ Please choose a different name.
187
187
  - Simply rename nodes with updateNode - no manual connection operations needed
188
188
  - Multiple renames in one call work atomically
189
189
  - Can rename a node and add/remove connections using the new name in the same batch
190
- - Use \`validateOnly: true\` to preview effects before applying`,
190
+ - Use \`validateOnly: true\` to preview effects before applying
191
+
192
+ ## Removing Properties with undefined
193
+
194
+ 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.
195
+
196
+ ### Why Use undefined?
197
+ - **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
198
+ - **Validation constraints**: Some properties are mutually exclusive (e.g., \`continueOnFail\` and \`onError\`). Simply setting one without removing the other will fail validation
199
+ - **Deprecated property migration**: When n8n deprecates properties, you must remove the old property before the new one will work
200
+
201
+ ### Basic Property Removal
202
+ \`\`\`javascript
203
+ // Remove error handling configuration
204
+ n8n_update_partial_workflow({
205
+ id: "wf_123",
206
+ operations: [{
207
+ type: "updateNode",
208
+ nodeName: "HTTP Request",
209
+ updates: { onError: undefined }
210
+ }]
211
+ });
212
+
213
+ // Remove disabled flag
214
+ n8n_update_partial_workflow({
215
+ id: "wf_456",
216
+ operations: [{
217
+ type: "updateNode",
218
+ nodeId: "node_abc",
219
+ updates: { disabled: undefined }
220
+ }]
221
+ });
222
+ \`\`\`
223
+
224
+ ### Nested Property Removal
225
+ Use dot notation to remove nested properties:
226
+ \`\`\`javascript
227
+ // Remove nested parameter
228
+ n8n_update_partial_workflow({
229
+ id: "wf_789",
230
+ operations: [{
231
+ type: "updateNode",
232
+ nodeName: "API Request",
233
+ updates: { "parameters.authentication": undefined }
234
+ }]
235
+ });
236
+
237
+ // Remove entire array property
238
+ n8n_update_partial_workflow({
239
+ id: "wf_012",
240
+ operations: [{
241
+ type: "updateNode",
242
+ nodeName: "HTTP Request",
243
+ updates: { "parameters.headers": undefined }
244
+ }]
245
+ });
246
+ \`\`\`
247
+
248
+ ### Migrating from Deprecated Properties
249
+ Common scenario: replacing \`continueOnFail\` with \`onError\`:
250
+ \`\`\`javascript
251
+ // WRONG: Setting only the new property leaves the old one
252
+ n8n_update_partial_workflow({
253
+ id: "wf_123",
254
+ operations: [{
255
+ type: "updateNode",
256
+ nodeName: "HTTP Request",
257
+ updates: { onError: "continueErrorOutput" }
258
+ }]
259
+ });
260
+ // Error: continueOnFail and onError are mutually exclusive
261
+
262
+ // CORRECT: Remove the old property first
263
+ n8n_update_partial_workflow({
264
+ id: "wf_123",
265
+ operations: [{
266
+ type: "updateNode",
267
+ nodeName: "HTTP Request",
268
+ updates: {
269
+ continueOnFail: undefined,
270
+ onError: "continueErrorOutput"
271
+ }
272
+ }]
273
+ });
274
+ \`\`\`
275
+
276
+ ### Batch Property Removal
277
+ Remove multiple properties in one operation:
278
+ \`\`\`javascript
279
+ n8n_update_partial_workflow({
280
+ id: "wf_345",
281
+ operations: [{
282
+ type: "updateNode",
283
+ nodeName: "Data Processor",
284
+ updates: {
285
+ continueOnFail: undefined,
286
+ alwaysOutputData: undefined,
287
+ "parameters.legacy_option": undefined
288
+ }
289
+ }]
290
+ });
291
+ \`\`\`
292
+
293
+ ### When to Use undefined
294
+ - Removing deprecated properties during migration
295
+ - Cleaning up optional configuration flags
296
+ - Resolving mutual exclusivity validation errors
297
+ - Removing stale or unnecessary node metadata
298
+ - Simplifying node configuration`,
191
299
  parameters: {
192
300
  id: { type: 'string', required: true, description: 'Workflow ID to update' },
193
301
  operations: {
@@ -224,7 +332,13 @@ Please choose a different name.
224
332
  '// 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]})',
225
333
  '// 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]})',
226
334
  '// 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"}]})',
227
- '// 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]})'
335
+ '// 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]})',
336
+ '\n// ============ REMOVING PROPERTIES EXAMPLES ============',
337
+ '// Remove a simple property\nn8n_update_partial_workflow({id: "rm1", operations: [{type: "updateNode", nodeName: "HTTP Request", updates: {onError: undefined}}]})',
338
+ '// Migrate from deprecated continueOnFail to onError\nn8n_update_partial_workflow({id: "rm2", operations: [{type: "updateNode", nodeName: "HTTP Request", updates: {continueOnFail: undefined, onError: "continueErrorOutput"}}]})',
339
+ '// Remove nested property\nn8n_update_partial_workflow({id: "rm3", operations: [{type: "updateNode", nodeName: "API Request", updates: {"parameters.authentication": undefined}}]})',
340
+ '// Remove multiple properties\nn8n_update_partial_workflow({id: "rm4", operations: [{type: "updateNode", nodeName: "Data Processor", updates: {continueOnFail: undefined, alwaysOutputData: undefined, "parameters.legacy_option": undefined}}]})',
341
+ '// Remove entire array property\nn8n_update_partial_workflow({id: "rm5", operations: [{type: "updateNode", nodeName: "HTTP Request", updates: {"parameters.headers": undefined}}]})'
228
342
  ],
229
343
  useCases: [
230
344
  'Rewire connections when replacing nodes',
@@ -260,7 +374,11 @@ Please choose a different name.
260
374
  'Connect language model BEFORE adding AI Agent to ensure validation passes',
261
375
  'Use targetIndex for fallback models (primary=0, fallback=1)',
262
376
  'Batch AI component connections in a single operation for atomicity',
263
- 'Validate AI workflows after connection changes to catch configuration errors'
377
+ 'Validate AI workflows after connection changes to catch configuration errors',
378
+ 'To remove properties, set them to undefined (not null) in the updates object',
379
+ 'When migrating from deprecated properties, remove the old property and add the new one in the same operation',
380
+ 'Use undefined to resolve mutual exclusivity validation errors between properties',
381
+ 'Batch multiple property removals in a single updateNode operation for efficiency'
264
382
  ],
265
383
  pitfalls: [
266
384
  '**REQUIRES N8N_API_URL and N8N_API_KEY environment variables** - will not work without n8n API access',
@@ -280,7 +398,12 @@ Please choose a different name.
280
398
  '**Auto-sanitization behavior**: Binary operators (equals, contains) automatically have singleValue removed; unary operators (isEmpty, isNotEmpty) automatically get singleValue:true added',
281
399
  '**Auto-sanitization runs on ALL nodes**: When ANY update is made, ALL nodes in the workflow are sanitized (not just modified ones)',
282
400
  '**Auto-sanitization cannot fix everything**: It fixes operator structures and missing metadata, but cannot fix broken connections or branch mismatches',
283
- '**Corrupted workflows beyond repair**: Workflows in paradoxical states (API returns corrupt, API rejects updates) cannot be fixed via API - must be recreated'
401
+ '**Corrupted workflows beyond repair**: Workflows in paradoxical states (API returns corrupt, API rejects updates) cannot be fixed via API - must be recreated',
402
+ 'Setting a property to null does NOT remove it - use undefined instead',
403
+ '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',
404
+ 'Removing a required property may cause validation errors - check node documentation first',
405
+ 'Nested property removal with dot notation only removes the specific nested field, not the entire parent object',
406
+ 'Array index notation (e.g., "parameters.headers[0]") is not supported - remove the entire array property instead'
284
407
  ],
285
408
  relatedTools: ['n8n_update_full_workflow', 'n8n_get_workflow', 'validate_workflow', 'tools_documentation']
286
409
  }
@@ -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,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,kCAAk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A8C;YAC9C,sBAAsB;YACtB,2BAA2B;YAC3B,yBAAyB;YACzB,iEAAiE;YACjE,+CAA+C;YAC/C,2CAA2C;YAC3C,0CAA0C;YAC1C,+CAA+C;YAC/C,kCAAkC;SACnC;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;YAChD,8FAA8F;YAC9F,2EAA2E;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,iNAAiN;YACjN,kKAAkK;YAClK,4EAA4E;YAC5E,yFAAyF;YACzF,4LAA4L;YAC5L,oIAAoI;YACpI,wJAAwJ;YACxJ,+JAA+J;SAChK;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;YA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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-mcp",
3
- "version": "2.22.6",
3
+ "version": "2.22.7",
4
4
  "description": "Integration between n8n workflow automation and Model Context Protocol (MCP)",
5
5
  "dependencies": {
6
6
  "@modelcontextprotocol/sdk": "^1.13.2",