n8n-mcp 2.11.1 → 2.11.3
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/README.md +2 -2
- package/data/nodes.db +0 -0
- package/dist/mcp/handlers-workflow-diff.js +1 -1
- package/dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.js +2 -2
- package/dist/mcp/tool-docs/workflow_management/n8n-update-partial-workflow.js.map +1 -1
- package/dist/services/workflow-diff-engine.js +7 -7
- package/dist/types/workflow-diff.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://opensource.org/licenses/MIT)
|
|
4
4
|
[](https://github.com/czlonkowski/n8n-mcp)
|
|
5
|
-
[](https://github.com/czlonkowski/n8n-mcp)
|
|
6
6
|
[](https://www.npmjs.com/package/n8n-mcp)
|
|
7
7
|
[](https://codecov.io/gh/czlonkowski/n8n-mcp)
|
|
8
8
|
[](https://github.com/czlonkowski/n8n-mcp/actions)
|
|
9
|
-
[](https://github.com/n8n-io/n8n)
|
|
10
10
|
[](https://github.com/czlonkowski/n8n-mcp/pkgs/container/n8n-mcp)
|
|
11
11
|
[](https://railway.com/deploy/n8n-mcp?referralCode=n8n-mcp)
|
|
12
12
|
|
package/data/nodes.db
CHANGED
|
Binary file
|
|
@@ -14,7 +14,7 @@ const workflowDiffSchema = zod_1.z.object({
|
|
|
14
14
|
node: zod_1.z.any().optional(),
|
|
15
15
|
nodeId: zod_1.z.string().optional(),
|
|
16
16
|
nodeName: zod_1.z.string().optional(),
|
|
17
|
-
|
|
17
|
+
updates: zod_1.z.any().optional(),
|
|
18
18
|
position: zod_1.z.tuple([zod_1.z.number(), zod_1.z.number()]).optional(),
|
|
19
19
|
source: zod_1.z.string().optional(),
|
|
20
20
|
target: zod_1.z.string().optional(),
|
|
@@ -49,7 +49,7 @@ exports.n8nUpdatePartialWorkflowDoc = {
|
|
|
49
49
|
},
|
|
50
50
|
returns: 'Updated workflow object or validation results if validateOnly=true',
|
|
51
51
|
examples: [
|
|
52
|
-
'// Update node parameter\nn8n_update_partial_workflow({id: "abc", operations: [{type: "updateNode", nodeName: "HTTP Request",
|
|
52
|
+
'// Update node parameter\nn8n_update_partial_workflow({id: "abc", operations: [{type: "updateNode", nodeName: "HTTP Request", updates: {"parameters.url": "https://api.example.com"}}]})',
|
|
53
53
|
'// Add connection between nodes\nn8n_update_partial_workflow({id: "xyz", operations: [{type: "addConnection", source: "Webhook", target: "Slack", sourceOutput: "main", targetInput: "main"}]})',
|
|
54
54
|
'// Multiple operations in one call\nn8n_update_partial_workflow({id: "123", operations: [\n {type: "addNode", node: {name: "Transform", type: "n8n-nodes-base.code", position: [400, 300]}},\n {type: "addConnection", source: "Webhook", target: "Transform"},\n {type: "updateSettings", settings: {timezone: "America/New_York"}}\n]})',
|
|
55
55
|
'// Validate before applying\nn8n_update_partial_workflow({id: "456", operations: [{type: "removeNode", nodeName: "Old Process"}], validateOnly: true})'
|
|
@@ -74,7 +74,7 @@ exports.n8nUpdatePartialWorkflowDoc = {
|
|
|
74
74
|
'Operations validated together - all must be valid',
|
|
75
75
|
'Order matters for dependent operations (e.g., must add node before connecting to it)',
|
|
76
76
|
'Node references accept ID or name, but name must be unique',
|
|
77
|
-
'
|
|
77
|
+
'Use "updates" property for updateNode operations: {type: "updateNode", updates: {...}}'
|
|
78
78
|
],
|
|
79
79
|
relatedTools: ['n8n_update_full_workflow', 'n8n_get_workflow', 'validate_workflow', 'tools_documentation']
|
|
80
80
|
}
|
|
@@ -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,kNAAkN;QAC/N,aAAa,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC;QACnC,OAAO,EAAE,sFAAsF;QAC/F,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE;YACJ,0BAA0B;YAC1B,6BAA6B;YAC7B,kCAAkC;SACnC;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;uCAqBsB;QACnC,UAAU,EAAE;YACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE;YAC5E,UAAU,EAAE;gBACV,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,mJAAmJ;aACjK;YACD,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,yDAAyD,EAAE;SAC1G;QACD,OAAO,EAAE,oEAAoE;QAC7E,QAAQ,EAAE;YACR,0LAA0L;YAC1L,iMAAiM;YACjM,8UAA8U;YAC9U,wJAAwJ;SACzJ;QACD,QAAQ,EAAE;YACR,+BAA+B;YAC/B,wBAAwB;YACxB,sBAAsB;YACtB,2BAA2B;YAC3B,yBAAyB;SAC1B;QACD,WAAW,EAAE,8FAA8F;QAC3G,aAAa,EAAE;YACb,qCAAqC;YACrC,mCAAmC;YACnC,qCAAqC;YACrC,wCAAwC;SACzC;QACD,QAAQ,EAAE;YACR,uGAAuG;YACvG,sDAAsD;YACtD,mDAAmD;YACnD,sFAAsF;YACtF,4DAA4D;YAC5D,
|
|
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,kNAAkN;QAC/N,aAAa,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC;QACnC,OAAO,EAAE,sFAAsF;QAC/F,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE;YACJ,0BAA0B;YAC1B,6BAA6B;YAC7B,kCAAkC;SACnC;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;uCAqBsB;QACnC,UAAU,EAAE;YACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE;YAC5E,UAAU,EAAE;gBACV,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,mJAAmJ;aACjK;YACD,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,yDAAyD,EAAE;SAC1G;QACD,OAAO,EAAE,oEAAoE;QAC7E,QAAQ,EAAE;YACR,0LAA0L;YAC1L,iMAAiM;YACjM,8UAA8U;YAC9U,wJAAwJ;SACzJ;QACD,QAAQ,EAAE;YACR,+BAA+B;YAC/B,wBAAwB;YACxB,sBAAsB;YACtB,2BAA2B;YAC3B,yBAAyB;SAC1B;QACD,WAAW,EAAE,8FAA8F;QAC3G,aAAa,EAAE;YACb,qCAAqC;YACrC,mCAAmC;YACnC,qCAAqC;YACrC,wCAAwC;SACzC;QACD,QAAQ,EAAE;YACR,uGAAuG;YACvG,sDAAsD;YACtD,mDAAmD;YACnD,sFAAsF;YACtF,4DAA4D;YAC5D,wFAAwF;SACzF;QACD,YAAY,EAAE,CAAC,0BAA0B,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,qBAAqB,CAAC;KAC3G;CACF,CAAC"}
|
|
@@ -336,7 +336,7 @@ class WorkflowDiffEngine {
|
|
|
336
336
|
const node = this.findNode(workflow, operation.nodeId, operation.nodeName);
|
|
337
337
|
if (!node)
|
|
338
338
|
return;
|
|
339
|
-
Object.entries(operation.
|
|
339
|
+
Object.entries(operation.updates).forEach(([path, value]) => {
|
|
340
340
|
this.setNestedProperty(node, path, value);
|
|
341
341
|
});
|
|
342
342
|
}
|
|
@@ -406,17 +406,17 @@ class WorkflowDiffEngine {
|
|
|
406
406
|
type: 'removeConnection',
|
|
407
407
|
source: operation.source,
|
|
408
408
|
target: operation.target,
|
|
409
|
-
sourceOutput: operation.
|
|
410
|
-
targetInput: operation.
|
|
409
|
+
sourceOutput: operation.updates.sourceOutput,
|
|
410
|
+
targetInput: operation.updates.targetInput
|
|
411
411
|
});
|
|
412
412
|
this.applyAddConnection(workflow, {
|
|
413
413
|
type: 'addConnection',
|
|
414
414
|
source: operation.source,
|
|
415
415
|
target: operation.target,
|
|
416
|
-
sourceOutput: operation.
|
|
417
|
-
targetInput: operation.
|
|
418
|
-
sourceIndex: operation.
|
|
419
|
-
targetIndex: operation.
|
|
416
|
+
sourceOutput: operation.updates.sourceOutput,
|
|
417
|
+
targetInput: operation.updates.targetInput,
|
|
418
|
+
sourceIndex: operation.updates.sourceIndex,
|
|
419
|
+
targetIndex: operation.updates.targetIndex
|
|
420
420
|
});
|
|
421
421
|
}
|
|
422
422
|
applyUpdateSettings(workflow, operation) {
|
|
@@ -20,7 +20,7 @@ export interface UpdateNodeOperation extends DiffOperation {
|
|
|
20
20
|
type: 'updateNode';
|
|
21
21
|
nodeId?: string;
|
|
22
22
|
nodeName?: string;
|
|
23
|
-
|
|
23
|
+
updates: {
|
|
24
24
|
[path: string]: any;
|
|
25
25
|
};
|
|
26
26
|
}
|
|
@@ -60,7 +60,7 @@ export interface UpdateConnectionOperation extends DiffOperation {
|
|
|
60
60
|
type: 'updateConnection';
|
|
61
61
|
source: string;
|
|
62
62
|
target: string;
|
|
63
|
-
|
|
63
|
+
updates: {
|
|
64
64
|
sourceOutput?: string;
|
|
65
65
|
targetInput?: string;
|
|
66
66
|
sourceIndex?: number;
|