chore: add pre-built dist folder for npx usage

This commit is contained in:
thesved
2025-12-04 20:22:02 +02:00
committed by Romuald Członkowski
parent a70d96a373
commit 5057481e70
716 changed files with 48021 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const getNodeDoc: ToolDocumentation;
//# sourceMappingURL=get-node.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-node.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/configuration/get-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,UAAU,EAAE,iBAqFxB,CAAC"}

View File

@@ -0,0 +1,90 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getNodeDoc = void 0;
exports.getNodeDoc = {
name: 'get_node',
category: 'configuration',
essentials: {
description: 'Unified node information tool with progressive detail levels and multiple modes. Get node schema, docs, search properties, or version info.',
keyParameters: ['nodeType', 'detail', 'mode', 'includeTypeInfo', 'includeExamples'],
example: 'get_node({nodeType: "nodes-base.httpRequest", detail: "standard"})',
performance: 'Instant (<10ms) for minimal/standard, moderate for full',
tips: [
'Use detail="standard" (default) for most tasks - shows required fields',
'Use mode="docs" for readable markdown documentation',
'Use mode="search_properties" with propertyQuery to find specific fields',
'Use mode="versions" to check version history and breaking changes',
'Add includeExamples=true to get real-world configuration examples'
]
},
full: {
description: `**Detail Levels (mode="info", default):**
- minimal (~200 tokens): Basic metadata only - nodeType, displayName, description, category
- standard (~1-2K tokens): Essential properties + operations - recommended for most tasks
- full (~3-8K tokens): Complete node schema - use only when standard insufficient
**Operation Modes:**
- info (default): Node schema with configurable detail level
- docs: Readable markdown documentation with examples and patterns
- search_properties: Find specific properties within a node
- versions: List all available versions with breaking changes summary
- compare: Compare two versions with property-level changes
- breaking: Show only breaking changes between versions
- migrations: Show auto-migratable changes between versions`,
parameters: {
nodeType: { type: 'string', required: true, description: 'Full node type with prefix: "nodes-base.httpRequest" or "nodes-langchain.agent"' },
detail: { type: 'string', required: false, description: 'Detail level for mode=info: "minimal", "standard" (default), "full"' },
mode: { type: 'string', required: false, description: 'Operation mode: "info" (default), "docs", "search_properties", "versions", "compare", "breaking", "migrations"' },
includeTypeInfo: { type: 'boolean', required: false, description: 'Include type structure metadata (validation rules, JS types). Adds ~80-120 tokens per property' },
includeExamples: { type: 'boolean', required: false, description: 'Include real-world configuration examples from templates. Adds ~200-400 tokens per example' },
propertyQuery: { type: 'string', required: false, description: 'For mode=search_properties: search term to find properties (e.g., "auth", "header", "body")' },
maxPropertyResults: { type: 'number', required: false, description: 'For mode=search_properties: max results (default 20)' },
fromVersion: { type: 'string', required: false, description: 'For compare/breaking/migrations modes: source version (e.g., "1.0")' },
toVersion: { type: 'string', required: false, description: 'For compare mode: target version (e.g., "2.0"). Defaults to latest' }
},
returns: `Depends on mode:
- info: Node schema with properties based on detail level
- docs: Markdown documentation string
- search_properties: Array of matching property paths with descriptions
- versions: Version history with breaking changes flags
- compare/breaking/migrations: Version comparison details`,
examples: [
'// Standard detail (recommended for AI agents)\nget_node({nodeType: "nodes-base.httpRequest"})',
'// Minimal for quick metadata check\nget_node({nodeType: "nodes-base.slack", detail: "minimal"})',
'// Full detail with examples\nget_node({nodeType: "nodes-base.googleSheets", detail: "full", includeExamples: true})',
'// Get readable documentation\nget_node({nodeType: "nodes-base.webhook", mode: "docs"})',
'// Search for authentication properties\nget_node({nodeType: "nodes-base.httpRequest", mode: "search_properties", propertyQuery: "auth"})',
'// Check version history\nget_node({nodeType: "nodes-base.executeWorkflow", mode: "versions"})',
'// Compare specific versions\nget_node({nodeType: "nodes-base.httpRequest", mode: "compare", fromVersion: "3.0", toVersion: "4.1"})'
],
useCases: [
'Configure nodes for workflow building (use detail=standard)',
'Find specific configuration options (use mode=search_properties)',
'Get human-readable node documentation (use mode=docs)',
'Check for breaking changes before version upgrades (use mode=breaking)',
'Understand complex types with includeTypeInfo=true'
],
performance: `Token costs by detail level:
- minimal: ~200 tokens
- standard: ~1000-2000 tokens (default)
- full: ~3000-8000 tokens
- includeTypeInfo: +80-120 tokens per property
- includeExamples: +200-400 tokens per example
- Version modes: ~400-1200 tokens`,
bestPractices: [
'Start with detail="standard" - it covers 95% of use cases',
'Only use detail="full" if standard is missing required properties',
'Use mode="docs" when explaining nodes to users',
'Combine includeTypeInfo=true for complex nodes (filter, resourceMapper)',
'Check version history before configuring versioned nodes'
],
pitfalls: [
'detail="full" returns large responses (~100KB) - use sparingly',
'Node type must include prefix (nodes-base. or nodes-langchain.)',
'includeExamples only works with mode=info and detail=standard',
'Version modes require nodes with multiple versions in database'
],
relatedTools: ['search_nodes', 'validate_node', 'validate_workflow']
}
};
//# sourceMappingURL=get-node.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-node.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/configuration/get-node.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAsB;IAC3C,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,eAAe;IACzB,UAAU,EAAE;QACV,WAAW,EAAE,6IAA6I;QAC1J,aAAa,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,iBAAiB,EAAE,iBAAiB,CAAC;QACnF,OAAO,EAAE,oEAAoE;QAC7E,WAAW,EAAE,yDAAyD;QACtE,IAAI,EAAE;YACJ,wEAAwE;YACxE,qDAAqD;YACrD,yEAAyE;YACzE,mEAAmE;YACnE,mEAAmE;SACpE;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;;4DAY2C;QACxD,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,iFAAiF,EAAE;YAC5I,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,qEAAqE,EAAE;YAC/H,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,gHAAgH,EAAE;YACxK,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,gGAAgG,EAAE;YACpK,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,4FAA4F,EAAE;YAChK,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,6FAA6F,EAAE;YAC9J,kBAAkB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,sDAAsD,EAAE;YAC5H,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,qEAAqE,EAAE;YACpI,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,oEAAoE,EAAE;SAClI;QACD,OAAO,EAAE;;;;;0DAK6C;QACtD,QAAQ,EAAE;YACR,gGAAgG;YAChG,kGAAkG;YAClG,sHAAsH;YACtH,yFAAyF;YACzF,2IAA2I;YAC3I,gGAAgG;YAChG,qIAAqI;SACtI;QACD,QAAQ,EAAE;YACR,6DAA6D;YAC7D,kEAAkE;YAClE,uDAAuD;YACvD,wEAAwE;YACxE,oDAAoD;SACrD;QACD,WAAW,EAAE;;;;;;kCAMiB;QAC9B,aAAa,EAAE;YACb,2DAA2D;YAC3D,mEAAmE;YACnE,gDAAgD;YAChD,yEAAyE;YACzE,0DAA0D;SAC3D;QACD,QAAQ,EAAE;YACR,gEAAgE;YAChE,iEAAiE;YACjE,+DAA+D;YAC/D,gEAAgE;SACjE;QACD,YAAY,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,mBAAmB,CAAC;KACrE;CACF,CAAC"}

View File

@@ -0,0 +1,2 @@
export { getNodeDoc } from './get-node';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/configuration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}

View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getNodeDoc = void 0;
var get_node_1 = require("./get-node");
Object.defineProperty(exports, "getNodeDoc", { enumerable: true, get: function () { return get_node_1.getNodeDoc; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/configuration/index.ts"],"names":[],"mappings":";;;AAAA,uCAAwC;AAA/B,sGAAA,UAAU,OAAA"}

View File

@@ -0,0 +1,2 @@
export { searchNodesDoc } from './search-nodes';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/discovery/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC"}

6
dist/mcp/tool-docs/discovery/index.js vendored Normal file
View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.searchNodesDoc = void 0;
var search_nodes_1 = require("./search-nodes");
Object.defineProperty(exports, "searchNodesDoc", { enumerable: true, get: function () { return search_nodes_1.searchNodesDoc; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/discovery/index.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAAvC,8GAAA,cAAc,OAAA"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const searchNodesDoc: ToolDocumentation;
//# sourceMappingURL=search-nodes.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"search-nodes.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/discovery/search-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,iBAmD5B,CAAC"}

View File

@@ -0,0 +1,56 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.searchNodesDoc = void 0;
exports.searchNodesDoc = {
name: 'search_nodes',
category: 'discovery',
essentials: {
description: 'Text search across node names and descriptions. Returns most relevant nodes first, with frequently-used nodes (HTTP Request, Webhook, Set, Code, Slack) prioritized in results. Searches all 500+ nodes in the database.',
keyParameters: ['query', 'mode', 'limit'],
example: 'search_nodes({query: "webhook"})',
performance: '<20ms even for complex queries',
tips: [
'OR mode (default): Matches any search word',
'AND mode: Requires all words present',
'FUZZY mode: Handles typos and spelling errors',
'Use quotes for exact phrases: "google sheets"'
]
},
full: {
description: 'Full-text search engine for n8n nodes using SQLite FTS5. Searches across node names, descriptions, and aliases. Results are ranked by relevance with commonly-used nodes given priority. Common nodes include: HTTP Request, Webhook, Set, Code, IF, Switch, Merge, SplitInBatches, Slack, Google Sheets.',
parameters: {
query: { type: 'string', description: 'Search keywords. Use quotes for exact phrases like "google sheets"', required: true },
limit: { type: 'number', description: 'Maximum results to return. Default: 20, Max: 100', required: false },
mode: { type: 'string', description: 'Search mode: "OR" (any word matches, default), "AND" (all words required), "FUZZY" (typo-tolerant)', required: false }
},
returns: 'Array of node objects sorted by relevance score. Each object contains: nodeType, displayName, description, category, relevance score. Common nodes appear first when relevance is similar.',
examples: [
'search_nodes({query: "webhook"}) - Returns Webhook node as top result',
'search_nodes({query: "database"}) - Returns MySQL, Postgres, MongoDB, Redis, etc.',
'search_nodes({query: "google sheets", mode: "AND"}) - Requires both words',
'search_nodes({query: "slak", mode: "FUZZY"}) - Finds Slack despite typo',
'search_nodes({query: "http api"}) - Finds HTTP Request, GraphQL, REST nodes',
'search_nodes({query: "transform data"}) - Finds Set, Code, Function, Item Lists nodes'
],
useCases: [
'Finding nodes when you know partial names',
'Discovering nodes by functionality (e.g., "email", "database", "transform")',
'Handling user typos in node names',
'Finding all nodes related to a service (e.g., "google", "aws", "microsoft")'
],
performance: '<20ms for simple queries, <50ms for complex FUZZY searches. Uses FTS5 index for speed',
bestPractices: [
'Start with single keywords for broadest results',
'Use FUZZY mode when users might misspell node names',
'AND mode works best for 2-3 word searches',
'Combine with get_node after finding the right node'
],
pitfalls: [
'AND mode searches all fields (name, description) not just node names',
'FUZZY mode with very short queries (1-2 chars) may return unexpected results',
'Exact matches in quotes are case-sensitive'
],
relatedTools: ['get_node to configure found nodes', 'search_templates to find workflow examples', 'validate_node to check configurations']
}
};
//# sourceMappingURL=search-nodes.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"search-nodes.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/discovery/search-nodes.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,cAAc;IACpB,QAAQ,EAAE,WAAW;IACrB,UAAU,EAAE;QACV,WAAW,EAAE,0NAA0N;QACvO,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC;QACzC,OAAO,EAAE,kCAAkC;QAC3C,WAAW,EAAE,gCAAgC;QAC7C,IAAI,EAAE;YACJ,4CAA4C;YAC5C,sCAAsC;YACtC,+CAA+C;YAC/C,+CAA+C;SAChD;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,2SAA2S;QACxT,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oEAAoE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC5H,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kDAAkD,EAAE,QAAQ,EAAE,KAAK,EAAE;YAC3G,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oGAAoG,EAAE,QAAQ,EAAE,KAAK,EAAE;SAC7J;QACD,OAAO,EAAE,4LAA4L;QACrM,QAAQ,EAAE;YACR,uEAAuE;YACvE,mFAAmF;YACnF,2EAA2E;YAC3E,yEAAyE;YACzE,6EAA6E;YAC7E,uFAAuF;SACxF;QACD,QAAQ,EAAE;YACR,2CAA2C;YAC3C,6EAA6E;YAC7E,mCAAmC;YACnC,6EAA6E;SAC9E;QACD,WAAW,EAAE,uFAAuF;QACpG,aAAa,EAAE;YACb,iDAAiD;YACjD,qDAAqD;YACrD,2CAA2C;YAC3C,oDAAoD;SACrD;QACD,QAAQ,EAAE;YACR,sEAAsE;YACtE,8EAA8E;YAC9E,4CAA4C;SAC7C;QACD,YAAY,EAAE,CAAC,mCAAmC,EAAE,4CAA4C,EAAE,uCAAuC,CAAC;KAC3I;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const aiAgentsGuide: ToolDocumentation;
//# sourceMappingURL=ai-agents-guide.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ai-agents-guide.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/guides/ai-agents-guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,aAAa,EAAE,iBA8tB3B,CAAC"}

View File

@@ -0,0 +1,739 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.aiAgentsGuide = void 0;
exports.aiAgentsGuide = {
name: 'ai_agents_guide',
category: 'guides',
essentials: {
description: 'Comprehensive guide to building AI Agent workflows in n8n. Covers architecture, connections, tools, validation, and best practices for production AI systems.',
keyParameters: [],
example: 'Use tools_documentation({topic: "ai_agents_guide"}) to access this guide',
performance: 'N/A - Documentation only',
tips: [
'Start with Chat Trigger → AI Agent → Language Model pattern',
'Always connect language model BEFORE enabling AI Agent',
'Use proper toolDescription for all AI tools (15+ characters)',
'Validate workflows with n8n_validate_workflow before deployment',
'Use includeExamples=true when searching for AI nodes',
'Check FINAL_AI_VALIDATION_SPEC.md for detailed requirements'
]
},
full: {
description: `# Complete Guide to AI Agents in n8n
This comprehensive guide covers everything you need to build production-ready AI Agent workflows in n8n.
## Table of Contents
1. [AI Agent Architecture](#architecture)
2. [Essential Connection Types](#connections)
3. [Building Your First AI Agent](#first-agent)
4. [AI Tools Deep Dive](#tools)
5. [Advanced Patterns](#advanced)
6. [Validation & Best Practices](#validation)
7. [Troubleshooting](#troubleshooting)
---
## 1. AI Agent Architecture {#architecture}
### Core Components
An n8n AI Agent workflow typically consists of:
1. **Chat Trigger**: Entry point for user interactions
- Webhook-based or manual trigger
- Supports streaming responses (responseMode)
- Passes user message to AI Agent
2. **AI Agent**: The orchestrator
- Manages conversation flow
- Decides when to use tools
- Iterates until task is complete
- Supports fallback models for reliability
3. **Language Model**: The AI brain
- OpenAI GPT-4, Claude, Gemini, etc.
- Connected via ai_languageModel port
- Can have primary + fallback for reliability
4. **Tools**: AI Agent's capabilities
- HTTP Request, Code, Vector Store, etc.
- Connected via ai_tool port
- Each tool needs clear toolDescription
5. **Optional Components**:
- Memory (conversation history)
- Output Parser (structured responses)
- Vector Store (knowledge retrieval)
### Connection Flow
**CRITICAL**: AI connections flow TO the consumer (reversed from standard n8n):
\`\`\`
Standard n8n: [Source] --main--> [Target]
AI pattern: [Language Model] --ai_languageModel--> [AI Agent]
[HTTP Tool] --ai_tool--> [AI Agent]
\`\`\`
This is why you use \`sourceOutput: "ai_languageModel"\` when connecting components.
---
## 2. Essential Connection Types {#connections}
### The 8 AI Connection Types
1. **ai_languageModel**
- FROM: OpenAI Chat Model, Anthropic, Google Gemini, etc.
- TO: AI Agent, Basic LLM Chain
- REQUIRED: Every AI Agent needs 1-2 language models
- Example: \`{type: "addConnection", source: "OpenAI", target: "AI Agent", sourceOutput: "ai_languageModel"}\`
2. **ai_tool**
- FROM: Any tool node (HTTP Request Tool, Code Tool, etc.)
- TO: AI Agent
- REQUIRED: At least 1 tool recommended
- Example: \`{type: "addConnection", source: "HTTP Request Tool", target: "AI Agent", sourceOutput: "ai_tool"}\`
3. **ai_memory**
- FROM: Window Buffer Memory, Conversation Summary, etc.
- TO: AI Agent
- OPTIONAL: 0-1 memory system
- Enables conversation history tracking
4. **ai_outputParser**
- FROM: Structured Output Parser, JSON Parser, etc.
- TO: AI Agent
- OPTIONAL: For structured responses
- Must set hasOutputParser=true on AI Agent
5. **ai_embedding**
- FROM: Embeddings OpenAI, Embeddings Google, etc.
- TO: Vector Store (Pinecone, In-Memory, etc.)
- REQUIRED: For vector-based retrieval
6. **ai_vectorStore**
- FROM: Vector Store node
- TO: Vector Store Tool
- REQUIRED: For retrieval-augmented generation (RAG)
7. **ai_document**
- FROM: Document Loader, Default Data Loader
- TO: Vector Store
- REQUIRED: Provides data for vector storage
8. **ai_textSplitter**
- FROM: Text Splitter nodes
- TO: Document processing chains
- OPTIONAL: Chunk large documents
### Connection Examples
\`\`\`typescript
// Basic AI Agent setup
n8n_update_partial_workflow({
id: "workflow_id",
operations: [
// Connect language model (REQUIRED)
{
type: "addConnection",
source: "OpenAI Chat Model",
target: "AI Agent",
sourceOutput: "ai_languageModel"
},
// Connect tools
{
type: "addConnection",
source: "HTTP Request Tool",
target: "AI Agent",
sourceOutput: "ai_tool"
},
{
type: "addConnection",
source: "Code Tool",
target: "AI Agent",
sourceOutput: "ai_tool"
},
// Add memory (optional)
{
type: "addConnection",
source: "Window Buffer Memory",
target: "AI Agent",
sourceOutput: "ai_memory"
}
]
})
\`\`\`
---
## 3. Building Your First AI Agent {#first-agent}
### Step-by-Step Tutorial
#### Step 1: Create Chat Trigger
Use \`n8n_create_workflow\` or manually create a workflow with:
\`\`\`typescript
{
name: "My First AI Agent",
nodes: [
{
id: "chat_trigger",
name: "Chat Trigger",
type: "@n8n/n8n-nodes-langchain.chatTrigger",
position: [100, 100],
parameters: {
options: {
responseMode: "lastNode" // or "streaming" for real-time
}
}
}
],
connections: {}
}
\`\`\`
#### Step 2: Add Language Model
\`\`\`typescript
n8n_update_partial_workflow({
id: "workflow_id",
operations: [
{
type: "addNode",
node: {
name: "OpenAI Chat Model",
type: "@n8n/n8n-nodes-langchain.lmChatOpenAi",
position: [300, 50],
parameters: {
model: "gpt-4",
temperature: 0.7
}
}
}
]
})
\`\`\`
#### Step 3: Add AI Agent
\`\`\`typescript
n8n_update_partial_workflow({
id: "workflow_id",
operations: [
{
type: "addNode",
node: {
name: "AI Agent",
type: "@n8n/n8n-nodes-langchain.agent",
position: [300, 150],
parameters: {
promptType: "auto",
systemMessage: "You are a helpful assistant. Be concise and accurate."
}
}
}
]
})
\`\`\`
#### Step 4: Connect Components
\`\`\`typescript
n8n_update_partial_workflow({
id: "workflow_id",
operations: [
// Chat Trigger → AI Agent (main connection)
{
type: "addConnection",
source: "Chat Trigger",
target: "AI Agent"
},
// Language Model → AI Agent (AI connection)
{
type: "addConnection",
source: "OpenAI Chat Model",
target: "AI Agent",
sourceOutput: "ai_languageModel"
}
]
})
\`\`\`
#### Step 5: Validate
\`\`\`typescript
n8n_validate_workflow({id: "workflow_id"})
\`\`\`
---
## 4. AI Tools Deep Dive {#tools}
### Tool Types and When to Use Them
#### 1. HTTP Request Tool
**Use when**: AI needs to call external APIs
**Critical Requirements**:
- \`toolDescription\`: Clear, 15+ character description
- \`url\`: API endpoint (can include placeholders)
- \`placeholderDefinitions\`: Define all {placeholders}
- Proper authentication if needed
**Example**:
\`\`\`typescript
{
type: "addNode",
node: {
name: "GitHub Issues Tool",
type: "@n8n/n8n-nodes-langchain.toolHttpRequest",
position: [500, 100],
parameters: {
method: "POST",
url: "https://api.github.com/repos/{owner}/{repo}/issues",
toolDescription: "Create GitHub issues. Requires owner (username), repo (repository name), title, and body.",
placeholderDefinitions: {
values: [
{name: "owner", description: "Repository owner username"},
{name: "repo", description: "Repository name"},
{name: "title", description: "Issue title"},
{name: "body", description: "Issue description"}
]
},
sendBody: true,
jsonBody: "={{ { title: $json.title, body: $json.body } }}"
}
}
}
\`\`\`
#### 2. Code Tool
**Use when**: AI needs to run custom logic
**Critical Requirements**:
- \`name\`: Function name (alphanumeric + underscore)
- \`description\`: 10+ character explanation
- \`code\`: JavaScript or Python code
- \`inputSchema\`: Define expected inputs (recommended)
**Example**:
\`\`\`typescript
{
type: "addNode",
node: {
name: "Calculate Shipping",
type: "@n8n/n8n-nodes-langchain.toolCode",
position: [500, 200],
parameters: {
name: "calculate_shipping",
description: "Calculate shipping cost based on weight (kg) and distance (km)",
language: "javaScript",
code: "const cost = 5 + ($input.weight * 2) + ($input.distance * 0.1); return { cost };",
specifyInputSchema: true,
inputSchema: "{ \\"type\\": \\"object\\", \\"properties\\": { \\"weight\\": { \\"type\\": \\"number\\" }, \\"distance\\": { \\"type\\": \\"number\\" } } }"
}
}
}
\`\`\`
#### 3. Vector Store Tool
**Use when**: AI needs to search knowledge base
**Setup**: Requires Vector Store + Embeddings + Documents
**Example**:
\`\`\`typescript
// Step 1: Create Vector Store with embeddings and documents
n8n_update_partial_workflow({
operations: [
{type: "addConnection", source: "Embeddings OpenAI", target: "Pinecone", sourceOutput: "ai_embedding"},
{type: "addConnection", source: "Document Loader", target: "Pinecone", sourceOutput: "ai_document"}
]
})
// Step 2: Connect Vector Store to Vector Store Tool
n8n_update_partial_workflow({
operations: [
{type: "addConnection", source: "Pinecone", target: "Vector Store Tool", sourceOutput: "ai_vectorStore"}
]
})
// Step 3: Connect tool to AI Agent
n8n_update_partial_workflow({
operations: [
{type: "addConnection", source: "Vector Store Tool", target: "AI Agent", sourceOutput: "ai_tool"}
]
})
\`\`\`
#### 4. AI Agent Tool (Sub-Agents)
**Use when**: Need specialized expertise
**Example**: Research specialist sub-agent
\`\`\`typescript
{
type: "addNode",
node: {
name: "Research Specialist",
type: "@n8n/n8n-nodes-langchain.agentTool",
position: [500, 300],
parameters: {
name: "research_specialist",
description: "Expert researcher that searches multiple sources and synthesizes information. Use for detailed research tasks.",
systemMessage: "You are a research specialist. Search thoroughly, cite sources, and provide comprehensive analysis."
}
}
}
\`\`\`
#### 5. MCP Client Tool
**Use when**: Need to use Model Context Protocol servers
**Example**: Filesystem access
\`\`\`typescript
{
type: "addNode",
node: {
name: "Filesystem Tool",
type: "@n8n/n8n-nodes-langchain.mcpClientTool",
position: [500, 400],
parameters: {
description: "Access file system to read files, list directories, and search content",
mcpServer: {
transport: "stdio",
command: "npx",
args: ["-y", "@modelcontextprotocol/server-filesystem", "/allowed/path"]
},
tool: "read_file"
}
}
}
\`\`\`
---
## 5. Advanced Patterns {#advanced}
### Pattern 1: Streaming Responses
For real-time user experience:
\`\`\`typescript
// Set Chat Trigger to streaming mode
{
parameters: {
options: {
responseMode: "streaming"
}
}
}
// CRITICAL: AI Agent must NOT have main output connections in streaming mode
// Responses stream back through Chat Trigger automatically
\`\`\`
**Validation will fail if**:
- Chat Trigger has streaming but target is not AI Agent
- AI Agent in streaming mode has main output connections
### Pattern 2: Fallback Language Models
For production reliability with fallback language models:
\`\`\`typescript
n8n_update_partial_workflow({
operations: [
// Primary model
{
type: "addConnection",
source: "OpenAI GPT-4",
target: "AI Agent",
sourceOutput: "ai_languageModel",
targetIndex: 0
},
// Fallback model
{
type: "addConnection",
source: "Anthropic Claude",
target: "AI Agent",
sourceOutput: "ai_languageModel",
targetIndex: 1
}
]
})
// Enable fallback on AI Agent
{
type: "updateNode",
nodeName: "AI Agent",
updates: {
"parameters.needsFallback": true
}
}
\`\`\`
### Pattern 3: RAG (Retrieval-Augmented Generation)
Complete knowledge base setup:
\`\`\`typescript
// 1. Load documents
{type: "addConnection", source: "PDF Loader", target: "Text Splitter", sourceOutput: "ai_document"}
// 2. Split and embed
{type: "addConnection", source: "Text Splitter", target: "Vector Store"}
{type: "addConnection", source: "Embeddings", target: "Vector Store", sourceOutput: "ai_embedding"}
// 3. Create search tool
{type: "addConnection", source: "Vector Store", target: "Vector Store Tool", sourceOutput: "ai_vectorStore"}
// 4. Give tool to agent
{type: "addConnection", source: "Vector Store Tool", target: "AI Agent", sourceOutput: "ai_tool"}
\`\`\`
### Pattern 4: Multi-Agent Systems
Specialized sub-agents for complex tasks:
\`\`\`typescript
// Create sub-agents with specific expertise
[
{name: "research_agent", description: "Deep research specialist"},
{name: "data_analyst", description: "Data analysis expert"},
{name: "writer_agent", description: "Content writing specialist"}
].forEach(agent => {
// Add as AI Agent Tool to main coordinator agent
{
type: "addConnection",
source: agent.name,
target: "Coordinator Agent",
sourceOutput: "ai_tool"
}
})
\`\`\`
---
## 6. Validation & Best Practices {#validation}
### Always Validate Before Deployment
\`\`\`typescript
const result = n8n_validate_workflow({id: "workflow_id"})
if (!result.valid) {
console.log("Errors:", result.errors)
console.log("Warnings:", result.warnings)
console.log("Suggestions:", result.suggestions)
}
\`\`\`
### Common Validation Errors
1. **MISSING_LANGUAGE_MODEL**
- Problem: AI Agent has no ai_languageModel connection
- Fix: Connect a language model before creating AI Agent
2. **MISSING_TOOL_DESCRIPTION**
- Problem: HTTP Request Tool has no toolDescription
- Fix: Add clear description (15+ characters)
3. **STREAMING_WITH_MAIN_OUTPUT**
- Problem: AI Agent in streaming mode has outgoing main connections
- Fix: Remove main connections when using streaming
4. **FALLBACK_MISSING_SECOND_MODEL**
- Problem: needsFallback=true but only 1 language model
- Fix: Add second language model or disable needsFallback
### Best Practices Checklist
✅ **Before Creating AI Agent**:
- [ ] Language model is connected first
- [ ] At least one tool is prepared (or will be added)
- [ ] System message is thoughtful and specific
✅ **For Each Tool**:
- [ ] Has toolDescription/description (15+ characters)
- [ ] toolDescription explains WHEN to use the tool
- [ ] All required parameters are configured
- [ ] Credentials are set up if needed
✅ **For Production**:
- [ ] Workflow validated with n8n_validate_workflow
- [ ] Tested with real user queries
- [ ] Fallback model configured for reliability
- [ ] Error handling in place
- [ ] maxIterations set appropriately (default 10, max 50)
---
## 7. Troubleshooting {#troubleshooting}
### Problem: "AI Agent has no language model"
**Cause**: Connection created AFTER AI Agent or using wrong sourceOutput
**Solution**:
\`\`\`typescript
n8n_update_partial_workflow({
operations: [
{
type: "addConnection",
source: "OpenAI Chat Model",
target: "AI Agent",
sourceOutput: "ai_languageModel" // ← CRITICAL
}
]
})
\`\`\`
### Problem: "Tool has no description"
**Cause**: HTTP Request Tool or Code Tool missing toolDescription/description
**Solution**:
\`\`\`typescript
{
type: "updateNode",
nodeName: "HTTP Request Tool",
updates: {
"parameters.toolDescription": "Call weather API to get current conditions for a city"
}
}
\`\`\`
### Problem: "Streaming mode not working"
**Causes**:
1. Chat Trigger not set to streaming
2. AI Agent has main output connections
3. Target of Chat Trigger is not AI Agent
**Solution**:
\`\`\`typescript
// 1. Set Chat Trigger to streaming
{
type: "updateNode",
nodeName: "Chat Trigger",
updates: {
"parameters.options.responseMode": "streaming"
}
}
// 2. Remove AI Agent main outputs
{
type: "removeConnection",
source: "AI Agent",
target: "Any Output Node"
}
\`\`\`
### Problem: "Agent keeps looping"
**Cause**: Tool not returning proper response or agent stuck in reasoning loop
**Solutions**:
1. Set maxIterations lower: \`"parameters.maxIterations": 5\`
2. Improve tool descriptions to be more specific
3. Add system message guidance: "Use tools efficiently, don't repeat actions"
---
## Quick Reference
### Essential Tools
| Tool | Purpose | Key Parameters |
|------|---------|----------------|
| HTTP Request Tool | API calls | toolDescription, url, placeholders |
| Code Tool | Custom logic | name, description, code, inputSchema |
| Vector Store Tool | Knowledge search | description, topK |
| AI Agent Tool | Sub-agents | name, description, systemMessage |
| MCP Client Tool | MCP protocol | description, mcpServer, tool |
### Connection Quick Codes
\`\`\`typescript
// Language Model → AI Agent
sourceOutput: "ai_languageModel"
// Tool → AI Agent
sourceOutput: "ai_tool"
// Memory → AI Agent
sourceOutput: "ai_memory"
// Parser → AI Agent
sourceOutput: "ai_outputParser"
// Embeddings → Vector Store
sourceOutput: "ai_embedding"
// Vector Store → Vector Store Tool
sourceOutput: "ai_vectorStore"
\`\`\`
### Validation Command
\`\`\`typescript
n8n_validate_workflow({id: "workflow_id"})
\`\`\`
---
## Related Resources
- **FINAL_AI_VALIDATION_SPEC.md**: Complete validation rules
- **n8n_update_partial_workflow**: Workflow modification tool
- **search_nodes({query: "AI", includeExamples: true})**: Find AI nodes with examples
- **get_node({nodeType: "...", detail: "standard", includeExamples: true})**: Node details with examples
---
*This guide is part of the n8n-mcp documentation system. For questions or issues, refer to the validation spec or use tools_documentation() for specific topics.*`,
parameters: {},
returns: 'Complete AI Agents guide with architecture, patterns, validation, and troubleshooting',
examples: [
'tools_documentation({topic: "ai_agents_guide"}) - Full guide',
'tools_documentation({topic: "ai_agents_guide", depth: "essentials"}) - Quick reference',
'When user asks about AI Agents, Chat Trigger, or building AI workflows → Point to this guide'
],
useCases: [
'Learning AI Agent architecture in n8n',
'Understanding AI connection types and patterns',
'Building first AI Agent workflow step-by-step',
'Implementing advanced patterns (streaming, fallback, RAG, multi-agent)',
'Troubleshooting AI workflow issues',
'Validating AI workflows before deployment',
'Quick reference for connection types and tools'
],
performance: 'N/A - Static documentation',
bestPractices: [
'Reference this guide when users ask about AI Agents',
'Point to specific sections based on user needs',
'Combine with search_nodes(includeExamples=true) for working examples',
'Validate workflows after following guide instructions',
'Use FINAL_AI_VALIDATION_SPEC.md for detailed requirements'
],
pitfalls: [
'This is a guide, not an executable tool',
'Always validate workflows after making changes',
'AI connections require sourceOutput parameter',
'Streaming mode has specific constraints',
'Fallback models require AI Agent node with fallback support'
],
relatedTools: [
'n8n_create_workflow',
'n8n_update_partial_workflow',
'n8n_validate_workflow',
'search_nodes',
'get_node'
]
}
};
//# sourceMappingURL=ai-agents-guide.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ai-agents-guide.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/guides/ai-agents-guide.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAsB;IAC9C,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE;QACV,WAAW,EAAE,+JAA+J;QAC5K,aAAa,EAAE,EAAE;QACjB,OAAO,EAAE,0EAA0E;QACnF,WAAW,EAAE,0BAA0B;QACvC,IAAI,EAAE;YACJ,6DAA6D;YAC7D,wDAAwD;YACxD,8DAA8D;YAC9D,iEAAiE;YACjE,sDAAsD;YACtD,6DAA6D;SAC9D;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kKAoqBiJ;QAC9J,UAAU,EAAE,EAAE;QACd,OAAO,EAAE,uFAAuF;QAChG,QAAQ,EAAE;YACR,8DAA8D;YAC9D,wFAAwF;YACxF,8FAA8F;SAC/F;QACD,QAAQ,EAAE;YACR,uCAAuC;YACvC,gDAAgD;YAChD,+CAA+C;YAC/C,wEAAwE;YACxE,oCAAoC;YACpC,2CAA2C;YAC3C,gDAAgD;SACjD;QACD,WAAW,EAAE,4BAA4B;QACzC,aAAa,EAAE;YACb,qDAAqD;YACrD,gDAAgD;YAChD,sEAAsE;YACtE,uDAAuD;YACvD,2DAA2D;SAC5D;QACD,QAAQ,EAAE;YACR,yCAAyC;YACzC,gDAAgD;YAChD,+CAA+C;YAC/C,yCAAyC;YACzC,6DAA6D;SAC9D;QACD,YAAY,EAAE;YACZ,qBAAqB;YACrB,6BAA6B;YAC7B,uBAAuB;YACvB,cAAc;YACd,UAAU;SACX;KACF;CACF,CAAC"}

2
dist/mcp/tool-docs/guides/index.d.ts vendored Normal file
View File

@@ -0,0 +1,2 @@
export { aiAgentsGuide } from './ai-agents-guide';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/guides/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}

6
dist/mcp/tool-docs/guides/index.js vendored Normal file
View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.aiAgentsGuide = void 0;
var ai_agents_guide_1 = require("./ai-agents-guide");
Object.defineProperty(exports, "aiAgentsGuide", { enumerable: true, get: function () { return ai_agents_guide_1.aiAgentsGuide; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/guides/index.ts"],"names":[],"mappings":";;;AACA,qDAAkD;AAAzC,gHAAA,aAAa,OAAA"}

4
dist/mcp/tool-docs/index.d.ts vendored Normal file
View File

@@ -0,0 +1,4 @@
import { ToolDocumentation } from './types';
export declare const toolsDocumentation: Record<string, ToolDocumentation>;
export type { ToolDocumentation } from './types';
//# sourceMappingURL=index.d.ts.map

1
dist/mcp/tool-docs/index.d.ts.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mcp/tool-docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AA4B5C,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAmChE,CAAC;AAGF,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}

34
dist/mcp/tool-docs/index.js vendored Normal file
View File

@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toolsDocumentation = void 0;
const discovery_1 = require("./discovery");
const configuration_1 = require("./configuration");
const validation_1 = require("./validation");
const templates_1 = require("./templates");
const system_1 = require("./system");
const guides_1 = require("./guides");
const workflow_management_1 = require("./workflow_management");
exports.toolsDocumentation = {
tools_documentation: system_1.toolsDocumentationDoc,
n8n_health_check: system_1.n8nHealthCheckDoc,
ai_agents_guide: guides_1.aiAgentsGuide,
search_nodes: discovery_1.searchNodesDoc,
get_node: configuration_1.getNodeDoc,
validate_node: validation_1.validateNodeDoc,
validate_workflow: validation_1.validateWorkflowDoc,
get_template: templates_1.getTemplateDoc,
search_templates: templates_1.searchTemplatesDoc,
n8n_create_workflow: workflow_management_1.n8nCreateWorkflowDoc,
n8n_get_workflow: workflow_management_1.n8nGetWorkflowDoc,
n8n_update_full_workflow: workflow_management_1.n8nUpdateFullWorkflowDoc,
n8n_update_partial_workflow: workflow_management_1.n8nUpdatePartialWorkflowDoc,
n8n_delete_workflow: workflow_management_1.n8nDeleteWorkflowDoc,
n8n_list_workflows: workflow_management_1.n8nListWorkflowsDoc,
n8n_validate_workflow: workflow_management_1.n8nValidateWorkflowDoc,
n8n_autofix_workflow: workflow_management_1.n8nAutofixWorkflowDoc,
n8n_test_workflow: workflow_management_1.n8nTestWorkflowDoc,
n8n_executions: workflow_management_1.n8nExecutionsDoc,
n8n_workflow_versions: workflow_management_1.n8nWorkflowVersionsDoc,
n8n_deploy_template: workflow_management_1.n8nDeployTemplateDoc
};
//# sourceMappingURL=index.js.map

1
dist/mcp/tool-docs/index.js.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mcp/tool-docs/index.ts"],"names":[],"mappings":";;;AAGA,2CAA6C;AAC7C,mDAA6C;AAC7C,6CAAoE;AACpE,2CAAiE;AACjE,qCAGkB;AAClB,qCAAyC;AACzC,+DAa+B;AAGlB,QAAA,kBAAkB,GAAsC;IAEnE,mBAAmB,EAAE,8BAAqB;IAC1C,gBAAgB,EAAE,0BAAiB;IAGnC,eAAe,EAAE,sBAAa;IAG9B,YAAY,EAAE,0BAAc;IAG5B,QAAQ,EAAE,0BAAU;IAGpB,aAAa,EAAE,4BAAe;IAC9B,iBAAiB,EAAE,gCAAmB;IAGtC,YAAY,EAAE,0BAAc;IAC5B,gBAAgB,EAAE,8BAAkB;IAGpC,mBAAmB,EAAE,0CAAoB;IACzC,gBAAgB,EAAE,uCAAiB;IACnC,wBAAwB,EAAE,8CAAwB;IAClD,2BAA2B,EAAE,iDAA2B;IACxD,mBAAmB,EAAE,0CAAoB;IACzC,kBAAkB,EAAE,yCAAmB;IACvC,qBAAqB,EAAE,4CAAsB;IAC7C,oBAAoB,EAAE,2CAAqB;IAC3C,iBAAiB,EAAE,wCAAkB;IACrC,cAAc,EAAE,sCAAgB;IAChC,qBAAqB,EAAE,4CAAsB;IAC7C,mBAAmB,EAAE,0CAAoB;CAC1C,CAAC"}

3
dist/mcp/tool-docs/system/index.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
export { toolsDocumentationDoc } from './tools-documentation';
export { n8nHealthCheckDoc } from './n8n-health-check';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}

8
dist/mcp/tool-docs/system/index.js vendored Normal file
View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.n8nHealthCheckDoc = exports.toolsDocumentationDoc = void 0;
var tools_documentation_1 = require("./tools-documentation");
Object.defineProperty(exports, "toolsDocumentationDoc", { enumerable: true, get: function () { return tools_documentation_1.toolsDocumentationDoc; } });
var n8n_health_check_1 = require("./n8n-health-check");
Object.defineProperty(exports, "n8nHealthCheckDoc", { enumerable: true, get: function () { return n8n_health_check_1.n8nHealthCheckDoc; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/index.ts"],"names":[],"mappings":";;;AAAA,6DAA8D;AAArD,4HAAA,qBAAqB,OAAA;AAC9B,uDAAuD;AAA9C,qHAAA,iBAAiB,OAAA"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const n8nDiagnosticDoc: ToolDocumentation;
//# sourceMappingURL=n8n-diagnostic.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-diagnostic.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/n8n-diagnostic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,gBAAgB,EAAE,iBA8F9B,CAAC"}

View File

@@ -0,0 +1,99 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.n8nDiagnosticDoc = void 0;
exports.n8nDiagnosticDoc = {
name: 'n8n_diagnostic',
category: 'system',
essentials: {
description: 'Comprehensive diagnostic with environment-aware debugging, version checks, performance metrics, and mode-specific troubleshooting',
keyParameters: ['verbose'],
example: 'n8n_diagnostic({verbose: true})',
performance: 'Fast - checks environment, API, and npm version (~180ms median)',
tips: [
'Now includes environment-aware debugging based on MCP_MODE (http/stdio)',
'Provides mode-specific troubleshooting (HTTP server vs Claude Desktop)',
'Detects Docker and cloud platforms for targeted guidance',
'Shows performance metrics: response time and cache statistics',
'Includes data-driven tips based on 82% user success rate'
]
},
full: {
description: `Comprehensive diagnostic tool for troubleshooting n8n API configuration and management tool availability.
This tool performs a detailed check of:
- Environment variable configuration (N8N_API_URL, N8N_API_KEY)
- API connectivity and authentication
- Tool availability status
- Common configuration issues
The diagnostic is essential when:
- n8n management tools aren't showing up in the available tools list
- API calls are failing with authentication or connection errors
- You need to verify your n8n instance configuration`,
parameters: {
verbose: {
type: 'boolean',
description: 'Include detailed debug information including full environment variables and API response details',
required: false,
default: false
}
},
returns: `Comprehensive diagnostic report containing:
- timestamp: ISO timestamp of diagnostic run
- environment: Enhanced environment variables
- N8N_API_URL, N8N_API_KEY (masked), NODE_ENV, MCP_MODE
- isDocker: Boolean indicating if running in Docker
- cloudPlatform: Detected cloud platform (railway/render/fly/etc.) or null
- nodeVersion: Node.js version
- platform: OS platform (darwin/win32/linux)
- apiConfiguration: API configuration and connectivity status
- configured, status (connected/error/version), config details
- versionInfo: Version check results (current, latest, upToDate, message, updateCommand)
- toolsAvailability: Tool availability breakdown (doc tools + management tools)
- performance: Performance metrics (responseTimeMs, cacheHitRate, cachedInstances)
- modeSpecificDebug: Mode-specific debugging (ALWAYS PRESENT)
- HTTP mode: port, authTokenConfigured, serverUrl, healthCheckUrl, troubleshooting steps, commonIssues
- stdio mode: configLocation, troubleshooting steps, commonIssues
- dockerDebug: Docker-specific guidance (if IS_DOCKER=true)
- containerDetected, troubleshooting steps, commonIssues
- cloudPlatformDebug: Cloud platform-specific tips (if platform detected)
- name, troubleshooting steps tailored to platform (Railway/Render/Fly/K8s/AWS/etc.)
- nextSteps: Context-specific guidance (if API connected)
- troubleshooting: Troubleshooting guidance (if API not connecting)
- setupGuide: Setup guidance (if API not configured)
- updateWarning: Update recommendation (if version outdated)
- debug: Verbose debug information (if verbose=true)`,
examples: [
'n8n_diagnostic({}) - Quick diagnostic check',
'n8n_diagnostic({verbose: true}) - Detailed diagnostic with environment info',
'n8n_diagnostic({verbose: false}) - Standard diagnostic without sensitive data'
],
useCases: [
'Initial setup verification after configuring N8N_API_URL and N8N_API_KEY',
'Troubleshooting when n8n management tools are not available',
'Debugging API connection failures or authentication errors',
'Verifying n8n instance compatibility and feature availability',
'Pre-deployment checks before using workflow management tools'
],
performance: `Instant response time:
- No database queries
- Only checks environment and makes one test API call
- Verbose mode adds minimal overhead
- Safe to run frequently for monitoring`,
bestPractices: [
'Always run diagnostic first when encountering n8n tool issues',
'Use verbose mode only in secure environments (may expose API URLs)',
'Check diagnostic before attempting workflow operations',
'Include diagnostic output when reporting issues',
'Run after any configuration changes to verify setup'
],
pitfalls: [
'Verbose mode may expose sensitive configuration details - use carefully',
'Requires proper environment variables to detect n8n configuration',
'API connectivity test requires network access to n8n instance',
'Does not test specific workflow operations, only basic connectivity'
],
relatedTools: ['n8n_health_check', 'n8n_list_available_tools', 'tools_documentation']
}
};
//# sourceMappingURL=n8n-diagnostic.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-diagnostic.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/n8n-diagnostic.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAsB;IACjD,IAAI,EAAE,gBAAgB;IACtB,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE;QACV,WAAW,EAAE,mIAAmI;QAChJ,aAAa,EAAE,CAAC,SAAS,CAAC;QAC1B,OAAO,EAAE,iCAAiC;QAC1C,WAAW,EAAE,iEAAiE;QAC9E,IAAI,EAAE;YACJ,yEAAyE;YACzE,wEAAwE;YACxE,0DAA0D;YAC1D,+DAA+D;YAC/D,0DAA0D;SAC3D;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;qDAWoC;QACjD,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,kGAAkG;gBAC/G,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,KAAK;aACf;SACF;QACD,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;qDAwBwC;QACjD,QAAQ,EAAE;YACR,6CAA6C;YAC7C,6EAA6E;YAC7E,+EAA+E;SAChF;QACD,QAAQ,EAAE;YACR,0EAA0E;YAC1E,6DAA6D;YAC7D,4DAA4D;YAC5D,+DAA+D;YAC/D,8DAA8D;SAC/D;QACD,WAAW,EAAE;;;;wCAIuB;QACpC,aAAa,EAAE;YACb,+DAA+D;YAC/D,oEAAoE;YACpE,wDAAwD;YACxD,iDAAiD;YACjD,qDAAqD;SACtD;QACD,QAAQ,EAAE;YACR,yEAAyE;YACzE,mEAAmE;YACnE,+DAA+D;YAC/D,qEAAqE;SACtE;QACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,0BAA0B,EAAE,qBAAqB,CAAC;KACtF;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const n8nHealthCheckDoc: ToolDocumentation;
//# sourceMappingURL=n8n-health-check.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-health-check.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/n8n-health-check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,iBAAiB,EAAE,iBAiG/B,CAAC"}

View File

@@ -0,0 +1,102 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.n8nHealthCheckDoc = void 0;
exports.n8nHealthCheckDoc = {
name: 'n8n_health_check',
category: 'system',
essentials: {
description: 'Check n8n instance health, API connectivity, version status, and performance metrics',
keyParameters: ['mode', 'verbose'],
example: 'n8n_health_check({mode: "status"})',
performance: 'Fast - single API call (~150-200ms median)',
tips: [
'Use before starting workflow operations to ensure n8n is responsive',
'Automatically checks if n8n-mcp version is outdated',
'Returns version info, performance metrics, and next-step recommendations',
'New: Shows cache hit rate and response time for performance monitoring'
]
},
full: {
description: `Performs a comprehensive health check of the configured n8n instance through its API.
This tool verifies:
- API endpoint accessibility and response time
- n8n instance version and build information
- Authentication status and permissions
- Available features and enterprise capabilities
- Database connectivity (as reported by n8n)
- Queue system status (if configured)
Health checks are crucial for:
- Monitoring n8n instance availability
- Detecting performance degradation
- Verifying API compatibility before operations
- Ensuring authentication is working correctly`,
parameters: {
mode: {
type: 'string',
required: false,
description: 'Operation mode: "status" (default) for quick health check, "diagnostic" for detailed debug info including env vars and tool status',
default: 'status',
enum: ['status', 'diagnostic']
},
verbose: {
type: 'boolean',
required: false,
description: 'Include extra details in diagnostic mode',
default: false
}
},
returns: `Health status object containing:
- status: Overall health status ('healthy', 'degraded', 'error')
- n8nVersion: n8n instance version information
- instanceId: Unique identifier for the n8n instance
- features: Object listing available features and their status
- mcpVersion: Current n8n-mcp version
- supportedN8nVersion: Recommended n8n version for compatibility
- versionCheck: Version status information
- current: Current n8n-mcp version
- latest: Latest available version from npm
- upToDate: Boolean indicating if version is current
- message: Formatted version status message
- updateCommand: Command to update (if outdated)
- performance: Performance metrics
- responseTimeMs: API response time in milliseconds
- cacheHitRate: Cache efficiency percentage
- cachedInstances: Number of cached API instances
- nextSteps: Recommended actions after health check
- updateWarning: Warning if version is outdated (if applicable)`,
examples: [
'n8n_health_check({}) - Complete health check with version and performance data',
'// Use in monitoring scripts\nconst health = await n8n_health_check({});\nif (health.status !== "ok") alert("n8n is down!");\nif (!health.versionCheck.upToDate) console.log("Update available:", health.versionCheck.updateCommand);',
'// Check before critical operations\nconst health = await n8n_health_check({});\nif (health.performance.responseTimeMs > 1000) console.warn("n8n is slow");\nif (health.versionCheck.isOutdated) console.log(health.updateWarning);'
],
useCases: [
'Pre-flight checks before workflow deployments',
'Continuous monitoring of n8n instance health',
'Troubleshooting connectivity or performance issues',
'Verifying n8n version compatibility with workflows',
'Detecting feature availability (enterprise features, queue mode, etc.)'
],
performance: `Fast response expected:
- Single HTTP request to /health endpoint
- Typically responds in <100ms for healthy instances
- Timeout after 10 seconds indicates severe issues
- Minimal server load - safe for frequent polling`,
bestPractices: [
'Run health checks before batch operations or deployments',
'Set up automated monitoring with regular health checks',
'Log response times to detect performance trends',
'Check version compatibility when deploying workflows',
'Use health status to implement circuit breaker patterns'
],
pitfalls: [
'Requires N8N_API_URL and N8N_API_KEY to be configured',
'Network issues may cause false negatives',
'Does not check individual workflow health',
'Health endpoint might be cached - not real-time for all metrics'
],
relatedTools: ['n8n_list_workflows', 'n8n_validate_workflow', 'n8n_workflow_versions']
}
};
//# sourceMappingURL=n8n-health-check.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-health-check.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/n8n-health-check.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAsB;IAClD,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE;QACV,WAAW,EAAE,sFAAsF;QACnG,aAAa,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;QAClC,OAAO,EAAE,oCAAoC;QAC7C,WAAW,EAAE,4CAA4C;QACzD,IAAI,EAAE;YACJ,qEAAqE;YACrE,qDAAqD;YACrD,0EAA0E;YAC1E,wEAAwE;SACzE;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;;;;+CAc8B;QAC3C,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,oIAAoI;gBACjJ,OAAO,EAAE,QAAQ;gBACjB,IAAI,EAAE,CAAC,QAAQ,EAAE,YAAY,CAAC;aAC/B;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,0CAA0C;gBACvD,OAAO,EAAE,KAAK;aACf;SACF;QACD,OAAO,EAAE;;;;;;;;;;;;;;;;;;gEAkBmD;QAC5D,QAAQ,EAAE;YACR,gFAAgF;YAChF,uOAAuO;YACvO,qOAAqO;SACtO;QACD,QAAQ,EAAE;YACR,+CAA+C;YAC/C,8CAA8C;YAC9C,oDAAoD;YACpD,oDAAoD;YACpD,wEAAwE;SACzE;QACD,WAAW,EAAE;;;;kDAIiC;QAC9C,aAAa,EAAE;YACb,0DAA0D;YAC1D,wDAAwD;YACxD,iDAAiD;YACjD,sDAAsD;YACtD,yDAAyD;SAC1D;QACD,QAAQ,EAAE;YACR,uDAAuD;YACvD,0CAA0C;YAC1C,2CAA2C;YAC3C,iEAAiE;SAClE;QACD,YAAY,EAAE,CAAC,oBAAoB,EAAE,uBAAuB,EAAE,uBAAuB,CAAC;KACvF;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const n8nListAvailableToolsDoc: ToolDocumentation;
//# sourceMappingURL=n8n-list-available-tools.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-list-available-tools.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/n8n-list-available-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,wBAAwB,EAAE,iBAsEtC,CAAC"}

View File

@@ -0,0 +1,75 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.n8nListAvailableToolsDoc = void 0;
exports.n8nListAvailableToolsDoc = {
name: 'n8n_list_available_tools',
category: 'system',
essentials: {
description: 'List all available n8n management tools and their capabilities',
keyParameters: [],
example: 'n8n_list_available_tools({})',
performance: 'Instant - returns static tool list',
tips: [
'Shows only tools available with current API configuration',
'If no n8n tools appear, run n8n_diagnostic to troubleshoot',
'Tool availability depends on N8N_API_URL and N8N_API_KEY being set'
]
},
full: {
description: `Lists all available n8n management tools based on current configuration.
This tool provides:
- Complete list of n8n management tools (when API is configured)
- Tool descriptions and capabilities
- Categorized tool listing (workflow, execution, system)
- Dynamic availability based on API configuration
The tool list is dynamic:
- Shows 14+ management tools when N8N_API_URL and N8N_API_KEY are configured
- Shows only documentation tools when API is not configured
- Helps discover available functionality
- Provides quick reference for tool names and purposes`,
parameters: {},
returns: `Object containing:
- tools: Array of available tool objects, each with:
- name: Tool identifier (e.g., 'n8n_create_workflow')
- description: Brief description of tool functionality
- category: Tool category ('workflow', 'execution', 'system')
- requiresApi: Whether tool needs API configuration
- categories: Summary count by category
- totalTools: Total number of available tools
- apiConfigured: Whether n8n API is configured`,
examples: [
'n8n_list_available_tools({}) - List all available tools',
'// Check for specific tool availability\nconst tools = await n8n_list_available_tools({});\nconst hasWorkflowTools = tools.tools.some(t => t.category === "workflow");',
'// Discover management capabilities\nconst result = await n8n_list_available_tools({});\nconsole.log(`${result.totalTools} tools available`);'
],
useCases: [
'Discovering available n8n management capabilities',
'Checking if API configuration is working correctly',
'Finding the right tool for a specific task',
'Generating help documentation or command lists',
'Verifying tool availability before automation scripts'
],
performance: `Instant response:
- No API calls required
- Returns pre-defined tool list
- Filtered based on configuration
- Zero network overhead`,
bestPractices: [
'Check tool availability before building automation workflows',
'Use with n8n_diagnostic if expected tools are missing',
'Reference tool names exactly as returned by this tool',
'Group operations by category for better organization',
'Cache results as tool list only changes with configuration'
],
pitfalls: [
'Tool list is empty if N8N_API_URL and N8N_API_KEY are not set',
'Does not validate if tools will actually work - just shows availability',
'Tool names must be used exactly as returned',
'Does not show tool parameters - use tools_documentation for details'
],
relatedTools: ['n8n_diagnostic', 'n8n_health_check', 'tools_documentation']
}
};
//# sourceMappingURL=n8n-list-available-tools.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-list-available-tools.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/n8n-list-available-tools.ts"],"names":[],"mappings":";;;AAEa,QAAA,wBAAwB,GAAsB;IACzD,IAAI,EAAE,0BAA0B;IAChC,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE;QACV,WAAW,EAAE,gEAAgE;QAC7E,aAAa,EAAE,EAAE;QACjB,OAAO,EAAE,8BAA8B;QACvC,WAAW,EAAE,oCAAoC;QACjD,IAAI,EAAE;YACJ,2DAA2D;YAC3D,4DAA4D;YAC5D,oEAAoE;SACrE;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;;uDAYsC;QACnD,UAAU,EAAE,EAAE;QACd,OAAO,EAAE;;;;;;;;+CAQkC;QAC3C,QAAQ,EAAE;YACR,yDAAyD;YACzD,wKAAwK;YACxK,+IAA+I;SAChJ;QACD,QAAQ,EAAE;YACR,mDAAmD;YACnD,oDAAoD;YACpD,4CAA4C;YAC5C,gDAAgD;YAChD,uDAAuD;SACxD;QACD,WAAW,EAAE;;;;wBAIO;QACpB,aAAa,EAAE;YACb,8DAA8D;YAC9D,uDAAuD;YACvD,uDAAuD;YACvD,sDAAsD;YACtD,4DAA4D;SAC7D;QACD,QAAQ,EAAE;YACR,+DAA+D;YAC/D,yEAAyE;YACzE,6CAA6C;YAC7C,qEAAqE;SACtE;QACD,YAAY,EAAE,CAAC,gBAAgB,EAAE,kBAAkB,EAAE,qBAAqB,CAAC;KAC5E;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const toolsDocumentationDoc: ToolDocumentation;
//# sourceMappingURL=tools-documentation.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"tools-documentation.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/tools-documentation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,qBAAqB,EAAE,iBA4DnC,CAAC"}

View File

@@ -0,0 +1,65 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toolsDocumentationDoc = void 0;
exports.toolsDocumentationDoc = {
name: 'tools_documentation',
category: 'system',
essentials: {
description: 'The meta-documentation tool. Returns documentation for any MCP tool, including itself. Call without parameters for a comprehensive overview of all available tools. This is your starting point for discovering n8n MCP capabilities.',
keyParameters: ['topic', 'depth'],
example: 'tools_documentation({topic: "search_nodes"})',
performance: 'Instant (static content)',
tips: [
'Call without parameters first to see all tools',
'Can document itself: tools_documentation({topic: "tools_documentation"})',
'Use depth:"full" for comprehensive details'
]
},
full: {
description: 'The self-referential documentation system for all MCP tools. This tool can document any other tool, including itself. It\'s the primary discovery mechanism for understanding what tools are available and how to use them. Returns utilitarian documentation optimized for AI agent consumption.',
parameters: {
topic: { type: 'string', description: 'Tool name (e.g., "search_nodes"), special topic ("javascript_code_node_guide", "python_code_node_guide"), or "overview". Leave empty for quick reference.', required: false },
depth: { type: 'string', description: 'Level of detail: "essentials" (default, concise) or "full" (comprehensive with examples)', required: false }
},
returns: 'Markdown-formatted documentation tailored for the requested tool and depth. For essentials: key info, parameters, example, tips. For full: complete details, all examples, use cases, best practices.',
examples: [
'// Get started - see all available tools',
'tools_documentation()',
'',
'// Learn about a specific tool',
'tools_documentation({topic: "search_nodes"})',
'',
'// Get comprehensive details',
'tools_documentation({topic: "validate_workflow", depth: "full"})',
'',
'// Self-referential example - document this tool',
'tools_documentation({topic: "tools_documentation", depth: "full"})',
'',
'// Code node guides',
'tools_documentation({topic: "javascript_code_node_guide"})',
'tools_documentation({topic: "python_code_node_guide"})'
],
useCases: [
'Initial discovery of available MCP tools',
'Learning how to use specific tools',
'Finding required and optional parameters',
'Getting working examples to copy',
'Understanding tool performance characteristics',
'Discovering related tools for workflows'
],
performance: 'Instant - all documentation is pre-loaded in memory',
bestPractices: [
'Always start with tools_documentation() to see available tools',
'Use essentials for quick parameter reference during coding',
'Switch to full depth when debugging or learning new tools',
'Check Code node guides when working with Code nodes'
],
pitfalls: [
'Tool names must match exactly - use the overview to find correct names',
'Not all internal functions are documented',
'Special topics (code guides) require exact names'
],
relatedTools: ['n8n_health_check for verifying API connection', 'search_templates for workflow examples', 'search_nodes for finding nodes']
}
};
//# sourceMappingURL=tools-documentation.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"tools-documentation.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/system/tools-documentation.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAAsB;IACtD,IAAI,EAAE,qBAAqB;IAC3B,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE;QACV,WAAW,EAAE,uOAAuO;QACpP,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC;QACjC,OAAO,EAAE,8CAA8C;QACvD,WAAW,EAAE,0BAA0B;QACvC,IAAI,EAAE;YACJ,gDAAgD;YAChD,0EAA0E;YAC1E,4CAA4C;SAC7C;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,mSAAmS;QAChT,UAAU,EAAE;YACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2JAA2J,EAAE,QAAQ,EAAE,KAAK,EAAE;YACpN,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0FAA0F,EAAE,QAAQ,EAAE,KAAK,EAAE;SACpJ;QACD,OAAO,EAAE,uMAAuM;QAChN,QAAQ,EAAE;YACR,0CAA0C;YAC1C,uBAAuB;YACvB,EAAE;YACF,gCAAgC;YAChC,8CAA8C;YAC9C,EAAE;YACF,8BAA8B;YAC9B,kEAAkE;YAClE,EAAE;YACF,kDAAkD;YAClD,oEAAoE;YACpE,EAAE;YACF,qBAAqB;YACrB,4DAA4D;YAC5D,wDAAwD;SACzD;QACD,QAAQ,EAAE;YACR,0CAA0C;YAC1C,oCAAoC;YACpC,0CAA0C;YAC1C,kCAAkC;YAClC,gDAAgD;YAChD,yCAAyC;SAC1C;QACD,WAAW,EAAE,qDAAqD;QAClE,aAAa,EAAE;YACb,gEAAgE;YAChE,4DAA4D;YAC5D,2DAA2D;YAC3D,qDAAqD;SACtD;QACD,QAAQ,EAAE;YACR,wEAAwE;YACxE,2CAA2C;YAC3C,kDAAkD;SACnD;QACD,YAAY,EAAE,CAAC,+CAA+C,EAAE,wCAAwC,EAAE,gCAAgC,CAAC;KAC5I;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const getTemplateDoc: ToolDocumentation;
//# sourceMappingURL=get-template.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-template.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/templates/get-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,iBA+E5B,CAAC"}

View File

@@ -0,0 +1,84 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTemplateDoc = void 0;
exports.getTemplateDoc = {
name: 'get_template',
category: 'templates',
essentials: {
description: 'Get workflow template by ID with configurable detail level. Ready to import. IDs from search_templates.',
keyParameters: ['templateId', 'mode'],
example: 'get_template({templateId: 1234, mode: "full"})',
performance: 'Fast (<100ms) - single database lookup',
tips: [
'Get template IDs from search_templates first',
'Use mode="nodes_only" for quick overview, "structure" for topology, "full" for import',
'Returns complete workflow JSON ready for import into n8n'
]
},
full: {
description: `Retrieves the complete workflow JSON for a specific template by its ID. The returned workflow can be directly imported into n8n through the UI or API. This tool fetches pre-built workflows from the community template library containing 2,700+ curated workflows.`,
parameters: {
templateId: {
type: 'number',
required: true,
description: 'The numeric ID of the template to retrieve. Get IDs from search_templates'
},
mode: {
type: 'string',
required: false,
description: 'Response detail level: "nodes_only" (minimal - just node list), "structure" (nodes + connections), "full" (complete workflow JSON, default)',
default: 'full',
enum: ['nodes_only', 'structure', 'full']
}
},
returns: `Returns an object containing:
- template: Complete template information including workflow JSON
- id: Template ID
- name: Template name
- description: What the workflow does
- author: Creator information (name, username, verified status)
- nodes: Array of node types used
- views: Number of times viewed
- created: Creation date
- url: Link to template on n8n.io
- workflow: Complete workflow JSON with structure:
- nodes: Array of node objects (id, name, type, typeVersion, position, parameters)
- connections: Object mapping source nodes to targets
- settings: Workflow configuration (timezone, error handling, etc.)
- usage: Instructions for using the workflow`,
examples: [
'get_template({templateId: 1234}) - Get complete workflow (default mode="full")',
'get_template({templateId: 1234, mode: "nodes_only"}) - Get just the node list',
'get_template({templateId: 1234, mode: "structure"}) - Get nodes and connections',
'get_template({templateId: 5678, mode: "full"}) - Get complete workflow JSON for import'
],
useCases: [
'Download workflows for direct import into n8n',
'Study workflow patterns and best practices',
'Get complete workflow JSON for customization',
'Clone popular workflows for your use case',
'Learn how complex automations are built'
],
performance: `Fast performance with single database lookup:
- Query time: <10ms for template retrieval
- Workflow JSON parsing: <50ms
- Total response time: <100ms
- No network calls (uses local cache)`,
bestPractices: [
'Always check if template exists before attempting modifications',
'Review workflow nodes before importing to ensure compatibility',
'Save template JSON locally if planning multiple customizations',
'Check template creation date for most recent patterns',
'Verify all required credentials are configured before import'
],
pitfalls: [
'Template IDs change when database is refreshed',
'Some templates may use deprecated node versions',
'Credentials in templates are placeholders - configure your own',
'Not all templates work with all n8n versions',
'Template may reference external services you don\'t have access to'
],
relatedTools: ['search_templates', 'n8n_create_workflow']
}
};
//# sourceMappingURL=get-template.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"get-template.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/templates/get-template.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAsB;IAC/C,IAAI,EAAE,cAAc;IACpB,QAAQ,EAAE,WAAW;IACrB,UAAU,EAAE;QACV,WAAW,EAAE,yGAAyG;QACtH,aAAa,EAAE,CAAC,YAAY,EAAE,MAAM,CAAC;QACrC,OAAO,EAAE,gDAAgD;QACzD,WAAW,EAAE,wCAAwC;QACrD,IAAI,EAAE;YACJ,8CAA8C;YAC9C,uFAAuF;YACvF,0DAA0D;SAC3D;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,uQAAuQ;QACpR,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,2EAA2E;aACzF;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,6IAA6I;gBAC1J,OAAO,EAAE,MAAM;gBACf,IAAI,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,MAAM,CAAC;aAC1C;SACF;QACD,OAAO,EAAE;;;;;;;;;;;;;;6CAcgC;QACzC,QAAQ,EAAE;YACR,gFAAgF;YAChF,+EAA+E;YAC/E,iFAAiF;YACjF,wFAAwF;SACzF;QACD,QAAQ,EAAE;YACR,+CAA+C;YAC/C,4CAA4C;YAC5C,8CAA8C;YAC9C,2CAA2C;YAC3C,yCAAyC;SAC1C;QACD,WAAW,EAAE;;;;sCAIqB;QAClC,aAAa,EAAE;YACb,iEAAiE;YACjE,gEAAgE;YAChE,gEAAgE;YAChE,uDAAuD;YACvD,8DAA8D;SAC/D;QACD,QAAQ,EAAE;YACR,gDAAgD;YAChD,iDAAiD;YACjD,gEAAgE;YAChE,8CAA8C;YAC9C,oEAAoE;SACrE;QACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,qBAAqB,CAAC;KAC1D;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
export { getTemplateDoc } from './get-template';
export { searchTemplatesDoc } from './search-templates';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}

8
dist/mcp/tool-docs/templates/index.js vendored Normal file
View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.searchTemplatesDoc = exports.getTemplateDoc = void 0;
var get_template_1 = require("./get-template");
Object.defineProperty(exports, "getTemplateDoc", { enumerable: true, get: function () { return get_template_1.getTemplateDoc; } });
var search_templates_1 = require("./search-templates");
Object.defineProperty(exports, "searchTemplatesDoc", { enumerable: true, get: function () { return search_templates_1.searchTemplatesDoc; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/templates/index.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAAvC,8GAAA,cAAc,OAAA;AACvB,uDAAwD;AAA/C,sHAAA,kBAAkB,OAAA"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const searchTemplatesDoc: ToolDocumentation;
//# sourceMappingURL=search-templates.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"search-templates.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/templates/search-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,kBAAkB,EAAE,iBA0IhC,CAAC"}

View File

@@ -0,0 +1,143 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.searchTemplatesDoc = void 0;
exports.searchTemplatesDoc = {
name: 'search_templates',
category: 'templates',
essentials: {
description: 'Unified template search with multiple modes: keyword search, by node types, by task type, or by metadata. 2,700+ templates available.',
keyParameters: ['searchMode', 'query', 'nodeTypes', 'task', 'limit'],
example: 'search_templates({searchMode: "by_task", task: "webhook_processing"})',
performance: 'Fast (<100ms) - FTS5 full-text search',
tips: [
'searchMode="keyword" (default): Search by name/description',
'searchMode="by_nodes": Find templates using specific nodes',
'searchMode="by_task": Get curated templates for common tasks',
'searchMode="by_metadata": Filter by complexity, services, audience'
]
},
full: {
description: `**Search Modes:**
- keyword (default): Full-text search across template names and descriptions
- by_nodes: Find templates that use specific node types
- by_task: Get curated templates for predefined task categories
- by_metadata: Filter by complexity, setup time, required services, or target audience
**Available Task Types (for searchMode="by_task"):**
ai_automation, data_sync, webhook_processing, email_automation, slack_integration, data_transformation, file_processing, scheduling, api_integration, database_operations`,
parameters: {
searchMode: {
type: 'string',
required: false,
description: 'Search mode: "keyword" (default), "by_nodes", "by_task", "by_metadata"'
},
query: {
type: 'string',
required: false,
description: 'For searchMode=keyword: Search keywords (e.g., "chatbot", "automation")'
},
nodeTypes: {
type: 'array',
required: false,
description: 'For searchMode=by_nodes: Array of node types (e.g., ["n8n-nodes-base.httpRequest", "n8n-nodes-base.slack"])'
},
task: {
type: 'string',
required: false,
description: 'For searchMode=by_task: Task type (ai_automation, data_sync, webhook_processing, email_automation, slack_integration, data_transformation, file_processing, scheduling, api_integration, database_operations)'
},
complexity: {
type: 'string',
required: false,
description: 'For searchMode=by_metadata: Filter by complexity ("simple", "medium", "complex")'
},
maxSetupMinutes: {
type: 'number',
required: false,
description: 'For searchMode=by_metadata: Maximum setup time in minutes (5-480)'
},
minSetupMinutes: {
type: 'number',
required: false,
description: 'For searchMode=by_metadata: Minimum setup time in minutes (5-480)'
},
requiredService: {
type: 'string',
required: false,
description: 'For searchMode=by_metadata: Filter by required service (e.g., "openai", "slack", "google")'
},
targetAudience: {
type: 'string',
required: false,
description: 'For searchMode=by_metadata: Filter by target audience (e.g., "developers", "marketers")'
},
category: {
type: 'string',
required: false,
description: 'For searchMode=by_metadata: Filter by category (e.g., "automation", "integration")'
},
fields: {
type: 'array',
required: false,
description: 'For searchMode=keyword: Fields to include (id, name, description, author, nodes, views, created, url, metadata)'
},
limit: {
type: 'number',
required: false,
description: 'Maximum results (default 20, max 100)'
},
offset: {
type: 'number',
required: false,
description: 'Pagination offset (default 0)'
}
},
returns: `Returns an object containing:
- templates: Array of matching templates
- id: Template ID for get_template()
- name: Template name
- description: What the workflow does
- author: Creator information
- nodes: Array of node types used
- views: Popularity metric
- created: Creation date
- url: Link to template
- metadata: AI-generated metadata (complexity, services, etc.)
- totalFound: Total matching templates
- searchMode: The mode used`,
examples: [
'// Keyword search (default)\nsearch_templates({query: "chatbot"})',
'// Find templates using specific nodes\nsearch_templates({searchMode: "by_nodes", nodeTypes: ["n8n-nodes-base.httpRequest", "n8n-nodes-base.slack"]})',
'// Get templates for a task type\nsearch_templates({searchMode: "by_task", task: "webhook_processing"})',
'// Filter by metadata\nsearch_templates({searchMode: "by_metadata", complexity: "simple", requiredService: "openai"})',
'// Combine metadata filters\nsearch_templates({searchMode: "by_metadata", maxSetupMinutes: 30, targetAudience: "developers"})'
],
useCases: [
'Find workflows by business purpose (keyword search)',
'Find templates using specific integrations (by_nodes)',
'Get pre-built solutions for common tasks (by_task)',
'Filter by complexity for team skill level (by_metadata)',
'Find templates requiring specific services (by_metadata)'
],
performance: `Fast performance across all modes:
- keyword: <50ms with FTS5 indexing
- by_nodes: <100ms with indexed lookups
- by_task: <50ms from curated cache
- by_metadata: <100ms with filtered queries`,
bestPractices: [
'Use searchMode="by_task" for common automation patterns',
'Use searchMode="by_nodes" when you know which integrations you need',
'Use searchMode="keyword" for general discovery',
'Combine by_metadata filters for precise matching',
'Use get_template(id) to get the full workflow JSON'
],
pitfalls: [
'searchMode="keyword" searches names/descriptions, not node types',
'by_nodes requires full node type with prefix (n8n-nodes-base.xxx)',
'by_metadata filters may return fewer results',
'Not all templates have complete metadata'
],
relatedTools: ['get_template', 'search_nodes', 'validate_workflow']
}
};
//# sourceMappingURL=search-templates.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"search-templates.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/templates/search-templates.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAsB;IACnD,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,WAAW;IACrB,UAAU,EAAE;QACV,WAAW,EAAE,uIAAuI;QACpJ,aAAa,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC;QACpE,OAAO,EAAE,uEAAuE;QAChF,WAAW,EAAE,uCAAuC;QACpD,IAAI,EAAE;YACJ,4DAA4D;YAC5D,4DAA4D;YAC5D,8DAA8D;YAC9D,oEAAoE;SACrE;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;0KAOyJ;QACtK,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,wEAAwE;aACtF;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,yEAAyE;aACvF;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,6GAA6G;aAC3H;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,+MAA+M;aAC7N;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,kFAAkF;aAChG;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,mEAAmE;aACjF;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,mEAAmE;aACjF;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,4FAA4F;aAC1G;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,yFAAyF;aACvG;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,oFAAoF;aAClG;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,iHAAiH;aAC/H;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,uCAAuC;aACrD;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,+BAA+B;aAC7C;SACF;QACD,OAAO,EAAE;;;;;;;;;;;;4BAYe;QACxB,QAAQ,EAAE;YACR,mEAAmE;YACnE,uJAAuJ;YACvJ,yGAAyG;YACzG,uHAAuH;YACvH,+HAA+H;SAChI;QACD,QAAQ,EAAE;YACR,qDAAqD;YACrD,uDAAuD;YACvD,oDAAoD;YACpD,yDAAyD;YACzD,0DAA0D;SAC3D;QACD,WAAW,EAAE;;;;4CAI2B;QACxC,aAAa,EAAE;YACb,yDAAyD;YACzD,qEAAqE;YACrE,gDAAgD;YAChD,kDAAkD;YAClD,oDAAoD;SACrD;QACD,QAAQ,EAAE;YACR,kEAAkE;YAClE,mEAAmE;YACnE,8CAA8C;YAC9C,0CAA0C;SAC3C;QACD,YAAY,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,mBAAmB,CAAC;KACpE;CACF,CAAC"}

32
dist/mcp/tool-docs/types.d.ts vendored Normal file
View File

@@ -0,0 +1,32 @@
export interface ToolDocumentation {
name: string;
category: string;
essentials: {
description: string;
keyParameters: string[];
example: string;
performance: string;
tips: string[];
};
full: {
description: string;
parameters: Record<string, {
type: string;
description: string;
required?: boolean;
default?: any;
examples?: string[];
enum?: string[];
}>;
returns: string;
examples: string[];
useCases: string[];
performance: string;
errorHandling?: string;
bestPractices: string[];
pitfalls: string[];
modeComparison?: string;
relatedTools: string[];
};
}
//# sourceMappingURL=types.d.ts.map

1
dist/mcp/tool-docs/types.d.ts.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/mcp/tool-docs/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE;QACV,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,EAAE,MAAM,EAAE,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,EAAE,CAAC;KAChB,CAAC;IACF,IAAI,EAAE;QACJ,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;YACzB,IAAI,EAAE,MAAM,CAAC;YACb,WAAW,EAAE,MAAM,CAAC;YACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;YACnB,OAAO,CAAC,EAAE,GAAG,CAAC;YACd,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;YACpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;SACjB,CAAC,CAAC;QACH,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,aAAa,EAAE,MAAM,EAAE,CAAC;QACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,YAAY,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;CACH"}

3
dist/mcp/tool-docs/types.js vendored Normal file
View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map

1
dist/mcp/tool-docs/types.js.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/mcp/tool-docs/types.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,3 @@
export { validateNodeDoc } from './validate-node';
export { validateWorkflowDoc } from './validate-workflow';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateWorkflowDoc = exports.validateNodeDoc = void 0;
var validate_node_1 = require("./validate-node");
Object.defineProperty(exports, "validateNodeDoc", { enumerable: true, get: function () { return validate_node_1.validateNodeDoc; } });
var validate_workflow_1 = require("./validate-workflow");
Object.defineProperty(exports, "validateWorkflowDoc", { enumerable: true, get: function () { return validate_workflow_1.validateWorkflowDoc; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/index.ts"],"names":[],"mappings":";;;AAAA,iDAAkD;AAAzC,gHAAA,eAAe,OAAA;AACxB,yDAA0D;AAAjD,wHAAA,mBAAmB,OAAA"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const validateNodeDoc: ToolDocumentation;
//# sourceMappingURL=validate-node.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validate-node.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/validate-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,eAAe,EAAE,iBA6E7B,CAAC"}

View File

@@ -0,0 +1,82 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateNodeDoc = void 0;
exports.validateNodeDoc = {
name: 'validate_node',
category: 'validation',
essentials: {
description: 'Validate n8n node configuration. Use mode="full" for comprehensive validation with errors/warnings/suggestions, mode="minimal" for quick required fields check.',
keyParameters: ['nodeType', 'config', 'mode', 'profile'],
example: 'validate_node({nodeType: "nodes-base.slack", config: {resource: "channel", operation: "create"}})',
performance: 'Fast (<100ms)',
tips: [
'Always call get_node({detail:"standard"}) first to see required fields',
'Use mode="minimal" for quick checks during development',
'Use mode="full" with profile="strict" before production deployment',
'Includes automatic structure validation for filter, resourceMapper, etc.'
]
},
full: {
description: `**Validation Modes:**
- full (default): Comprehensive validation with errors, warnings, suggestions, and automatic structure validation
- minimal: Quick check for required fields only - fast but less thorough
**Validation Profiles (for mode="full"):**
- minimal: Very lenient, basic checks only
- runtime: Standard validation (default)
- ai-friendly: Balanced for AI agent workflows
- strict: Most thorough, recommended for production
**Automatic Structure Validation:**
Validates complex n8n types automatically:
- filter (FilterValue): 40+ operations (equals, contains, regex, etc.)
- resourceMapper (ResourceMapperValue): Data mapping configuration
- assignmentCollection (AssignmentCollectionValue): Variable assignments
- resourceLocator (INodeParameterResourceLocator): Resource selection modes`,
parameters: {
nodeType: { type: 'string', required: true, description: 'Node type with prefix: "nodes-base.slack"' },
config: { type: 'object', required: true, description: 'Configuration object to validate. Use {} for empty config' },
mode: { type: 'string', required: false, description: 'Validation mode: "full" (default) or "minimal"' },
profile: { type: 'string', required: false, description: 'Validation profile for mode=full: "minimal", "runtime" (default), "ai-friendly", "strict"' }
},
returns: `Object containing:
- nodeType: The validated node type
- workflowNodeType: Type to use in workflow JSON
- displayName: Human-readable node name
- valid: Boolean indicating if configuration is valid
- errors: Array of error objects with type, property, message, fix
- warnings: Array of warning objects with suggestions
- suggestions: Array of improvement suggestions
- missingRequiredFields: (mode=minimal only) Array of missing required field names
- summary: Object with hasErrors, errorCount, warningCount, suggestionCount`,
examples: [
'// Full validation with default profile\nvalidate_node({nodeType: "nodes-base.slack", config: {resource: "channel", operation: "create"}})',
'// Quick required fields check\nvalidate_node({nodeType: "nodes-base.webhook", config: {}, mode: "minimal"})',
'// Strict validation for production\nvalidate_node({nodeType: "nodes-base.httpRequest", config: {...}, mode: "full", profile: "strict"})',
'// Validate IF node with filter\nvalidate_node({nodeType: "nodes-base.if", config: {conditions: {combinator: "and", conditions: [...]}}})'
],
useCases: [
'Validate node configuration before adding to workflow',
'Quick check for required fields during development',
'Pre-production validation with strict profile',
'Validate complex structures (filters, resource mappers)',
'Get suggestions for improving node configuration'
],
performance: 'Fast validation: <50ms for minimal mode, <100ms for full mode. Structure validation adds minimal overhead.',
bestPractices: [
'Always call get_node() first to understand required fields',
'Use mode="minimal" for rapid iteration during development',
'Use profile="strict" before deploying to production',
'Pay attention to warnings - they often prevent runtime issues',
'Validate after any configuration changes'
],
pitfalls: [
'Empty config {} is valid for some nodes (e.g., manual trigger)',
'mode="minimal" only checks required fields, not value validity',
'Some warnings may be acceptable for specific use cases',
'Credential validation requires runtime context'
],
relatedTools: ['get_node', 'validate_workflow', 'n8n_autofix_workflow']
}
};
//# sourceMappingURL=validate-node.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validate-node.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/validate-node.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB;IAChD,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,YAAY;IACtB,UAAU,EAAE;QACV,WAAW,EAAE,iKAAiK;QAC9K,aAAa,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC;QACxD,OAAO,EAAE,mGAAmG;QAC5G,WAAW,EAAE,eAAe;QAC5B,IAAI,EAAE;YACJ,wEAAwE;YACxE,wDAAwD;YACxD,oEAAoE;YACpE,0EAA0E;SAC3E;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;;;;;4EAe2D;QACxE,UAAU,EAAE;YACV,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,2CAA2C,EAAE;YACtG,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,2DAA2D,EAAE;YACpH,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,gDAAgD,EAAE;YACxG,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,2FAA2F,EAAE;SACvJ;QACD,OAAO,EAAE;;;;;;;;;4EAS+D;QACxE,QAAQ,EAAE;YACR,4IAA4I;YAC5I,8GAA8G;YAC9G,0IAA0I;YAC1I,2IAA2I;SAC5I;QACD,QAAQ,EAAE;YACR,uDAAuD;YACvD,oDAAoD;YACpD,+CAA+C;YAC/C,yDAAyD;YACzD,kDAAkD;SACnD;QACD,WAAW,EAAE,4GAA4G;QACzH,aAAa,EAAE;YACb,4DAA4D;YAC5D,2DAA2D;YAC3D,qDAAqD;YACrD,+DAA+D;YAC/D,0CAA0C;SAC3C;QACD,QAAQ,EAAE;YACR,gEAAgE;YAChE,gEAAgE;YAChE,wDAAwD;YACxD,gDAAgD;SACjD;QACD,YAAY,EAAE,CAAC,UAAU,EAAE,mBAAmB,EAAE,sBAAsB,CAAC;KACxE;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const validateWorkflowDoc: ToolDocumentation;
//# sourceMappingURL=validate-workflow.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validate-workflow.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/validate-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,mBAAmB,EAAE,iBAiFjC,CAAC"}

View File

@@ -0,0 +1,86 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateWorkflowDoc = void 0;
exports.validateWorkflowDoc = {
name: 'validate_workflow',
category: 'validation',
essentials: {
description: 'Full workflow validation: structure, connections, expressions, AI tools. Returns errors/warnings/fixes. Essential before deploy.',
keyParameters: ['workflow', 'options'],
example: 'validate_workflow({workflow: {nodes: [...], connections: {...}}})',
performance: 'Moderate (100-500ms)',
tips: [
'Always validate before n8n_create_workflow to catch errors early',
'Use options.profile="minimal" for quick checks during development',
'AI tool connections are automatically validated for proper node references',
'Detects operator structure issues (binary vs unary, singleValue requirements)'
]
},
full: {
description: 'Performs comprehensive validation of n8n workflows including structure, node configurations, connections, and expressions. This is a three-layer validation system that catches errors before deployment, validates complex multi-node workflows, checks all n8n expressions for syntax errors, and ensures proper node connections and data flow.',
parameters: {
workflow: {
type: 'object',
required: true,
description: 'The complete workflow JSON to validate. Must include nodes array and connections object.'
},
options: {
type: 'object',
required: false,
description: 'Validation options object'
},
'options.validateNodes': {
type: 'boolean',
required: false,
description: 'Validate individual node configurations. Default: true'
},
'options.validateConnections': {
type: 'boolean',
required: false,
description: 'Validate node connections and flow. Default: true'
},
'options.validateExpressions': {
type: 'boolean',
required: false,
description: 'Validate n8n expressions syntax and references. Default: true'
},
'options.profile': {
type: 'string',
required: false,
description: 'Validation profile for node validation: minimal, runtime (default), ai-friendly, strict'
}
},
returns: 'Object with valid (boolean), errors (array), warnings (array), statistics (object), and suggestions (array)',
examples: [
'validate_workflow({workflow: myWorkflow}) - Full validation with default settings',
'validate_workflow({workflow: myWorkflow, options: {profile: "minimal"}}) - Quick validation for editing',
'validate_workflow({workflow: myWorkflow, options: {validateExpressions: false}}) - Skip expression validation'
],
useCases: [
'Pre-deployment validation to catch all workflow issues',
'Quick validation during workflow development',
'Validate workflows with AI Agent nodes and tool connections',
'Check expression syntax before workflow execution',
'Ensure workflow structure integrity after modifications'
],
performance: 'Moderate (100-500ms). Depends on workflow size and validation options. Expression validation adds ~50-100ms.',
bestPractices: [
'Always validate workflows before creating or updating in n8n',
'Use minimal profile during development, strict profile before production',
'Pay attention to warnings - they often indicate potential runtime issues',
'Validate after any workflow modifications, especially connection changes',
'Check statistics to understand workflow complexity',
'**Auto-sanitization runs during create/update**: Operator structures and missing metadata are automatically fixed when workflows are created or updated, but validation helps catch issues before they reach n8n',
'If validation detects operator issues, they will be auto-fixed during n8n_create_workflow or n8n_update_partial_workflow'
],
pitfalls: [
'Large workflows (100+ nodes) may take longer to validate',
'Expression validation requires proper node references to exist',
'Some warnings may be acceptable depending on use case',
'Validation cannot catch all runtime errors (e.g., API failures)',
'Profile setting only affects node validation, not connection/expression checks'
],
relatedTools: ['validate_node', 'n8n_create_workflow', 'n8n_update_partial_workflow', 'n8n_autofix_workflow']
}
};
//# sourceMappingURL=validate-workflow.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validate-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/validation/validate-workflow.ts"],"names":[],"mappings":";;;AAEa,QAAA,mBAAmB,GAAsB;IACpD,IAAI,EAAE,mBAAmB;IACzB,QAAQ,EAAE,YAAY;IACtB,UAAU,EAAE;QACV,WAAW,EAAE,kIAAkI;QAC/I,aAAa,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;QACtC,OAAO,EAAE,mEAAmE;QAC5E,WAAW,EAAE,sBAAsB;QACnC,IAAI,EAAE;YACJ,kEAAkE;YAClE,mEAAmE;YACnE,4EAA4E;YAC5E,+EAA+E;SAChF;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,oVAAoV;QACjW,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,0FAA0F;aACxG;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,2BAA2B;aACzC;YACD,uBAAuB,EAAE;gBACvB,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,wDAAwD;aACtE;YACD,6BAA6B,EAAE;gBAC7B,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,mDAAmD;aACjE;YACD,6BAA6B,EAAE;gBAC7B,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,+DAA+D;aAC7E;YACD,iBAAiB,EAAE;gBACjB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,yFAAyF;aACvG;SACF;QACD,OAAO,EAAE,6GAA6G;QACtH,QAAQ,EAAE;YACR,mFAAmF;YACnF,yGAAyG;YACzG,+GAA+G;SAChH;QACD,QAAQ,EAAE;YACR,wDAAwD;YACxD,8CAA8C;YAC9C,6DAA6D;YAC7D,mDAAmD;YACnD,yDAAyD;SAC1D;QACD,WAAW,EAAE,8GAA8G;QAC3H,aAAa,EAAE;YACb,8DAA8D;YAC9D,0EAA0E;YAC1E,0EAA0E;YAC1E,0EAA0E;YAC1E,oDAAoD;YACpD,kNAAkN;YAClN,0HAA0H;SAC3H;QACD,QAAQ,EAAE;YACR,0DAA0D;YAC1D,gEAAgE;YAChE,uDAAuD;YACvD,iEAAiE;YACjE,gFAAgF;SACjF;QACD,YAAY,EAAE,CAAC,eAAe,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,sBAAsB,CAAC;KAC9G;CACF,CAAC"}

View File

@@ -0,0 +1,13 @@
export { n8nCreateWorkflowDoc } from './n8n-create-workflow';
export { n8nGetWorkflowDoc } from './n8n-get-workflow';
export { n8nUpdateFullWorkflowDoc } from './n8n-update-full-workflow';
export { n8nUpdatePartialWorkflowDoc } from './n8n-update-partial-workflow';
export { n8nDeleteWorkflowDoc } from './n8n-delete-workflow';
export { n8nListWorkflowsDoc } from './n8n-list-workflows';
export { n8nValidateWorkflowDoc } from './n8n-validate-workflow';
export { n8nAutofixWorkflowDoc } from './n8n-autofix-workflow';
export { n8nTestWorkflowDoc } from './n8n-test-workflow';
export { n8nExecutionsDoc } from './n8n-executions';
export { n8nWorkflowVersionsDoc } from './n8n-workflow-versions';
export { n8nDeployTemplateDoc } from './n8n-deploy-template';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC"}

View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.n8nDeployTemplateDoc = exports.n8nWorkflowVersionsDoc = exports.n8nExecutionsDoc = exports.n8nTestWorkflowDoc = exports.n8nAutofixWorkflowDoc = exports.n8nValidateWorkflowDoc = exports.n8nListWorkflowsDoc = exports.n8nDeleteWorkflowDoc = exports.n8nUpdatePartialWorkflowDoc = exports.n8nUpdateFullWorkflowDoc = exports.n8nGetWorkflowDoc = exports.n8nCreateWorkflowDoc = void 0;
var n8n_create_workflow_1 = require("./n8n-create-workflow");
Object.defineProperty(exports, "n8nCreateWorkflowDoc", { enumerable: true, get: function () { return n8n_create_workflow_1.n8nCreateWorkflowDoc; } });
var n8n_get_workflow_1 = require("./n8n-get-workflow");
Object.defineProperty(exports, "n8nGetWorkflowDoc", { enumerable: true, get: function () { return n8n_get_workflow_1.n8nGetWorkflowDoc; } });
var n8n_update_full_workflow_1 = require("./n8n-update-full-workflow");
Object.defineProperty(exports, "n8nUpdateFullWorkflowDoc", { enumerable: true, get: function () { return n8n_update_full_workflow_1.n8nUpdateFullWorkflowDoc; } });
var n8n_update_partial_workflow_1 = require("./n8n-update-partial-workflow");
Object.defineProperty(exports, "n8nUpdatePartialWorkflowDoc", { enumerable: true, get: function () { return n8n_update_partial_workflow_1.n8nUpdatePartialWorkflowDoc; } });
var n8n_delete_workflow_1 = require("./n8n-delete-workflow");
Object.defineProperty(exports, "n8nDeleteWorkflowDoc", { enumerable: true, get: function () { return n8n_delete_workflow_1.n8nDeleteWorkflowDoc; } });
var n8n_list_workflows_1 = require("./n8n-list-workflows");
Object.defineProperty(exports, "n8nListWorkflowsDoc", { enumerable: true, get: function () { return n8n_list_workflows_1.n8nListWorkflowsDoc; } });
var n8n_validate_workflow_1 = require("./n8n-validate-workflow");
Object.defineProperty(exports, "n8nValidateWorkflowDoc", { enumerable: true, get: function () { return n8n_validate_workflow_1.n8nValidateWorkflowDoc; } });
var n8n_autofix_workflow_1 = require("./n8n-autofix-workflow");
Object.defineProperty(exports, "n8nAutofixWorkflowDoc", { enumerable: true, get: function () { return n8n_autofix_workflow_1.n8nAutofixWorkflowDoc; } });
var n8n_test_workflow_1 = require("./n8n-test-workflow");
Object.defineProperty(exports, "n8nTestWorkflowDoc", { enumerable: true, get: function () { return n8n_test_workflow_1.n8nTestWorkflowDoc; } });
var n8n_executions_1 = require("./n8n-executions");
Object.defineProperty(exports, "n8nExecutionsDoc", { enumerable: true, get: function () { return n8n_executions_1.n8nExecutionsDoc; } });
var n8n_workflow_versions_1 = require("./n8n-workflow-versions");
Object.defineProperty(exports, "n8nWorkflowVersionsDoc", { enumerable: true, get: function () { return n8n_workflow_versions_1.n8nWorkflowVersionsDoc; } });
var n8n_deploy_template_1 = require("./n8n-deploy-template");
Object.defineProperty(exports, "n8nDeployTemplateDoc", { enumerable: true, get: function () { return n8n_deploy_template_1.n8nDeployTemplateDoc; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/index.ts"],"names":[],"mappings":";;;AAAA,6DAA6D;AAApD,2HAAA,oBAAoB,OAAA;AAC7B,uDAAuD;AAA9C,qHAAA,iBAAiB,OAAA;AAC1B,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,6EAA4E;AAAnE,0IAAA,2BAA2B,OAAA;AACpC,6DAA6D;AAApD,2HAAA,oBAAoB,OAAA;AAC7B,2DAA2D;AAAlD,yHAAA,mBAAmB,OAAA;AAC5B,iEAAiE;AAAxD,+HAAA,sBAAsB,OAAA;AAC/B,+DAA+D;AAAtD,6HAAA,qBAAqB,OAAA;AAC9B,yDAAyD;AAAhD,uHAAA,kBAAkB,OAAA;AAC3B,mDAAoD;AAA3C,kHAAA,gBAAgB,OAAA;AACzB,iEAAiE;AAAxD,+HAAA,sBAAsB,OAAA;AAC/B,6DAA6D;AAApD,2HAAA,oBAAoB,OAAA"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const n8nAutofixWorkflowDoc: ToolDocumentation;
//# sourceMappingURL=n8n-autofix-workflow.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-autofix-workflow.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-autofix-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,qBAAqB,EAAE,iBA6JnC,CAAC"}

View File

@@ -0,0 +1,162 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.n8nAutofixWorkflowDoc = void 0;
exports.n8nAutofixWorkflowDoc = {
name: 'n8n_autofix_workflow',
category: 'workflow_management',
essentials: {
description: 'Automatically fix common workflow validation errors - expression formats, typeVersions, error outputs, webhook paths, and smart version upgrades',
keyParameters: ['id', 'applyFixes'],
example: 'n8n_autofix_workflow({id: "wf_abc123", applyFixes: false})',
performance: 'Network-dependent (200-1500ms) - fetches, validates, and optionally updates workflow with smart migrations',
tips: [
'Use applyFixes: false to preview changes before applying',
'Set confidenceThreshold to control fix aggressiveness (high/medium/low)',
'Supports expression formats, typeVersion issues, error outputs, node corrections, webhook paths, AND version upgrades',
'High-confidence fixes (≥90%) are safe for auto-application',
'Version upgrades include smart migration with breaking change detection',
'Post-update guidance provides AI-friendly step-by-step instructions for manual changes'
]
},
full: {
description: `Automatically detects and fixes common workflow validation errors in n8n workflows. This tool:
- Fetches the workflow from your n8n instance
- Runs comprehensive validation to detect issues
- Generates targeted fixes for common problems
- Optionally applies the fixes back to the workflow
The auto-fixer can resolve:
1. **Expression Format Issues**: Missing '=' prefix in n8n expressions (e.g., {{ $json.field }} → ={{ $json.field }})
2. **TypeVersion Corrections**: Downgrades nodes with unsupported typeVersions to maximum supported
3. **Error Output Configuration**: Removes conflicting onError settings when error connections are missing
4. **Node Type Corrections**: Intelligently fixes unknown node types using similarity matching:
- Handles deprecated package prefixes (n8n-nodes-base. → nodes-base.)
- Corrects capitalization mistakes (HttpRequest → httpRequest)
- Suggests correct packages (nodes-base.openai → nodes-langchain.openAi)
- Uses multi-factor scoring: name similarity, category match, package match, pattern match
- Only auto-fixes suggestions with ≥90% confidence
- Leverages NodeSimilarityService with 5-minute caching for performance
5. **Webhook Path Generation**: Automatically generates UUIDs for webhook nodes missing path configuration:
- Generates a unique UUID for webhook path
- Sets both 'path' parameter and 'webhookId' field to the same UUID
- Ensures webhook nodes become functional with valid endpoints
- High confidence fix as UUID generation is deterministic
6. **Smart Version Upgrades** (NEW): Proactively upgrades nodes to their latest versions:
- Detects outdated node versions and recommends upgrades
- Applies smart migrations with auto-migratable property changes
- Handles breaking changes intelligently (Execute Workflow v1.0→v1.1, Webhook v2.0→v2.1, etc.)
- Generates UUIDs for required fields (webhookId), sets sensible defaults
- HIGH confidence for non-breaking upgrades, MEDIUM for breaking changes with auto-migration
- Example: Execute Workflow v1.0→v1.1 adds inputFieldMapping automatically
7. **Version Migration Guidance** (NEW): Documents complex migrations requiring manual intervention:
- Identifies breaking changes that cannot be auto-migrated
- Provides AI-friendly post-update guidance with step-by-step instructions
- Lists required actions by priority (CRITICAL, HIGH, MEDIUM, LOW)
- Documents behavior changes and their impact
- Estimates time required for manual migration steps
- MEDIUM/LOW confidence - requires review before applying
The tool uses a confidence-based system to ensure safe fixes:
- **High (≥90%)**: Safe to auto-apply (exact matches, known patterns)
- **Medium (70-89%)**: Generally safe but review recommended
- **Low (<70%)**: Manual review strongly recommended
Requires N8N_API_URL and N8N_API_KEY environment variables to be configured.`,
parameters: {
id: {
type: 'string',
required: true,
description: 'The workflow ID to fix in your n8n instance'
},
applyFixes: {
type: 'boolean',
required: false,
description: 'Whether to apply fixes to the workflow (default: false - preview mode). When false, returns proposed fixes without modifying the workflow.'
},
fixTypes: {
type: 'array',
required: false,
description: 'Types of fixes to apply. Options: ["expression-format", "typeversion-correction", "error-output-config", "node-type-correction", "webhook-missing-path", "typeversion-upgrade", "version-migration"]. Default: all types. NEW: "typeversion-upgrade" for smart version upgrades, "version-migration" for complex migration guidance.'
},
confidenceThreshold: {
type: 'string',
required: false,
description: 'Minimum confidence level for fixes: "high" (≥90%), "medium" (≥70%), "low" (any). Default: "medium".'
},
maxFixes: {
type: 'number',
required: false,
description: 'Maximum number of fixes to apply (default: 50). Useful for limiting scope of changes.'
}
},
returns: `AutoFixResult object containing:
- operations: Array of diff operations that will be/were applied
- fixes: Detailed list of individual fixes with before/after values
- summary: Human-readable summary of fixes
- stats: Statistics by fix type and confidence level
- applied: Boolean indicating if fixes were applied (when applyFixes: true)
- postUpdateGuidance: (NEW) Array of AI-friendly migration guidance for version upgrades, including:
* Required actions by priority (CRITICAL, HIGH, MEDIUM, LOW)
* Deprecated properties to remove
* Behavior changes and their impact
* Step-by-step migration instructions
* Estimated time for manual changes`,
examples: [
'n8n_autofix_workflow({id: "wf_abc123"}) - Preview all possible fixes including version upgrades',
'n8n_autofix_workflow({id: "wf_abc123", applyFixes: true}) - Apply all medium+ confidence fixes',
'n8n_autofix_workflow({id: "wf_abc123", applyFixes: true, confidenceThreshold: "high"}) - Only apply high-confidence fixes',
'n8n_autofix_workflow({id: "wf_abc123", fixTypes: ["expression-format"]}) - Only fix expression format issues',
'n8n_autofix_workflow({id: "wf_abc123", fixTypes: ["webhook-missing-path"]}) - Only fix webhook path issues',
'n8n_autofix_workflow({id: "wf_abc123", fixTypes: ["typeversion-upgrade"]}) - NEW: Only upgrade node versions with smart migrations',
'n8n_autofix_workflow({id: "wf_abc123", fixTypes: ["typeversion-upgrade", "version-migration"]}) - NEW: Upgrade versions and provide migration guidance',
'n8n_autofix_workflow({id: "wf_abc123", applyFixes: true, maxFixes: 10}) - Apply up to 10 fixes'
],
useCases: [
'Fixing workflows imported from older n8n versions',
'Correcting expression syntax after manual edits',
'Resolving typeVersion conflicts after n8n upgrades',
'Cleaning up workflows before production deployment',
'Batch fixing common issues across multiple workflows',
'Migrating workflows between n8n instances with different versions',
'Repairing webhook nodes that lost their path configuration',
'Upgrading Execute Workflow nodes from v1.0 to v1.1+ with automatic inputFieldMapping',
'Modernizing webhook nodes to v2.1+ with stable webhookId fields',
'Proactively keeping workflows up-to-date with latest node versions',
'Getting detailed migration guidance for complex breaking changes'
],
performance: 'Depends on workflow size and number of issues. Preview mode: 200-500ms. Apply mode: 500-1500ms for medium workflows with version upgrades. Node similarity matching and version metadata are cached for 5 minutes for improved performance on repeated validations.',
bestPractices: [
'Always preview fixes first (applyFixes: false) before applying',
'Start with high confidence threshold for production workflows',
'Review the fix summary to understand what changed',
'Test workflows after auto-fixing to ensure expected behavior',
'Use fixTypes parameter to target specific issue categories',
'Keep maxFixes reasonable to avoid too many changes at once',
'NEW: Review postUpdateGuidance for version upgrades - contains step-by-step migration instructions',
'NEW: Test workflows after version upgrades - behavior may change even with successful auto-migration',
'NEW: Apply version upgrades incrementally - start with high-confidence, non-breaking upgrades'
],
pitfalls: [
'Some fixes may change workflow behavior - always test after fixing',
'Low confidence fixes might not be the intended solution',
'Expression format fixes assume standard n8n syntax requirements',
'Node type corrections only work for known node types in the database',
'Cannot fix structural issues like missing nodes or invalid connections',
'TypeVersion downgrades might remove node features added in newer versions',
'Generated webhook paths are new UUIDs - existing webhook URLs will change',
'NEW: Version upgrades may introduce breaking changes - review postUpdateGuidance carefully',
'NEW: Auto-migrated properties use sensible defaults which may not match your use case',
'NEW: Execute Workflow v1.1+ requires explicit inputFieldMapping - automatic mapping uses empty array',
'NEW: Some breaking changes cannot be auto-migrated and require manual intervention',
'NEW: Version history is based on registry - unknown nodes cannot be upgraded'
],
relatedTools: [
'n8n_validate_workflow',
'validate_workflow',
'validate_node',
'n8n_update_partial_workflow'
]
}
};
//# sourceMappingURL=n8n-autofix-workflow.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-autofix-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-autofix-workflow.ts"],"names":[],"mappings":";;;AAEa,QAAA,qBAAqB,GAAsB;IACtD,IAAI,EAAE,sBAAsB;IAC5B,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW,EAAE,kJAAkJ;QAC/J,aAAa,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC;QACnC,OAAO,EAAE,4DAA4D;QACrE,WAAW,EAAE,4GAA4G;QACzH,IAAI,EAAE;YACJ,0DAA0D;YAC1D,yEAAyE;YACzE,uHAAuH;YACvH,4DAA4D;YAC5D,yEAAyE;YACzE,wFAAwF;SACzF;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EA2C4D;QACzE,UAAU,EAAE;YACV,EAAE,EAAE;gBACF,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,6CAA6C;aAC3D;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,4IAA4I;aAC1J;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,OAAO;gBACb,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,sUAAsU;aACpV;YACD,mBAAmB,EAAE;gBACnB,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,qGAAqG;aACnH;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,uFAAuF;aACrG;SACF;QACD,OAAO,EAAE;;;;;;;;;;;sCAWyB;QAClC,QAAQ,EAAE;YACR,iGAAiG;YACjG,gGAAgG;YAChG,2HAA2H;YAC3H,8GAA8G;YAC9G,4GAA4G;YAC5G,oIAAoI;YACpI,wJAAwJ;YACxJ,gGAAgG;SACjG;QACD,QAAQ,EAAE;YACR,mDAAmD;YACnD,iDAAiD;YACjD,oDAAoD;YACpD,oDAAoD;YACpD,sDAAsD;YACtD,mEAAmE;YACnE,4DAA4D;YAC5D,sFAAsF;YACtF,iEAAiE;YACjE,oEAAoE;YACpE,kEAAkE;SACnE;QACD,WAAW,EAAE,qQAAqQ;QAClR,aAAa,EAAE;YACb,gEAAgE;YAChE,+DAA+D;YAC/D,mDAAmD;YACnD,8DAA8D;YAC9D,4DAA4D;YAC5D,4DAA4D;YAC5D,oGAAoG;YACpG,sGAAsG;YACtG,+FAA+F;SAChG;QACD,QAAQ,EAAE;YACR,oEAAoE;YACpE,yDAAyD;YACzD,iEAAiE;YACjE,sEAAsE;YACtE,wEAAwE;YACxE,2EAA2E;YAC3E,2EAA2E;YAC3E,4FAA4F;YAC5F,uFAAuF;YACvF,sGAAsG;YACtG,oFAAoF;YACpF,8EAA8E;SAC/E;QACD,YAAY,EAAE;YACZ,uBAAuB;YACvB,mBAAmB;YACnB,eAAe;YACf,6BAA6B;SAC9B;KACF;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const n8nCreateWorkflowDoc: ToolDocumentation;
//# sourceMappingURL=n8n-create-workflow.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-create-workflow.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-create-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,oBAAoB,EAAE,iBAiGlC,CAAC"}

View File

@@ -0,0 +1,102 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.n8nCreateWorkflowDoc = void 0;
exports.n8nCreateWorkflowDoc = {
name: 'n8n_create_workflow',
category: 'workflow_management',
essentials: {
description: 'Create workflow. Requires: name, nodes[], connections{}. Created inactive. Returns workflow with ID.',
keyParameters: ['name', 'nodes', 'connections'],
example: 'n8n_create_workflow({name: "My Flow", nodes: [...], connections: {...}})',
performance: 'Network-dependent',
tips: [
'Workflow created inactive',
'Returns ID for future updates',
'Validate first with validate_workflow',
'Auto-sanitization fixes operator structures and missing metadata during creation'
]
},
full: {
description: 'Creates a new workflow in n8n with specified nodes and connections. Workflow is created in inactive state. Each node requires: id, name, type, typeVersion, position, and parameters.',
parameters: {
name: { type: 'string', required: true, description: 'Workflow name' },
nodes: { type: 'array', required: true, description: 'Array of nodes with id, name, type, typeVersion, position, parameters' },
connections: { type: 'object', required: true, description: 'Node connections. Keys are source node IDs' },
settings: { type: 'object', description: 'Optional workflow settings (timezone, error handling, etc.)' }
},
returns: 'Created workflow object with id, name, nodes, connections, active status',
examples: [
`// Basic webhook to Slack workflow
n8n_create_workflow({
name: "Webhook to Slack",
nodes: [
{
id: "webhook_1",
name: "Webhook",
type: "n8n-nodes-base.webhook",
typeVersion: 1,
position: [250, 300],
parameters: {
httpMethod: "POST",
path: "slack-notify"
}
},
{
id: "slack_1",
name: "Slack",
type: "n8n-nodes-base.slack",
typeVersion: 1,
position: [450, 300],
parameters: {
resource: "message",
operation: "post",
channel: "#general",
text: "={{$json.message}}"
}
}
],
connections: {
"webhook_1": {
"main": [[{node: "slack_1", type: "main", index: 0}]]
}
}
})`,
`// Workflow with settings and error handling
n8n_create_workflow({
name: "Data Processing",
nodes: [...],
connections: {...},
settings: {
timezone: "America/New_York",
errorWorkflow: "error_handler_workflow_id",
saveDataSuccessExecution: "all",
saveDataErrorExecution: "all"
}
})`
],
useCases: [
'Deploy validated workflows',
'Automate workflow creation',
'Clone workflow structures',
'Template deployment'
],
performance: 'Network-dependent - Typically 100-500ms depending on workflow size',
bestPractices: [
'Validate with validate_workflow first',
'Use unique node IDs',
'Position nodes for readability',
'Test with n8n_test_workflow'
],
pitfalls: [
'**REQUIRES N8N_API_URL and N8N_API_KEY environment variables** - tool unavailable without n8n API access',
'Workflows created in INACTIVE state - must activate separately',
'Node IDs must be unique within workflow',
'Credentials must be configured separately in n8n',
'Node type names must include package prefix (e.g., "n8n-nodes-base.slack")',
'**Auto-sanitization runs on creation**: All nodes sanitized before workflow created (operator structures fixed, missing metadata added)',
'**Auto-sanitization cannot prevent all failures**: Broken connections or invalid node configurations may still cause creation to fail'
],
relatedTools: ['validate_workflow', 'n8n_update_partial_workflow', 'n8n_test_workflow']
}
};
//# sourceMappingURL=n8n-create-workflow.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-create-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-create-workflow.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAsB;IACrD,IAAI,EAAE,qBAAqB;IAC3B,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW,EAAE,sGAAsG;QACnH,aAAa,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC;QAC/C,OAAO,EAAE,0EAA0E;QACnF,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE;YACJ,2BAA2B;YAC3B,+BAA+B;YAC/B,uCAAuC;YACvC,kFAAkF;SACnF;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,uLAAuL;QACpM,UAAU,EAAE;YACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE;YACtE,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uEAAuE,EAAE;YAC9H,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,4CAA4C,EAAE;YAC1G,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6DAA6D,EAAE;SACzG;QACD,OAAO,EAAE,0EAA0E;QACnF,QAAQ,EAAE;YACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCH;YACG;;;;;;;;;;;GAWH;SACE;QACD,QAAQ,EAAE;YACR,4BAA4B;YAC5B,4BAA4B;YAC5B,2BAA2B;YAC3B,qBAAqB;SACtB;QACD,WAAW,EAAE,oEAAoE;QACjF,aAAa,EAAE;YACb,uCAAuC;YACvC,qBAAqB;YACrB,gCAAgC;YAChC,6BAA6B;SAC9B;QACD,QAAQ,EAAE;YACR,0GAA0G;YAC1G,gEAAgE;YAChE,yCAAyC;YACzC,kDAAkD;YAClD,4EAA4E;YAC5E,yIAAyI;YACzI,uIAAuI;SACxI;QACD,YAAY,EAAE,CAAC,mBAAmB,EAAE,6BAA6B,EAAE,mBAAmB,CAAC;KACxF;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const n8nDeleteWorkflowDoc: ToolDocumentation;
//# sourceMappingURL=n8n-delete-workflow.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-delete-workflow.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-delete-workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,oBAAoB,EAAE,iBA+ClC,CAAC"}

View File

@@ -0,0 +1,52 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.n8nDeleteWorkflowDoc = void 0;
exports.n8nDeleteWorkflowDoc = {
name: 'n8n_delete_workflow',
category: 'workflow_management',
essentials: {
description: 'Permanently delete a workflow. This action cannot be undone.',
keyParameters: ['id'],
example: 'n8n_delete_workflow({id: "workflow_123"})',
performance: 'Fast (50-150ms)',
tips: [
'Action is irreversible',
'Deletes all execution history',
'Check workflow first with n8n_get_workflow({mode: "minimal"})'
]
},
full: {
description: 'Permanently deletes a workflow from n8n including all associated data, execution history, and settings. This is an irreversible operation that should be used with caution. The workflow must exist and the user must have appropriate permissions.',
parameters: {
id: { type: 'string', required: true, description: 'Workflow ID to delete permanently' }
},
returns: 'Success confirmation or error if workflow not found/cannot be deleted',
examples: [
'n8n_delete_workflow({id: "abc123"}) - Delete specific workflow',
'if (confirm) { n8n_delete_workflow({id: wf.id}); } // With confirmation'
],
useCases: [
'Remove obsolete workflows',
'Clean up test workflows',
'Delete failed experiments',
'Manage workflow limits',
'Remove duplicates'
],
performance: 'Fast operation - typically 50-150ms. May take longer if workflow has extensive execution history.',
bestPractices: [
'Always confirm before deletion',
'Check workflow with n8n_get_workflow({mode: "minimal"}) first',
'Consider deactivating instead of deleting',
'Export workflow before deletion for backup'
],
pitfalls: [
'Requires N8N_API_URL and N8N_API_KEY configured',
'Cannot be undone - permanent deletion',
'Deletes all execution history',
'Active workflows can be deleted',
'No built-in confirmation'
],
relatedTools: ['n8n_get_workflow', 'n8n_list_workflows', 'n8n_update_partial_workflow', 'n8n_executions']
}
};
//# sourceMappingURL=n8n-delete-workflow.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-delete-workflow.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-delete-workflow.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAsB;IACrD,IAAI,EAAE,qBAAqB;IAC3B,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW,EAAE,8DAA8D;QAC3E,aAAa,EAAE,CAAC,IAAI,CAAC;QACrB,OAAO,EAAE,2CAA2C;QACpD,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE;YACJ,wBAAwB;YACxB,+BAA+B;YAC/B,+DAA+D;SAChE;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,qPAAqP;QAClQ,UAAU,EAAE;YACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,mCAAmC,EAAE;SACzF;QACD,OAAO,EAAE,uEAAuE;QAChF,QAAQ,EAAE;YACR,gEAAgE;YAChE,yEAAyE;SAC1E;QACD,QAAQ,EAAE;YACR,2BAA2B;YAC3B,yBAAyB;YACzB,2BAA2B;YAC3B,wBAAwB;YACxB,mBAAmB;SACpB;QACD,WAAW,EAAE,mGAAmG;QAChH,aAAa,EAAE;YACb,gCAAgC;YAChC,+DAA+D;YAC/D,2CAA2C;YAC3C,4CAA4C;SAC7C;QACD,QAAQ,EAAE;YACR,iDAAiD;YACjD,uCAAuC;YACvC,+BAA+B;YAC/B,iCAAiC;YACjC,0BAA0B;SAC3B;QACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,gBAAgB,CAAC;KAC1G;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const n8nDeployTemplateDoc: ToolDocumentation;
//# sourceMappingURL=n8n-deploy-template.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-deploy-template.d.ts","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-deploy-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,oBAAoB,EAAE,iBAoElC,CAAC"}

View File

@@ -0,0 +1,73 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.n8nDeployTemplateDoc = void 0;
exports.n8nDeployTemplateDoc = {
name: 'n8n_deploy_template',
category: 'workflow_management',
essentials: {
description: 'Deploy a workflow template from n8n.io directly to your n8n instance. Deploys first, then auto-fixes common issues (expression format, typeVersions).',
keyParameters: ['templateId', 'name', 'autoUpgradeVersions', 'autoFix', 'stripCredentials'],
example: 'n8n_deploy_template({templateId: 2776, name: "My Deployed Template"})',
performance: 'Network-dependent',
tips: [
'Auto-fixes expression format issues after deployment',
'Workflow created inactive - configure credentials in n8n UI first',
'Returns list of required credentials and fixes applied',
'Use search_templates to find template IDs'
]
},
full: {
description: 'Deploys a workflow template from n8n.io directly to your n8n instance. This tool deploys first, then automatically fixes common issues like missing expression prefixes (=) and outdated typeVersions. Templates are stored locally and fetched from the database. The workflow is always created in an inactive state, allowing you to configure credentials before activation.',
parameters: {
templateId: { type: 'number', required: true, description: 'Template ID from n8n.io (find via search_templates)' },
name: { type: 'string', description: 'Custom workflow name (default: template name)' },
autoUpgradeVersions: { type: 'boolean', description: 'Upgrade node typeVersions to latest supported (default: true)' },
autoFix: { type: 'boolean', description: 'Auto-apply fixes after deployment for expression format issues, missing = prefix, etc. (default: true)' },
stripCredentials: { type: 'boolean', description: 'Remove credential references - user configures in n8n UI (default: true)' }
},
returns: 'Object with workflowId, name, nodeCount, triggerType, requiredCredentials array, url, templateId, templateUrl, autoFixStatus (success/failed/skipped), and fixesApplied array',
examples: [
`// Deploy template with default settings (auto-fix enabled)
n8n_deploy_template({templateId: 2776})`,
`// Deploy with custom name
n8n_deploy_template({
templateId: 2776,
name: "My Google Drive to Airtable Sync"
})`,
`// Deploy without auto-fix (not recommended)
n8n_deploy_template({
templateId: 2776,
autoFix: false
})`,
`// Keep original node versions (useful for compatibility)
n8n_deploy_template({
templateId: 2776,
autoUpgradeVersions: false
})`
],
useCases: [
'Quickly deploy pre-built workflow templates',
'Set up common automation patterns',
'Bootstrap new projects with proven workflows',
'Deploy templates found via search_templates'
],
performance: 'Network-dependent - Typically 300-800ms (template fetch + workflow creation + autofix)',
bestPractices: [
'Use search_templates to find templates by use case',
'Review required credentials in the response',
'Check autoFixStatus in response - "success", "failed", or "skipped"',
'Check fixesApplied in response to see what was automatically corrected',
'Configure credentials in n8n UI before activating',
'Test workflow before connecting to production systems'
],
pitfalls: [
'**REQUIRES N8N_API_URL and N8N_API_KEY environment variables** - tool unavailable without n8n API access',
'Workflows created in INACTIVE state - must configure credentials and activate in n8n',
'Templates may reference services you do not have (Slack, Google, etc.)',
'Template database must be populated - run npm run fetch:templates if templates not found',
'Some issues may not be auto-fixable (e.g., missing required fields that need user input)'
],
relatedTools: ['search_templates', 'get_template', 'n8n_create_workflow', 'n8n_autofix_workflow']
}
};
//# sourceMappingURL=n8n-deploy-template.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"n8n-deploy-template.js","sourceRoot":"","sources":["../../../../src/mcp/tool-docs/workflow_management/n8n-deploy-template.ts"],"names":[],"mappings":";;;AAEa,QAAA,oBAAoB,GAAsB;IACrD,IAAI,EAAE,qBAAqB;IAC3B,QAAQ,EAAE,qBAAqB;IAC/B,UAAU,EAAE;QACV,WAAW,EAAE,uJAAuJ;QACpK,aAAa,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,qBAAqB,EAAE,SAAS,EAAE,kBAAkB,CAAC;QAC3F,OAAO,EAAE,uEAAuE;QAChF,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE;YACJ,sDAAsD;YACtD,mEAAmE;YACnE,wDAAwD;YACxD,2CAA2C;SAC5C;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,kXAAkX;QAC/X,UAAU,EAAE;YACV,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,qDAAqD,EAAE;YAClH,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,+CAA+C,EAAE;YACtF,mBAAmB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,+DAA+D,EAAE;YACtH,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,wGAAwG,EAAE;YACnJ,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,0EAA0E,EAAE;SAC/H;QACD,OAAO,EAAE,+KAA+K;QACxL,QAAQ,EAAE;YACR;wCACkC;YAClC;;;;GAIH;YACG;;;;GAIH;YACG;;;;GAIH;SACE;QACD,QAAQ,EAAE;YACR,6CAA6C;YAC7C,mCAAmC;YACnC,8CAA8C;YAC9C,6CAA6C;SAC9C;QACD,WAAW,EAAE,wFAAwF;QACrG,aAAa,EAAE;YACb,oDAAoD;YACpD,6CAA6C;YAC7C,qEAAqE;YACrE,wEAAwE;YACxE,mDAAmD;YACnD,uDAAuD;SACxD;QACD,QAAQ,EAAE;YACR,0GAA0G;YAC1G,sFAAsF;YACtF,wEAAwE;YACxE,0FAA0F;YAC1F,0FAA0F;SAC3F;QACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,cAAc,EAAE,qBAAqB,EAAE,sBAAsB,CAAC;KAClG;CACF,CAAC"}

View File

@@ -0,0 +1,3 @@
import { ToolDocumentation } from '../types';
export declare const n8nExecutionsDoc: ToolDocumentation;
//# sourceMappingURL=n8n-executions.d.ts.map

View File

@@ -0,0 +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"}

View File

@@ -0,0 +1,84 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.n8nExecutionsDoc = void 0;
exports.n8nExecutionsDoc = {
name: 'n8n_executions',
category: 'workflow_management',
essentials: {
description: 'Manage workflow executions: get details, list, or delete. Unified tool for all execution operations.',
keyParameters: ['action', 'id', 'workflowId', 'status'],
example: 'n8n_executions({action: "list", workflowId: "abc123", status: "error"})',
performance: 'Fast (50-200ms)',
tips: [
'action="get": Get execution details by ID',
'action="list": List executions with filters',
'action="delete": Delete execution record',
'Use mode parameter for action=get to control detail level'
]
},
full: {
description: `**Actions:**
- get: Retrieve execution details by ID with configurable detail level
- list: List executions with filtering and pagination
- delete: Remove an execution record from history
**Detail Modes for action="get":**
- preview: Structure only, no data
- summary: 2 items per node (default)
- filtered: Custom items limit, optionally filter by node names
- full: All execution data (can be very large)`,
parameters: {
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)' },
mode: { type: 'string', required: false, description: 'For action=get: "preview", "summary" (default), "filtered", "full"' },
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)' },
includeInputData: { type: 'boolean', required: false, description: 'For action=get: Include input data in addition to output (default: false)' },
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")' },
limit: { type: 'number', required: false, description: 'For action=list: Number of results (1-100, default: 100)' },
cursor: { type: 'string', required: false, description: 'For action=list: Pagination cursor from previous response' },
projectId: { type: 'string', required: false, description: 'For action=list: Filter by project ID (enterprise)' },
includeData: { type: 'boolean', required: false, description: 'For action=list: Include execution data (default: false)' }
},
returns: `Depends on action:
- get: Execution object with data based on mode
- list: { data: [...executions], nextCursor?: string }
- delete: { success: boolean, message: string }`,
examples: [
'// List recent executions for a workflow\nn8n_executions({action: "list", workflowId: "abc123", limit: 10})',
'// List failed executions\nn8n_executions({action: "list", status: "error"})',
'// Get execution summary\nn8n_executions({action: "get", id: "exec_456"})',
'// Get full execution data\nn8n_executions({action: "get", id: "exec_456", mode: "full"})',
'// Get specific nodes from execution\nn8n_executions({action: "get", id: "exec_456", mode: "filtered", nodeNames: ["HTTP Request", "Slack"]})',
'// Delete an execution\nn8n_executions({action: "delete", id: "exec_456"})'
],
useCases: [
'Debug workflow failures (get with mode=full)',
'Monitor workflow health (list with status filter)',
'Audit execution history',
'Clean up old execution records',
'Analyze specific node outputs'
],
performance: `Response times:
- list: 50-150ms depending on filters
- get (preview/summary): 30-100ms
- get (full): 100-500ms+ depending on data size
- delete: 30-80ms`,
bestPractices: [
'Use mode="summary" (default) for debugging - shows enough data',
'Use mode="filtered" with nodeNames for large workflows',
'Filter by workflowId when listing to reduce results',
'Use cursor for pagination through large result sets',
'Delete old executions to save storage'
],
pitfalls: [
'Requires N8N_API_URL and N8N_API_KEY configured',
'mode="full" can return very large responses for complex workflows',
'Execution must exist or returns 404',
'Delete is permanent - cannot undo'
],
relatedTools: ['n8n_get_workflow', 'n8n_test_workflow', 'n8n_validate_workflow']
}
};
//# sourceMappingURL=n8n-executions.js.map

View File

@@ -0,0 +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,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,0FAA0F,EAAE;YACxJ,gBAAgB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,2EAA2E,EAAE;YAChJ,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,wCAAwC,EAAE;YACtG,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,mEAAmE,EAAE;YAC7H,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,0DAA0D,EAAE;YACnH,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,2DAA2D,EAAE;YACrH,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,oDAAoD,EAAE;YACjH,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,0DAA0D,EAAE;SAC3H;QACD,OAAO,EAAE;;;gDAGmC;QAC5C,QAAQ,EAAE;YACR,6GAA6G;YAC7G,8EAA8E;YAC9E,2EAA2E;YAC3E,2FAA2F;YAC3F,+IAA+I;YAC/I,4EAA4E;SAC7E;QACD,QAAQ,EAAE;YACR,8CAA8C;YAC9C,mDAAmD;YACnD,yBAAyB;YACzB,gCAAgC;YAChC,+BAA+B;SAChC;QACD,WAAW,EAAE;;;;kBAIC;QACd,aAAa,EAAE;YACb,gEAAgE;YAChE,wDAAwD;YACxD,qDAAqD;YACrD,qDAAqD;YACrD,uCAAuC;SACxC;QACD,QAAQ,EAAE;YACR,iDAAiD;YACjD,mEAAmE;YACnE,qCAAqC;YACrC,mCAAmC;SACpC;QACD,YAAY,EAAE,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,uBAAuB,CAAC;KACjF;CACF,CAAC"}

Some files were not shown because too many files have changed in this diff Show More