mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-04-01 07:03:08 +00:00
feat: add n8n_generate_workflow tool for hosted workflow generation
Add new MCP tool that enables AI-powered workflow generation from natural language descriptions. Uses handler delegation pattern — hosting environments inject a GenerateWorkflowHandler via EngineOptions, self-hosted instances receive a hosted-only informational response. Handler flows through N8NMCPEngine → SingleSessionHTTPServer → N8NDocumentationMCPServer with helpers for createWorkflow, validateWorkflow, autofixWorkflow, and getWorkflow. Includes full tool documentation, tests, and corrected tools overview count. Conceived by Romuald Członkowski - https://www.aiadvisors.pl/en Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
8
dist/services/node-specific-validators.js
vendored
8
dist/services/node-specific-validators.js
vendored
@@ -1317,12 +1317,16 @@ class NodeSpecificValidators {
|
||||
}
|
||||
}
|
||||
if (config.mode === 'manual') {
|
||||
const hasFields = config.values && Object.keys(config.values).length > 0;
|
||||
const hasFieldsViaValues = config.values && Object.keys(config.values).length > 0;
|
||||
const hasFieldsViaAssignments = config.assignments?.assignments
|
||||
&& Array.isArray(config.assignments.assignments)
|
||||
&& config.assignments.assignments.length > 0;
|
||||
const hasFields = hasFieldsViaValues || hasFieldsViaAssignments;
|
||||
if (!hasFields && !config.jsonOutput) {
|
||||
warnings.push({
|
||||
type: 'missing_common',
|
||||
message: 'Set node has no fields configured - will output empty items',
|
||||
suggestion: 'Add fields in the Values section or use JSON mode'
|
||||
suggestion: 'Add field assignments or use JSON mode'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user