mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-01-30 06:22:04 +00:00
chore: update n8n to 2.1.4 and bump version to 2.31.2 (#507)
- Updated n8n from 2.0.2 to 2.1.4 - Updated n8n-core from 2.0.1 to 2.1.3 - Updated n8n-workflow from 2.0.1 to 2.1.1 - Updated @n8n/n8n-nodes-langchain from 2.0.1 to 2.1.3 - Rebuilt node database with 540 nodes (434 from n8n-nodes-base, 106 from @n8n/n8n-nodes-langchain) - Refreshed template database with 2,737 workflow templates from n8n.io - Updated README badge with new n8n version - Updated CHANGELOG with dependency changes Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Romuald Członkowski <romualdczlonkowski@MacBook-Pro-Romuald.local> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
705d31c35e
commit
20663dad0d
11
CHANGELOG.md
11
CHANGELOG.md
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [2.31.2] - 2025-12-24
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Updated n8n from 2.0.2 to 2.1.4
|
||||||
|
- Updated n8n-core from 2.0.1 to 2.1.3
|
||||||
|
- Updated n8n-workflow from 2.0.1 to 2.1.1
|
||||||
|
- Updated @n8n/n8n-nodes-langchain from 2.0.1 to 2.1.3
|
||||||
|
- Rebuilt node database with 540 nodes (434 from n8n-nodes-base, 106 from @n8n/n8n-nodes-langchain)
|
||||||
|
- Refreshed template database with 2,737 workflow templates from n8n.io
|
||||||
|
|
||||||
## [2.31.1] - 2025-12-23
|
## [2.31.1] - 2025-12-23
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
[](https://www.npmjs.com/package/n8n-mcp)
|
[](https://www.npmjs.com/package/n8n-mcp)
|
||||||
[](https://codecov.io/gh/czlonkowski/n8n-mcp)
|
[](https://codecov.io/gh/czlonkowski/n8n-mcp)
|
||||||
[](https://github.com/czlonkowski/n8n-mcp/actions)
|
[](https://github.com/czlonkowski/n8n-mcp/actions)
|
||||||
[](https://github.com/n8n-io/n8n)
|
[](https://github.com/n8n-io/n8n)
|
||||||
[](https://github.com/czlonkowski/n8n-mcp/pkgs/container/n8n-mcp)
|
[](https://github.com/czlonkowski/n8n-mcp/pkgs/container/n8n-mcp)
|
||||||
[](https://railway.com/deploy/n8n-mcp?referralCode=n8n-mcp)
|
[](https://railway.com/deploy/n8n-mcp?referralCode=n8n-mcp)
|
||||||
|
|
||||||
|
|||||||
BIN
data/nodes.db
BIN
data/nodes.db
Binary file not shown.
2
dist/mcp/handlers-n8n-manager.d.ts.map
vendored
2
dist/mcp/handlers-n8n-manager.d.ts.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"handlers-n8n-manager.d.ts","sourceRoot":"","sources":["../../src/mcp/handlers-n8n-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAML,eAAe,EAGhB,MAAM,kBAAkB,CAAC;AAkB1B,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAA2B,MAAM,2BAA2B,CAAC;AAOrF,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAqNhE,wBAAgB,0BAA0B,IAAI,MAAM,CAEnD;AAMD,wBAAgB,uBAAuB,gDAEtC;AAKD,wBAAgB,kBAAkB,IAAI,IAAI,CAIzC;AAED,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,YAAY,GAAG,IAAI,CAgF9E;AAqHD,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,C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e,CAAC,CAoM1B;AAQD,wBAAsB,4BAA4B,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAyErH"}
|
||||||
29
dist/mcp/handlers-n8n-manager.js
vendored
29
dist/mcp/handlers-n8n-manager.js
vendored
@@ -1024,14 +1024,18 @@ async function handleGetExecution(args, context) {
|
|||||||
const client = ensureApiConfigured(context);
|
const client = ensureApiConfigured(context);
|
||||||
const schema = zod_1.z.object({
|
const schema = zod_1.z.object({
|
||||||
id: zod_1.z.string(),
|
id: zod_1.z.string(),
|
||||||
mode: zod_1.z.enum(['preview', 'summary', 'filtered', 'full']).optional(),
|
mode: zod_1.z.enum(['preview', 'summary', 'filtered', 'full', 'error']).optional(),
|
||||||
nodeNames: zod_1.z.array(zod_1.z.string()).optional(),
|
nodeNames: zod_1.z.array(zod_1.z.string()).optional(),
|
||||||
itemsLimit: zod_1.z.number().optional(),
|
itemsLimit: zod_1.z.number().optional(),
|
||||||
includeInputData: zod_1.z.boolean().optional(),
|
includeInputData: zod_1.z.boolean().optional(),
|
||||||
includeData: zod_1.z.boolean().optional()
|
includeData: zod_1.z.boolean().optional(),
|
||||||
|
errorItemsLimit: zod_1.z.number().min(0).max(100).optional(),
|
||||||
|
includeStackTrace: zod_1.z.boolean().optional(),
|
||||||
|
includeExecutionPath: zod_1.z.boolean().optional(),
|
||||||
|
fetchWorkflow: zod_1.z.boolean().optional()
|
||||||
});
|
});
|
||||||
const params = schema.parse(args);
|
const params = schema.parse(args);
|
||||||
const { id, mode, nodeNames, itemsLimit, includeInputData, includeData } = params;
|
const { id, mode, nodeNames, itemsLimit, includeInputData, includeData, errorItemsLimit, includeStackTrace, includeExecutionPath, fetchWorkflow } = params;
|
||||||
let effectiveMode = mode;
|
let effectiveMode = mode;
|
||||||
if (!effectiveMode && includeData !== undefined) {
|
if (!effectiveMode && includeData !== undefined) {
|
||||||
effectiveMode = includeData ? 'summary' : undefined;
|
effectiveMode = includeData ? 'summary' : undefined;
|
||||||
@@ -1044,13 +1048,28 @@ async function handleGetExecution(args, context) {
|
|||||||
data: execution
|
data: execution
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
let workflow;
|
||||||
|
if (effectiveMode === 'error' && fetchWorkflow !== false && execution.workflowId) {
|
||||||
|
try {
|
||||||
|
workflow = await client.getWorkflow(execution.workflowId);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
logger_1.logger.debug('Could not fetch workflow for error analysis', {
|
||||||
|
workflowId: execution.workflowId,
|
||||||
|
error: e instanceof Error ? e.message : 'Unknown error'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
const filterOptions = {
|
const filterOptions = {
|
||||||
mode: effectiveMode,
|
mode: effectiveMode,
|
||||||
nodeNames,
|
nodeNames,
|
||||||
itemsLimit,
|
itemsLimit,
|
||||||
includeInputData
|
includeInputData,
|
||||||
|
errorItemsLimit,
|
||||||
|
includeStackTrace,
|
||||||
|
includeExecutionPath
|
||||||
};
|
};
|
||||||
const processedExecution = (0, execution_processor_1.processExecution)(execution, filterOptions);
|
const processedExecution = (0, execution_processor_1.processExecution)(execution, filterOptions, workflow);
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
data: processedExecution
|
data: processedExecution
|
||||||
|
|||||||
2
dist/mcp/handlers-n8n-manager.js.map
vendored
2
dist/mcp/handlers-n8n-manager.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -1 +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"}
|
{"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,iBAwG9B,CAAC"}
|
||||||
@@ -6,13 +6,14 @@ exports.n8nExecutionsDoc = {
|
|||||||
category: 'workflow_management',
|
category: 'workflow_management',
|
||||||
essentials: {
|
essentials: {
|
||||||
description: 'Manage workflow executions: get details, list, or delete. Unified tool for all execution operations.',
|
description: 'Manage workflow executions: get details, list, or delete. Unified tool for all execution operations.',
|
||||||
keyParameters: ['action', 'id', 'workflowId', 'status'],
|
keyParameters: ['action', 'id', 'workflowId', 'status', 'mode'],
|
||||||
example: 'n8n_executions({action: "list", workflowId: "abc123", status: "error"})',
|
example: 'n8n_executions({action: "get", id: "exec_456", mode: "error"})',
|
||||||
performance: 'Fast (50-200ms)',
|
performance: 'Fast (50-200ms)',
|
||||||
tips: [
|
tips: [
|
||||||
'action="get": Get execution details by ID',
|
'action="get": Get execution details by ID',
|
||||||
'action="list": List executions with filters',
|
'action="list": List executions with filters',
|
||||||
'action="delete": Delete execution record',
|
'action="delete": Delete execution record',
|
||||||
|
'Use mode="error" for efficient failure debugging (80-90% token savings)',
|
||||||
'Use mode parameter for action=get to control detail level'
|
'Use mode parameter for action=get to control detail level'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -26,14 +27,26 @@ exports.n8nExecutionsDoc = {
|
|||||||
- preview: Structure only, no data
|
- preview: Structure only, no data
|
||||||
- summary: 2 items per node (default)
|
- summary: 2 items per node (default)
|
||||||
- filtered: Custom items limit, optionally filter by node names
|
- filtered: Custom items limit, optionally filter by node names
|
||||||
- full: All execution data (can be very large)`,
|
- full: All execution data (can be very large)
|
||||||
|
- error: Optimized for debugging failures - extracts error info, upstream context, and AI suggestions
|
||||||
|
|
||||||
|
**Error Mode Features:**
|
||||||
|
- Extracts error message, type, and node configuration
|
||||||
|
- Samples input data from upstream node (configurable limit)
|
||||||
|
- Shows execution path leading to error
|
||||||
|
- Provides AI-friendly fix suggestions based on error patterns
|
||||||
|
- Token-efficient (80-90% smaller than full mode)`,
|
||||||
parameters: {
|
parameters: {
|
||||||
action: { type: 'string', required: true, description: 'Operation: "get", "list", or "delete"' },
|
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)' },
|
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"' },
|
mode: { type: 'string', required: false, description: 'For action=get: "preview", "summary" (default), "filtered", "full", "error"' },
|
||||||
nodeNames: { type: 'array', required: false, description: 'For action=get with mode=filtered: Filter to specific nodes by name' },
|
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)' },
|
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)' },
|
includeInputData: { type: 'boolean', required: false, description: 'For action=get: Include input data in addition to output (default: false)' },
|
||||||
|
errorItemsLimit: { type: 'number', required: false, description: 'For action=get with mode=error: Sample items from upstream (default: 2, max: 100)' },
|
||||||
|
includeStackTrace: { type: 'boolean', required: false, description: 'For action=get with mode=error: Include full stack trace (default: false, shows truncated)' },
|
||||||
|
includeExecutionPath: { type: 'boolean', required: false, description: 'For action=get with mode=error: Include execution path (default: true)' },
|
||||||
|
fetchWorkflow: { type: 'boolean', required: false, description: 'For action=get with mode=error: Fetch workflow for accurate upstream detection (default: true)' },
|
||||||
workflowId: { type: 'string', required: false, description: 'For action=list: Filter by workflow ID' },
|
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")' },
|
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)' },
|
limit: { type: 'number', required: false, description: 'For action=list: Number of results (1-100, default: 100)' },
|
||||||
@@ -42,10 +55,15 @@ exports.n8nExecutionsDoc = {
|
|||||||
includeData: { type: 'boolean', required: false, description: 'For action=list: Include execution data (default: false)' }
|
includeData: { type: 'boolean', required: false, description: 'For action=list: Include execution data (default: false)' }
|
||||||
},
|
},
|
||||||
returns: `Depends on action:
|
returns: `Depends on action:
|
||||||
- get: Execution object with data based on mode
|
- get (error mode): { errorInfo: { primaryError, upstreamContext, executionPath, suggestions }, summary }
|
||||||
|
- get (other modes): Execution object with data based on mode
|
||||||
- list: { data: [...executions], nextCursor?: string }
|
- list: { data: [...executions], nextCursor?: string }
|
||||||
- delete: { success: boolean, message: string }`,
|
- delete: { success: boolean, message: string }`,
|
||||||
examples: [
|
examples: [
|
||||||
|
'// Debug a failed execution (recommended for errors)\nn8n_executions({action: "get", id: "exec_456", mode: "error"})',
|
||||||
|
'// Debug with more sample data from upstream\nn8n_executions({action: "get", id: "exec_456", mode: "error", errorItemsLimit: 5})',
|
||||||
|
'// Debug with full stack trace\nn8n_executions({action: "get", id: "exec_456", mode: "error", includeStackTrace: true})',
|
||||||
|
'// Debug without workflow fetch (faster but less accurate)\nn8n_executions({action: "get", id: "exec_456", mode: "error", fetchWorkflow: false})',
|
||||||
'// List recent executions for a workflow\nn8n_executions({action: "list", workflowId: "abc123", limit: 10})',
|
'// List recent executions for a workflow\nn8n_executions({action: "list", workflowId: "abc123", limit: 10})',
|
||||||
'// List failed executions\nn8n_executions({action: "list", status: "error"})',
|
'// List failed executions\nn8n_executions({action: "list", status: "error"})',
|
||||||
'// Get execution summary\nn8n_executions({action: "get", id: "exec_456"})',
|
'// Get execution summary\nn8n_executions({action: "get", id: "exec_456"})',
|
||||||
@@ -54,7 +72,10 @@ exports.n8nExecutionsDoc = {
|
|||||||
'// Delete an execution\nn8n_executions({action: "delete", id: "exec_456"})'
|
'// Delete an execution\nn8n_executions({action: "delete", id: "exec_456"})'
|
||||||
],
|
],
|
||||||
useCases: [
|
useCases: [
|
||||||
'Debug workflow failures (get with mode=full)',
|
'Debug workflow failures efficiently (mode=error) - 80-90% token savings',
|
||||||
|
'Get AI suggestions for fixing common errors',
|
||||||
|
'Analyze input data that caused failure',
|
||||||
|
'Debug workflow failures with full data (mode=full)',
|
||||||
'Monitor workflow health (list with status filter)',
|
'Monitor workflow health (list with status filter)',
|
||||||
'Audit execution history',
|
'Audit execution history',
|
||||||
'Clean up old execution records',
|
'Clean up old execution records',
|
||||||
@@ -63,18 +84,22 @@ exports.n8nExecutionsDoc = {
|
|||||||
performance: `Response times:
|
performance: `Response times:
|
||||||
- list: 50-150ms depending on filters
|
- list: 50-150ms depending on filters
|
||||||
- get (preview/summary): 30-100ms
|
- get (preview/summary): 30-100ms
|
||||||
|
- get (error): 50-200ms (includes optional workflow fetch)
|
||||||
- get (full): 100-500ms+ depending on data size
|
- get (full): 100-500ms+ depending on data size
|
||||||
- delete: 30-80ms`,
|
- delete: 30-80ms`,
|
||||||
bestPractices: [
|
bestPractices: [
|
||||||
'Use mode="summary" (default) for debugging - shows enough data',
|
'Use mode="error" for debugging failed executions - 80-90% token savings vs full',
|
||||||
|
'Use mode="summary" (default) for quick inspection',
|
||||||
'Use mode="filtered" with nodeNames for large workflows',
|
'Use mode="filtered" with nodeNames for large workflows',
|
||||||
'Filter by workflowId when listing to reduce results',
|
'Filter by workflowId when listing to reduce results',
|
||||||
'Use cursor for pagination through large result sets',
|
'Use cursor for pagination through large result sets',
|
||||||
|
'Set fetchWorkflow=false if you already know the workflow structure',
|
||||||
'Delete old executions to save storage'
|
'Delete old executions to save storage'
|
||||||
],
|
],
|
||||||
pitfalls: [
|
pitfalls: [
|
||||||
'Requires N8N_API_URL and N8N_API_KEY configured',
|
'Requires N8N_API_URL and N8N_API_KEY configured',
|
||||||
'mode="full" can return very large responses for complex workflows',
|
'mode="full" can return very large responses for complex workflows',
|
||||||
|
'mode="error" fetches workflow by default (adds ~50-100ms), disable with fetchWorkflow=false',
|
||||||
'Execution must exist or returns 404',
|
'Execution must exist or returns 404',
|
||||||
'Delete is permanent - cannot undo'
|
'Delete is permanent - cannot undo'
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"n8n-executions.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-executions.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAsB;IACjD,IAAI,EAAE,gBAAgB;IACtB,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW,EAAE,sGAAsG;QACnH,aAAa,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,CAAC;QACvD,OAAO,EAAE,yEAAyE;QAClF,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE;YACJ,2CAA2C;YAC3C,6CAA6C;YAC7C,0CAA0C;YAC1C,2DAA2D;SAC5D;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;+CAS8B;QAC3C,UAAU,EAAE;YACV,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uCAAuC,EAAE;YAChG,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,yDAAyD,EAAE;YAC/G,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,oEAAoE,EAAE;YAC5H,SAAS,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,qEAAqE,EAAE;YACjI,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAA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D,QAAQ,EAAE;YACR,yEAAyE;YACzE,6CAA6C;YAC7C,wCAAwC;YACxC,oDAAoD;YACpD,mDAAmD;YACnD,yBAAyB;YACzB,gCAAgC;YAChC,+BAA+B;SAChC;QACD,WAAW,EAAE;;;;;kBAKC;QACd,aAAa,EAAE;YACb,iFAAiF;YACjF,mDAAmD;YACnD,wDAAwD;YACxD,qDAAqD;YACrD,qDAAqD;YACrD,oEAAoE;YACpE,uCAAuC;SACxC;QACD,QAAQ,EAAE;YACR,iDAAiD;YACjD,mEAAmE;YACnE,6FAA6F;YAC7F,qCAAqC;YACrC,mCAAmC;SACpC;QACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,uBAAuB,CAAC;KACjF;CACF,CAAC"}
|
||||||
2
dist/mcp/tools-n8n-manager.d.ts.map
vendored
2
dist/mcp/tools-n8n-manager.d.ts.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"tools-n8n-manager.d.ts","sourceRoot":"","sources":["../../src/mcp/tools-n8n-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAQ1C,eAAO,MAAM,kBAAkB,EAAE,cAAc,EAmf9C,CAAC"}
|
{"version":3,"file":"tools-n8n-manager.d.ts","sourceRoot":"","sources":["../../src/mcp/tools-n8n-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAQ1C,eAAO,MAAM,kBAAkB,EAAE,cAAc,EAogB9C,CAAC"}
|
||||||
20
dist/mcp/tools-n8n-manager.js
vendored
20
dist/mcp/tools-n8n-manager.js
vendored
@@ -336,8 +336,8 @@ exports.n8nManagementTools = [
|
|||||||
},
|
},
|
||||||
mode: {
|
mode: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
enum: ['preview', 'summary', 'filtered', 'full'],
|
enum: ['preview', 'summary', 'filtered', 'full', 'error'],
|
||||||
description: 'For action=get: preview=structure only, summary=2 items (default), filtered=custom, full=all data'
|
description: 'For action=get: preview=structure only, summary=2 items (default), filtered=custom, full=all data, error=optimized error debugging'
|
||||||
},
|
},
|
||||||
nodeNames: {
|
nodeNames: {
|
||||||
type: 'array',
|
type: 'array',
|
||||||
@@ -352,6 +352,22 @@ exports.n8nManagementTools = [
|
|||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
description: 'For action=get: include input data in addition to output (default: false)'
|
description: 'For action=get: include input data in addition to output (default: false)'
|
||||||
},
|
},
|
||||||
|
errorItemsLimit: {
|
||||||
|
type: 'number',
|
||||||
|
description: 'For action=get with mode=error: sample items from upstream node (default: 2, max: 100)'
|
||||||
|
},
|
||||||
|
includeStackTrace: {
|
||||||
|
type: 'boolean',
|
||||||
|
description: 'For action=get with mode=error: include full stack trace (default: false, shows truncated)'
|
||||||
|
},
|
||||||
|
includeExecutionPath: {
|
||||||
|
type: 'boolean',
|
||||||
|
description: 'For action=get with mode=error: include execution path leading to error (default: true)'
|
||||||
|
},
|
||||||
|
fetchWorkflow: {
|
||||||
|
type: 'boolean',
|
||||||
|
description: 'For action=get with mode=error: fetch workflow for accurate upstream detection (default: true)'
|
||||||
|
},
|
||||||
limit: {
|
limit: {
|
||||||
type: 'number',
|
type: 'number',
|
||||||
description: 'For action=list: number of executions to return (1-100, default: 100)'
|
description: 'For action=list: number of executions to return (1-100, default: 100)'
|
||||||
|
|||||||
2
dist/mcp/tools-n8n-manager.js.map
vendored
2
dist/mcp/tools-n8n-manager.js.map
vendored
File diff suppressed because one or more lines are too long
6
dist/services/execution-processor.d.ts
vendored
6
dist/services/execution-processor.d.ts
vendored
@@ -1,8 +1,8 @@
|
|||||||
import { Execution, ExecutionPreview, ExecutionRecommendation, ExecutionFilterOptions, FilteredExecutionResponse } from '../types/n8n-api';
|
import { Execution, ExecutionPreview, ExecutionRecommendation, ExecutionFilterOptions, FilteredExecutionResponse, Workflow } from '../types/n8n-api';
|
||||||
export declare function generatePreview(execution: Execution): {
|
export declare function generatePreview(execution: Execution): {
|
||||||
preview: ExecutionPreview;
|
preview: ExecutionPreview;
|
||||||
recommendation: ExecutionRecommendation;
|
recommendation: ExecutionRecommendation;
|
||||||
};
|
};
|
||||||
export declare function filterExecutionData(execution: Execution, options: ExecutionFilterOptions): FilteredExecutionResponse;
|
export declare function filterExecutionData(execution: Execution, options: ExecutionFilterOptions, workflow?: Workflow): FilteredExecutionResponse;
|
||||||
export declare function processExecution(execution: Execution, options?: ExecutionFilterOptions): FilteredExecutionResponse | Execution;
|
export declare function processExecution(execution: Execution, options?: ExecutionFilterOptions, workflow?: Workflow): FilteredExecutionResponse | Execution;
|
||||||
//# sourceMappingURL=execution-processor.d.ts.map
|
//# sourceMappingURL=execution-processor.d.ts.map
|
||||||
2
dist/services/execution-processor.d.ts.map
vendored
2
dist/services/execution-processor.d.ts.map
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"execution-processor.d.ts","sourceRoot":"","sources":["../../src/services/execution-processor.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,SAAS,EAET,gBAAgB,EAEhB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EAG1B,MAAM,kBAAkB,CAAC;AA+G1B,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG;IACrD,OAAO,EAAE,gBAAgB,CAAC;IAC1B,cAAc,EAAE,uBAAuB,CAAC;CACzC,CA2EA;AAoID,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,sBAAsB,GAC9B,yBAAyB,CA2J3B;AAMD,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,EACpB,OAAO,GAAE,sBAA2B,GACnC,yBAAyB,GAAG,SAAS,CAOvC"}
|
{"version":3,"file":"execution-processor.d.ts","sourceRoot":"","sources":["../../src/services/execution-processor.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,SAAS,EAET,gBAAgB,EAEhB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EAGzB,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAgH1B,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG;IACrD,OAAO,EAAE,gBAAgB,CAAC;IAC1B,cAAc,EAAE,uBAAuB,CAAC;CACzC,CA2EA;AAoID,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,CAAC,EAAE,QAAQ,GAClB,yBAAyB,CAsL3B;AAMD,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,EACpB,OAAO,GAAE,sBAA2B,EACpC,QAAQ,CAAC,EAAE,QAAQ,GAClB,yBAAyB,GAAG,SAAS,CAOvC"}
|
||||||
28
dist/services/execution-processor.js
vendored
28
dist/services/execution-processor.js
vendored
@@ -4,6 +4,7 @@ exports.generatePreview = generatePreview;
|
|||||||
exports.filterExecutionData = filterExecutionData;
|
exports.filterExecutionData = filterExecutionData;
|
||||||
exports.processExecution = processExecution;
|
exports.processExecution = processExecution;
|
||||||
const logger_1 = require("../utils/logger");
|
const logger_1 = require("../utils/logger");
|
||||||
|
const error_execution_processor_1 = require("./error-execution-processor");
|
||||||
const THRESHOLDS = {
|
const THRESHOLDS = {
|
||||||
CHAR_SIZE_BYTES: 2,
|
CHAR_SIZE_BYTES: 2,
|
||||||
OVERHEAD_PER_OBJECT: 50,
|
OVERHEAD_PER_OBJECT: 50,
|
||||||
@@ -231,7 +232,7 @@ function truncateItems(items, limit) {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
function filterExecutionData(execution, options) {
|
function filterExecutionData(execution, options, workflow) {
|
||||||
const mode = options.mode || 'summary';
|
const mode = options.mode || 'summary';
|
||||||
let itemsLimit = options.itemsLimit !== undefined ? options.itemsLimit : 2;
|
let itemsLimit = options.itemsLimit !== undefined ? options.itemsLimit : 2;
|
||||||
if (itemsLimit !== -1) {
|
if (itemsLimit !== -1) {
|
||||||
@@ -265,6 +266,27 @@ function filterExecutionData(execution, options) {
|
|||||||
response.recommendation = recommendation;
|
response.recommendation = recommendation;
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
if (mode === 'error') {
|
||||||
|
const errorAnalysis = (0, error_execution_processor_1.processErrorExecution)(execution, {
|
||||||
|
itemsLimit: options.errorItemsLimit ?? 2,
|
||||||
|
includeStackTrace: options.includeStackTrace ?? false,
|
||||||
|
includeExecutionPath: options.includeExecutionPath !== false,
|
||||||
|
workflow
|
||||||
|
});
|
||||||
|
const runData = execution.data?.resultData?.runData || {};
|
||||||
|
const executedNodes = Object.keys(runData).length;
|
||||||
|
response.errorInfo = errorAnalysis;
|
||||||
|
response.summary = {
|
||||||
|
totalNodes: executedNodes,
|
||||||
|
executedNodes,
|
||||||
|
totalItems: 0,
|
||||||
|
hasMoreData: false
|
||||||
|
};
|
||||||
|
if (execution.data?.resultData?.error) {
|
||||||
|
response.error = execution.data.resultData.error;
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
if (!execution.data?.resultData?.runData) {
|
if (!execution.data?.resultData?.runData) {
|
||||||
response.summary = {
|
response.summary = {
|
||||||
totalNodes: 0,
|
totalNodes: 0,
|
||||||
@@ -350,10 +372,10 @@ function filterExecutionData(execution, options) {
|
|||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
function processExecution(execution, options = {}) {
|
function processExecution(execution, options = {}, workflow) {
|
||||||
if (!options.mode && !options.nodeNames && options.itemsLimit === undefined) {
|
if (!options.mode && !options.nodeNames && options.itemsLimit === undefined) {
|
||||||
return execution;
|
return execution;
|
||||||
}
|
}
|
||||||
return filterExecutionData(execution, options);
|
return filterExecutionData(execution, options, workflow);
|
||||||
}
|
}
|
||||||
//# sourceMappingURL=execution-processor.js.map
|
//# sourceMappingURL=execution-processor.js.map
|
||||||
2
dist/services/execution-processor.js.map
vendored
2
dist/services/execution-processor.js.map
vendored
File diff suppressed because one or more lines are too long
41
dist/types/n8n-api.d.ts
vendored
41
dist/types/n8n-api.d.ts
vendored
@@ -267,7 +267,7 @@ export interface McpToolResponse {
|
|||||||
executionId?: string;
|
executionId?: string;
|
||||||
workflowId?: string;
|
workflowId?: string;
|
||||||
}
|
}
|
||||||
export type ExecutionMode = 'preview' | 'summary' | 'filtered' | 'full';
|
export type ExecutionMode = 'preview' | 'summary' | 'filtered' | 'full' | 'error';
|
||||||
export interface ExecutionPreview {
|
export interface ExecutionPreview {
|
||||||
totalNodes: number;
|
totalNodes: number;
|
||||||
executedNodes: number;
|
executedNodes: number;
|
||||||
@@ -296,6 +296,9 @@ export interface ExecutionFilterOptions {
|
|||||||
itemsLimit?: number;
|
itemsLimit?: number;
|
||||||
includeInputData?: boolean;
|
includeInputData?: boolean;
|
||||||
fieldsToInclude?: string[];
|
fieldsToInclude?: string[];
|
||||||
|
errorItemsLimit?: number;
|
||||||
|
includeStackTrace?: boolean;
|
||||||
|
includeExecutionPath?: boolean;
|
||||||
}
|
}
|
||||||
export interface FilteredExecutionResponse {
|
export interface FilteredExecutionResponse {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -316,6 +319,7 @@ export interface FilteredExecutionResponse {
|
|||||||
};
|
};
|
||||||
nodes?: Record<string, FilteredNodeData>;
|
nodes?: Record<string, FilteredNodeData>;
|
||||||
error?: Record<string, unknown>;
|
error?: Record<string, unknown>;
|
||||||
|
errorInfo?: ErrorAnalysis;
|
||||||
}
|
}
|
||||||
export interface FilteredNodeData {
|
export interface FilteredNodeData {
|
||||||
executionTime?: number;
|
executionTime?: number;
|
||||||
@@ -333,4 +337,39 @@ export interface FilteredNodeData {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
export interface ErrorAnalysis {
|
||||||
|
primaryError: {
|
||||||
|
message: string;
|
||||||
|
errorType: string;
|
||||||
|
nodeName: string;
|
||||||
|
nodeType: string;
|
||||||
|
nodeId?: string;
|
||||||
|
nodeParameters?: Record<string, unknown>;
|
||||||
|
stackTrace?: string;
|
||||||
|
};
|
||||||
|
upstreamContext?: {
|
||||||
|
nodeName: string;
|
||||||
|
nodeType: string;
|
||||||
|
itemCount: number;
|
||||||
|
sampleItems: unknown[];
|
||||||
|
dataStructure: Record<string, unknown>;
|
||||||
|
};
|
||||||
|
executionPath?: Array<{
|
||||||
|
nodeName: string;
|
||||||
|
status: 'success' | 'error' | 'skipped';
|
||||||
|
itemCount: number;
|
||||||
|
executionTime?: number;
|
||||||
|
}>;
|
||||||
|
additionalErrors?: Array<{
|
||||||
|
nodeName: string;
|
||||||
|
message: string;
|
||||||
|
}>;
|
||||||
|
suggestions?: ErrorSuggestion[];
|
||||||
|
}
|
||||||
|
export interface ErrorSuggestion {
|
||||||
|
type: 'fix' | 'investigate' | 'workaround';
|
||||||
|
title: string;
|
||||||
|
description: string;
|
||||||
|
confidence: 'high' | 'medium' | 'low';
|
||||||
|
}
|
||||||
//# sourceMappingURL=n8n-api.d.ts.map
|
//# sourceMappingURL=n8n-api.d.ts.map
|
||||||
2
dist/types/n8n-api.d.ts.map
vendored
2
dist/types/n8n-api.d.ts.map
vendored
File diff suppressed because one or more lines are too long
598
package-lock.json
generated
598
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "n8n-mcp",
|
"name": "n8n-mcp",
|
||||||
"version": "2.31.1",
|
"version": "2.31.2",
|
||||||
"description": "Integration between n8n workflow automation and Model Context Protocol (MCP)",
|
"description": "Integration between n8n workflow automation and Model Context Protocol (MCP)",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
@@ -141,16 +141,16 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@modelcontextprotocol/sdk": "1.20.1",
|
"@modelcontextprotocol/sdk": "1.20.1",
|
||||||
"@n8n/n8n-nodes-langchain": "^2.0.1",
|
"@n8n/n8n-nodes-langchain": "^2.1.3",
|
||||||
"@supabase/supabase-js": "^2.57.4",
|
"@supabase/supabase-js": "^2.57.4",
|
||||||
"dotenv": "^16.5.0",
|
"dotenv": "^16.5.0",
|
||||||
"express": "^5.1.0",
|
"express": "^5.1.0",
|
||||||
"express-rate-limit": "^7.1.5",
|
"express-rate-limit": "^7.1.5",
|
||||||
"form-data": "^4.0.5",
|
"form-data": "^4.0.5",
|
||||||
"lru-cache": "^11.2.1",
|
"lru-cache": "^11.2.1",
|
||||||
"n8n": "^2.0.2",
|
"n8n": "^2.1.4",
|
||||||
"n8n-core": "^2.0.1",
|
"n8n-core": "^2.1.3",
|
||||||
"n8n-workflow": "^2.0.1",
|
"n8n-workflow": "^2.1.1",
|
||||||
"openai": "^4.77.0",
|
"openai": "^4.77.0",
|
||||||
"sql.js": "^1.13.0",
|
"sql.js": "^1.13.0",
|
||||||
"tslib": "^2.6.2",
|
"tslib": "^2.6.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user