mirror of
https://github.com/czlonkowski/n8n-mcp.git
synced 2026-04-03 16:13: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:
4
dist/mcp/handlers-workflow-diff.js
vendored
4
dist/mcp/handlers-workflow-diff.js
vendored
@@ -55,7 +55,7 @@ const NODE_TARGETING_OPERATIONS = new Set([
|
||||
]);
|
||||
const workflowDiffSchema = zod_1.z.object({
|
||||
id: zod_1.z.string(),
|
||||
operations: zod_1.z.array(zod_1.z.object({
|
||||
operations: zod_1.z.preprocess(handlers_n8n_manager_1.tryParseJson, zod_1.z.array(zod_1.z.object({
|
||||
type: zod_1.z.string(),
|
||||
description: zod_1.z.string().optional(),
|
||||
node: zod_1.z.any().optional(),
|
||||
@@ -93,7 +93,7 @@ const workflowDiffSchema = zod_1.z.object({
|
||||
}
|
||||
}
|
||||
return op;
|
||||
})),
|
||||
}))),
|
||||
validateOnly: zod_1.z.boolean().optional(),
|
||||
continueOnError: zod_1.z.boolean().optional(),
|
||||
createBackup: zod_1.z.boolean().optional(),
|
||||
|
||||
Reference in New Issue
Block a user