n8n-mcp-tools-expert
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesen8n MCP Tools Expert
n8n MCP 工具专家指南
Master guide for using n8n-mcp MCP server tools to build workflows.
使用n8n-mcp MCP服务器工具构建工作流的权威指南。
Tool Categories
工具分类
n8n-mcp provides tools organized into categories:
- Node Discovery → SEARCH_GUIDE.md
- Configuration Validation → VALIDATION_GUIDE.md
- Workflow Management → WORKFLOW_GUIDE.md
- Template Library - Search and deploy 2,700+ real workflows
- Documentation & Guides - Tool docs, AI agent guide, Code node guides
n8n-mcp提供的工具分为以下类别:
- 节点发现 → SEARCH_GUIDE.md
- 配置验证 → VALIDATION_GUIDE.md
- 工作流管理 → WORKFLOW_GUIDE.md
- 模板库 - 搜索并部署2700+个实用工作流
- 文档与指南 - 工具文档、AI Agent指南、代码节点指南
Quick Reference
快速参考
Most Used Tools (by success rate)
最常用工具(按成功率排序)
| Tool | Use When | Speed |
|---|---|---|
| Finding nodes by keyword | <20ms |
| Understanding node operations (detail="standard") | <10ms |
| Checking configurations (mode="full") | <100ms |
| Creating workflows | 100-500ms |
| Editing workflows (MOST USED!) | 50-200ms |
| Checking complete workflow | 100-500ms |
| Deploy template to n8n instance | 200-500ms |
| 工具 | 使用场景 | 响应速度 |
|---|---|---|
| 通过关键词查找节点 | <20ms |
| 了解节点操作(detail="standard") | <10ms |
| 检查配置(mode="full") | <100ms |
| 创建工作流 | 100-500ms |
| 编辑工作流(最常用!) | 50-200ms |
| 检查完整工作流 | 100-500ms |
| 将模板部署到n8n实例 | 200-500ms |
Tool Selection Guide
工具选择指南
Finding the Right Node
查找合适的节点
Workflow:
1. search_nodes({query: "keyword"})
2. get_node({nodeType: "nodes-base.name"})
3. [Optional] get_node({nodeType: "nodes-base.name", mode: "docs"})Example:
javascript
// Step 1: Search
search_nodes({query: "slack"})
// Returns: nodes-base.slack
// Step 2: Get details
get_node({nodeType: "nodes-base.slack"})
// Returns: operations, properties, examples (standard detail)
// Step 3: Get readable documentation
get_node({nodeType: "nodes-base.slack", mode: "docs"})
// Returns: markdown documentationCommon pattern: search → get_node (18s average)
工作流:
1. search_nodes({query: "keyword"})
2. get_node({nodeType: "nodes-base.name"})
3. [可选] get_node({nodeType: "nodes-base.name", mode: "docs"})示例:
javascript
// 步骤1:搜索
search_nodes({query: "slack"})
// 返回结果: nodes-base.slack
// 步骤2:获取详情
get_node({nodeType: "nodes-base.slack"})
// 返回结果: 操作、属性、示例(标准详情)
// 步骤3:获取可读文档
get_node({nodeType: "nodes-base.slack", mode: "docs"})
// 返回结果: Markdown格式文档常用模式: 搜索 → 获取节点详情(平均耗时18秒)
Validating Configuration
验证配置
Workflow:
1. validate_node({nodeType, config: {}, mode: "minimal"}) - Check required fields
2. validate_node({nodeType, config, profile: "runtime"}) - Full validation
3. [Repeat] Fix errors, validate againCommon pattern: validate → fix → validate (23s thinking, 58s fixing per cycle)
工作流:
1. validate_node({nodeType, config: {}, mode: "minimal"}) - 检查必填字段
2. validate_node({nodeType, config, profile: "runtime"}) - 完整验证
3. [重复] 修复错误,再次验证常用模式: 验证 → 修复 → 验证(每个周期平均思考23秒,修复58秒)
Managing Workflows
管理工作流
Workflow:
1. n8n_create_workflow({name, nodes, connections})
2. n8n_validate_workflow({id})
3. n8n_update_partial_workflow({id, operations: [...]})
4. n8n_validate_workflow({id}) again
5. n8n_update_partial_workflow({id, operations: [{type: "activateWorkflow"}]})Common pattern: iterative updates (56s average between edits)
工作流:
1. n8n_create_workflow({name, nodes, connections})
2. n8n_validate_workflow({id})
3. n8n_update_partial_workflow({id, operations: [...]})
4. 再次执行n8n_validate_workflow({id})
5. n8n_update_partial_workflow({id, operations: [{type: "activateWorkflow"}]})常用模式: 迭代更新(两次编辑间隔平均56秒)
Critical: nodeType Formats
重点:nodeType格式
Two different formats for different tools!
不同工具使用两种不同格式!
Format 1: Search/Validate Tools
格式1:搜索/验证工具
javascript
// Use SHORT prefix
"nodes-base.slack"
"nodes-base.httpRequest"
"nodes-base.webhook"
"nodes-langchain.agent"Tools that use this:
- search_nodes (returns this format)
- get_node
- validate_node
- validate_workflow
javascript
// 使用短前缀
"nodes-base.slack"
"nodes-base.httpRequest"
"nodes-base.webhook"
"nodes-langchain.agent"使用此格式的工具:
- search_nodes(返回此格式)
- get_node
- validate_node
- validate_workflow
Format 2: Workflow Tools
格式2:工作流工具
javascript
// Use FULL prefix
"n8n-nodes-base.slack"
"n8n-nodes-base.httpRequest"
"n8n-nodes-base.webhook"
"@n8n/n8n-nodes-langchain.agent"Tools that use this:
- n8n_create_workflow
- n8n_update_partial_workflow
javascript
// 使用完整前缀
"n8n-nodes-base.slack"
"n8n-nodes-base.httpRequest"
"n8n-nodes-base.webhook"
"@n8n/n8n-nodes-langchain.agent"使用此格式的工具:
- n8n_create_workflow
- n8n_update_partial_workflow
Conversion
格式转换
javascript
// search_nodes returns BOTH formats
{
"nodeType": "nodes-base.slack", // For search/validate tools
"workflowNodeType": "n8n-nodes-base.slack" // For workflow tools
}javascript
// search_nodes会同时返回两种格式
{
"nodeType": "nodes-base.slack", // 用于搜索/验证工具
"workflowNodeType": "n8n-nodes-base.slack" // 用于工作流工具
}Common Mistakes
常见错误
Mistake 1: Wrong nodeType Format
错误1:nodeType格式错误
Problem: "Node not found" error
javascript
// WRONG
get_node({nodeType: "slack"}) // Missing prefix
get_node({nodeType: "n8n-nodes-base.slack"}) // Wrong prefix
// CORRECT
get_node({nodeType: "nodes-base.slack"})问题:出现“节点未找到”错误
javascript
// 错误示例
get_node({nodeType: "slack"}) // 缺少前缀
get_node({nodeType: "n8n-nodes-base.slack"}) // 前缀错误
// 正确示例
get_node({nodeType: "nodes-base.slack"})Mistake 2: Using detail="full" by Default
错误2:默认使用detail="full"
Problem: Huge payload, slower response, token waste
javascript
// WRONG - Returns 3-8K tokens, use sparingly
get_node({nodeType: "nodes-base.slack", detail: "full"})
// CORRECT - Returns 1-2K tokens, covers 95% of use cases
get_node({nodeType: "nodes-base.slack"}) // detail="standard" is default
get_node({nodeType: "nodes-base.slack", detail: "standard"})When to use detail="full":
- Debugging complex configuration issues
- Need complete property schema with all nested options
- Exploring advanced features
Better alternatives:
- - for operations list (default)
get_node({detail: "standard"}) - - for readable documentation
get_node({mode: "docs"}) - - for specific property
get_node({mode: "search_properties", propertyQuery: "auth"})
问题:返回超大负载、响应缓慢、浪费令牌
javascript
// 错误示例 - 返回3-8K令牌,谨慎使用
get_node({nodeType: "nodes-base.slack", detail: "full"})
// 正确示例 - 返回1-2K令牌,覆盖95%的使用场景
get_node({nodeType: "nodes-base.slack"}) // 默认detail="standard"
get_node({nodeType: "nodes-base.slack", detail: "standard"})何时使用detail="full":
- 调试复杂配置问题
- 需要包含所有嵌套选项的完整属性 schema
- 探索高级功能
更好的替代方案:
- - 获取操作列表(默认)
get_node({detail: "standard"}) - - 获取可读文档
get_node({mode: "docs"}) - - 获取特定属性
get_node({mode: "search_properties", propertyQuery: "auth"})
Mistake 3: Not Using Validation Profiles
错误3:未使用验证配置文件
Problem: Too many false positives OR missing real errors
Profiles:
- - Only required fields (fast, permissive)
minimal - - Values + types (recommended for pre-deployment)
runtime - - Reduce false positives (for AI configuration)
ai-friendly - - Maximum validation (for production)
strict
javascript
// WRONG - Uses default profile
validate_node({nodeType, config})
// CORRECT - Explicit profile
validate_node({nodeType, config, profile: "runtime"})问题:误报过多或遗漏真实错误
配置文件:
- - 仅检查必填字段(快速、宽松)
minimal - - 检查值和类型(预部署推荐)
runtime - - 减少误报(适用于AI配置)
ai-friendly - - 最全面的验证(生产环境)
strict
javascript
// 错误示例 - 使用默认配置文件
validate_node({nodeType, config})
// 正确示例 - 显式指定配置文件
validate_node({nodeType, config, profile: "runtime"})Mistake 4: Ignoring Auto-Sanitization
错误4:忽略自动清理机制
What happens: ALL nodes sanitized on ANY workflow update
Auto-fixes:
- Binary operators (equals, contains) → removes singleValue
- Unary operators (isEmpty, isNotEmpty) → adds singleValue: true
- IF/Switch nodes → adds missing metadata
Cannot fix:
- Broken connections
- Branch count mismatches
- Paradoxical corrupt states
javascript
// After ANY update, auto-sanitization runs on ALL nodes
n8n_update_partial_workflow({id, operations: [...]})
// → Automatically fixes operator structures现象:任何工作流更新时,所有节点都会被自动清理
自动修复内容:
- 二元运算符(等于、包含)→ 移除singleValue
- 一元运算符(isEmpty、isNotEmpty)→ 添加singleValue: true
- IF/Switch节点 → 添加缺失的元数据
无法修复的内容:
- 断开的连接
- 分支数量不匹配
- 矛盾的损坏状态
javascript
// 任何更新后,自动清理机制会对所有节点生效
n8n_update_partial_workflow({id, operations: [...]})
// → 自动修复运算符结构Mistake 5: Not Using Smart Parameters
错误5:未使用智能参数
Problem: Complex sourceIndex calculations for multi-output nodes
Old way (manual):
javascript
// IF node connection
{
type: "addConnection",
source: "IF",
target: "Handler",
sourceIndex: 0 // Which output? Hard to remember!
}New way (smart parameters):
javascript
// IF node - semantic branch names
{
type: "addConnection",
source: "IF",
target: "True Handler",
branch: "true" // Clear and readable!
}
{
type: "addConnection",
source: "IF",
target: "False Handler",
branch: "false"
}
// Switch node - semantic case numbers
{
type: "addConnection",
source: "Switch",
target: "Handler A",
case: 0
}问题:多输出节点的sourceIndex计算复杂
旧方式(手动):
javascript
// IF节点连接
{
type: "addConnection",
source: "IF",
target: "Handler",
sourceIndex: 0 // 对应哪个输出?很难记住!
}新方式(智能参数):
javascript
// IF节点 - 语义化分支名称
{
type: "addConnection",
source: "IF",
target: "True Handler",
branch: "true" // 清晰易读!
}
{
type: "addConnection",
source: "IF",
target: "False Handler",
branch: "false"
}
// Switch节点 - 语义化分支编号
{
type: "addConnection",
source: "Switch",
target: "Handler A",
case: 0
}Mistake 6: Not Using intent Parameter
错误6:未使用intent参数
Problem: Less helpful tool responses
javascript
// WRONG - No context for response
n8n_update_partial_workflow({
id: "abc",
operations: [{type: "addNode", node: {...}}]
})
// CORRECT - Better AI responses
n8n_update_partial_workflow({
id: "abc",
intent: "Add error handling for API failures",
operations: [{type: "addNode", node: {...}}]
})问题:工具响应的帮助性不足
javascript
// 错误示例 - 响应无上下文
n8n_update_partial_workflow({
id: "abc",
operations: [{type: "addNode", node: {...}}]
})
// 正确示例 - AI响应更精准
n8n_update_partial_workflow({
id: "abc",
intent: "为API失败添加错误处理",
operations: [{type: "addNode", node: {...}}]
})Tool Usage Patterns
工具使用模式
Pattern 1: Node Discovery (Most Common)
模式1:节点发现(最常见)
Common workflow: 18s average between steps
javascript
// Step 1: Search (fast!)
const results = await search_nodes({
query: "slack",
mode: "OR", // Default: any word matches
limit: 20
});
// → Returns: nodes-base.slack, nodes-base.slackTrigger
// Step 2: Get details (~18s later, user reviewing results)
const details = await get_node({
nodeType: "nodes-base.slack",
includeExamples: true // Get real template configs
});
// → Returns: operations, properties, metadata常用工作流: 步骤间平均耗时18秒
javascript
// 步骤1:搜索(快速!)
const results = await search_nodes({
query: "slack",
mode: "OR", // 默认:匹配任意关键词
limit: 20
});
// → 返回结果: nodes-base.slack, nodes-base.slackTrigger
// 步骤2:获取详情(约18秒后,用户查看结果)
const details = await get_node({
nodeType: "nodes-base.slack",
includeExamples: true // 获取真实模板配置
});
// → 返回结果: 操作、属性、元数据Pattern 2: Validation Loop
模式2:验证循环
Typical cycle: 23s thinking, 58s fixing
javascript
// Step 1: Validate
const result = await validate_node({
nodeType: "nodes-base.slack",
config: {
resource: "channel",
operation: "create"
},
profile: "runtime"
});
// Step 2: Check errors (~23s thinking)
if (!result.valid) {
console.log(result.errors); // "Missing required field: name"
}
// Step 3: Fix config (~58s fixing)
config.name = "general";
// Step 4: Validate again
await validate_node({...}); // Repeat until clean典型周期: 思考23秒,修复58秒
javascript
// 步骤1:验证
const result = await validate_node({
nodeType: "nodes-base.slack",
config: {
resource: "channel",
operation: "create"
},
profile: "runtime"
});
// 步骤2:检查错误(约23秒思考后)
if (!result.valid) {
console.log(result.errors); // "缺少必填字段: name"
}
// 步骤3:修复配置(约58秒修复后)
config.name = "general";
// 步骤4:再次验证
await validate_node({...}); // 重复直到验证通过Pattern 3: Workflow Editing
模式3:工作流编辑
Most used update tool: 99.0% success rate, 56s average between edits
javascript
// Iterative workflow building (NOT one-shot!)
// Edit 1
await n8n_update_partial_workflow({
id: "workflow-id",
intent: "Add webhook trigger",
operations: [{type: "addNode", node: {...}}]
});
// ~56s later...
// Edit 2
await n8n_update_partial_workflow({
id: "workflow-id",
intent: "Connect webhook to processor",
operations: [{type: "addConnection", source: "...", target: "..."}]
});
// ~56s later...
// Edit 3 (validation)
await n8n_validate_workflow({id: "workflow-id"});
// Ready? Activate!
await n8n_update_partial_workflow({
id: "workflow-id",
intent: "Activate workflow for production",
operations: [{type: "activateWorkflow"}]
});最常用的更新工具: 成功率99.0%,两次编辑间隔平均56秒
javascript
// 迭代式工作流构建(不要一次性完成!)
// 编辑1
await n8n_update_partial_workflow({
id: "workflow-id",
intent: "添加Webhook触发器",
operations: [{type: "addNode", node: {...}}]
});
// 约56秒后...
// 编辑2
await n8n_update_partial_workflow({
id: "workflow-id",
intent: "连接Webhook到处理器",
operations: [{type: "addConnection", source: "...", target: "..."}]
});
// 约56秒后...
// 编辑3(验证)
await n8n_validate_workflow({id: "workflow-id"});
// 准备就绪?激活工作流!
await n8n_update_partial_workflow({
id: "workflow-id",
intent: "激活生产环境工作流",
operations: [{type: "activateWorkflow"}]
});Detailed Guides
详细指南
Node Discovery Tools
节点发现工具
See SEARCH_GUIDE.md for:
- search_nodes
- get_node with detail levels (minimal, standard, full)
- get_node modes (info, docs, search_properties, versions)
查看SEARCH_GUIDE.md了解:
- search_nodes
- 不同详情级别的get_node(minimal、standard、full)
- 不同模式的get_node(info、docs、search_properties、versions)
Validation Tools
验证工具
See VALIDATION_GUIDE.md for:
- Validation profiles explained
- validate_node with modes (minimal, full)
- validate_workflow complete structure
- Auto-sanitization system
- Handling validation errors
查看VALIDATION_GUIDE.md了解:
- 验证配置文件说明
- 不同模式的validate_node(minimal、full)
- validate_workflow的完整结构
- 自动清理系统
- 处理验证错误
Workflow Management
工作流管理
See WORKFLOW_GUIDE.md for:
- n8n_create_workflow
- n8n_update_partial_workflow (17 operation types!)
- Smart parameters (branch, case)
- AI connection types (8 types)
- Workflow activation (activateWorkflow/deactivateWorkflow)
- n8n_deploy_template
- n8n_workflow_versions
查看WORKFLOW_GUIDE.md了解:
- n8n_create_workflow
- n8n_update_partial_workflow(17种操作类型!)
- 智能参数(branch、case)
- AI连接类型(8种)
- 工作流激活(activateWorkflow/deactivateWorkflow)
- n8n_deploy_template
- n8n_workflow_versions
Template Usage
模板使用
Search Templates
搜索模板
javascript
// Search by keyword (default mode)
search_templates({
query: "webhook slack",
limit: 20
});
// Search by node types
search_templates({
searchMode: "by_nodes",
nodeTypes: ["n8n-nodes-base.httpRequest", "n8n-nodes-base.slack"]
});
// Search by task type
search_templates({
searchMode: "by_task",
task: "webhook_processing"
});
// Search by metadata (complexity, setup time)
search_templates({
searchMode: "by_metadata",
complexity: "simple",
maxSetupMinutes: 15
});javascript
// 按关键词搜索(默认模式)
search_templates({
query: "webhook slack",
limit: 20
});
// 按节点类型搜索
search_templates({
searchMode: "by_nodes",
nodeTypes: ["n8n-nodes-base.httpRequest", "n8n-nodes-base.slack"]
});
// 按任务类型搜索
search_templates({
searchMode: "by_task",
task: "webhook_processing"
});
// 按元数据搜索(复杂度、设置时间)
search_templates({
searchMode: "by_metadata",
complexity: "simple",
maxSetupMinutes: 15
});Get Template Details
获取模板详情
javascript
get_template({
templateId: 2947,
mode: "structure" // nodes+connections only
});
get_template({
templateId: 2947,
mode: "full" // complete workflow JSON
});javascript
get_template({
templateId: 2947,
mode: "structure" // 仅包含节点和连接
});
get_template({
templateId: 2947,
mode: "full" // 完整工作流JSON
});Deploy Template Directly
直接部署模板
javascript
// Deploy template to your n8n instance
n8n_deploy_template({
templateId: 2947,
name: "My Weather to Slack", // Custom name (optional)
autoFix: true, // Auto-fix common issues (default)
autoUpgradeVersions: true // Upgrade node versions (default)
});
// Returns: workflow ID, required credentials, fixes appliedjavascript
// 将模板部署到你的n8n实例
n8n_deploy_template({
templateId: 2947,
name: "我的天气转Slack通知", // 自定义名称(可选)
autoFix: true, // 自动修复常见问题(默认开启)
autoUpgradeVersions: true // 升级节点版本(默认开启)
});
// 返回结果: 工作流ID、所需凭据、已应用的修复Self-Help Tools
自助工具
Get Tool Documentation
获取工具文档
javascript
// Overview of all tools
tools_documentation()
// Specific tool details
tools_documentation({
topic: "search_nodes",
depth: "full"
})
// Code node guides
tools_documentation({topic: "javascript_code_node_guide", depth: "full"})
tools_documentation({topic: "python_code_node_guide", depth: "full"})javascript
// 所有工具概览
tools_documentation()
// 特定工具详情
tools_documentation({
topic: "search_nodes",
depth: "full"
})
// 代码节点指南
tools_documentation({topic: "javascript_code_node_guide", depth: "full"})
tools_documentation({topic: "python_code_node_guide", depth: "full"})AI Agent Guide
AI Agent指南
javascript
// Comprehensive AI workflow guide
ai_agents_guide()
// Returns: Architecture, connections, tools, validation, best practicesjavascript
// 全面的AI工作流指南
ai_agents_guide()
// 返回结果: 架构、连接、工具、验证、最佳实践Health Check
健康检查
javascript
// Quick health check
n8n_health_check()
// Detailed diagnostics
n8n_health_check({mode: "diagnostic"})
// → Returns: status, env vars, tool status, API connectivityjavascript
// 快速健康检查
n8n_health_check()
// 详细诊断
n8n_health_check({mode: "diagnostic"})
// → 返回结果: 状态、环境变量、工具状态、API连通性Tool Availability
工具可用性
Always Available (no n8n API needed):
- search_nodes, get_node
- validate_node, validate_workflow
- search_templates, get_template
- tools_documentation, ai_agents_guide
Requires n8n API (N8N_API_URL + N8N_API_KEY):
- n8n_create_workflow
- n8n_update_partial_workflow
- n8n_validate_workflow (by ID)
- n8n_list_workflows, n8n_get_workflow
- n8n_test_workflow
- n8n_executions
- n8n_deploy_template
- n8n_workflow_versions
- n8n_autofix_workflow
If API tools unavailable, use templates and validation-only workflows.
始终可用(无需n8n API):
- search_nodes、get_node
- validate_node、validate_workflow
- search_templates、get_template
- tools_documentation、ai_agents_guide
需要n8n API(需配置N8N_API_URL + N8N_API_KEY):
- n8n_create_workflow
- n8n_update_partial_workflow
- n8n_validate_workflow(按ID)
- n8n_list_workflows、n8n_get_workflow
- n8n_test_workflow
- n8n_executions
- n8n_deploy_template
- n8n_workflow_versions
- n8n_autofix_workflow
如果API工具不可用,请使用模板和仅验证工作流。
Unified Tool Reference
统一工具参考
get_node (Unified Node Information)
get_node(统一节点信息)
Detail Levels (mode="info", default):
- (~200 tokens) - Basic metadata only
minimal - (~1-2K tokens) - Essential properties + operations (RECOMMENDED)
standard - (~3-8K tokens) - Complete schema (use sparingly)
full
Operation Modes:
- (default) - Node schema with detail level
info - - Readable markdown documentation
docs - - Find specific properties (use with propertyQuery)
search_properties - - List all versions with breaking changes
versions - - Compare two versions
compare - - Show only breaking changes
breaking - - Show auto-migratable changes
migrations
javascript
// Standard (recommended)
get_node({nodeType: "nodes-base.httpRequest"})
// Get documentation
get_node({nodeType: "nodes-base.webhook", mode: "docs"})
// Search for properties
get_node({nodeType: "nodes-base.httpRequest", mode: "search_properties", propertyQuery: "auth"})
// Check versions
get_node({nodeType: "nodes-base.executeWorkflow", mode: "versions"})详情级别(mode="info",默认):
- (约200令牌)- 仅基础元数据
minimal - (约1-2K令牌)- 核心属性+操作(推荐)
standard - (约3-8K令牌)- 完整schema(谨慎使用)
full
操作模式:
- (默认)- 指定详情级别的节点schema
info - - 可读的Markdown文档
docs - - 查找特定属性(配合propertyQuery使用)
search_properties - - 列出所有版本及破坏性变更
versions - - 比较两个版本
compare - - 仅显示破坏性变更
breaking - - 显示可自动迁移的变更
migrations
javascript
// 标准模式(推荐)
get_node({nodeType: "nodes-base.httpRequest"})
// 获取文档
get_node({nodeType: "nodes-base.webhook", mode: "docs"})
// 搜索属性
get_node({nodeType: "nodes-base.httpRequest", mode: "search_properties", propertyQuery: "auth"})
// 检查版本
get_node({nodeType: "nodes-base.executeWorkflow", mode: "versions"})validate_node (Unified Validation)
validate_node(统一验证)
Modes:
- (default) - Comprehensive validation with errors/warnings/suggestions
full - - Quick required fields check only
minimal
Profiles (for mode="full"):
- - Very lenient
minimal - - Standard (default, recommended)
runtime - - Balanced for AI workflows
ai-friendly - - Most thorough (production)
strict
javascript
// Full validation with runtime profile
validate_node({nodeType: "nodes-base.slack", config: {...}, profile: "runtime"})
// Quick required fields check
validate_node({nodeType: "nodes-base.webhook", config: {}, mode: "minimal"})模式:
- (默认)- 包含错误/警告/建议的全面验证
full - - 仅快速检查必填字段
minimal
配置文件(适用于mode="full"):
- - 非常宽松
minimal - - 标准(默认,推荐)
runtime - - 平衡AI工作流需求
ai-friendly - - 最严格(生产环境)
strict
javascript
// 使用runtime配置文件的完整验证
validate_node({nodeType: "nodes-base.slack", config: {...}, profile: "runtime"})
// 快速必填字段检查
validate_node({nodeType: "nodes-base.webhook", config: {}, mode: "minimal"})Performance Characteristics
性能特征
| Tool | Response Time | Payload Size |
|---|---|---|
| search_nodes | <20ms | Small |
| get_node (standard) | <10ms | ~1-2KB |
| get_node (full) | <100ms | 3-8KB |
| validate_node (minimal) | <50ms | Small |
| validate_node (full) | <100ms | Medium |
| validate_workflow | 100-500ms | Medium |
| n8n_create_workflow | 100-500ms | Medium |
| n8n_update_partial_workflow | 50-200ms | Small |
| n8n_deploy_template | 200-500ms | Medium |
| 工具 | 响应时间 | 负载大小 |
|---|---|---|
| search_nodes | <20ms | 小 |
| get_node(standard) | <10ms | ~1-2KB |
| get_node(full) | <100ms | 3-8KB |
| validate_node(minimal) | <50ms | 小 |
| validate_node(full) | <100ms | 中 |
| validate_workflow | 100-500ms | 中 |
| n8n_create_workflow | 100-500ms | 中 |
| n8n_update_partial_workflow | 50-200ms | 小 |
| n8n_deploy_template | 200-500ms | 中 |
Best Practices
最佳实践
Do
建议
- Use for most use cases
get_node({detail: "standard"}) - Specify validation profile explicitly ()
profile: "runtime" - Use smart parameters (,
branch) for claritycase - Include parameter in workflow updates
intent - Follow search → get_node → validate workflow
- Iterate workflows (avg 56s between edits)
- Validate after every significant change
- Use for real configs
includeExamples: true - Use for quick starts
n8n_deploy_template
- 大多数场景使用
get_node({detail: "standard"}) - 显式指定验证配置文件()
profile: "runtime" - 使用智能参数(、
branch)提升可读性case - 工作流更新时包含参数
intent - 遵循搜索 → 获取节点 → 验证的工作流
- 迭代构建工作流(平均56秒间隔编辑)
- 每次重大变更后执行验证
- 使用获取真实配置
includeExamples: true - 使用快速启动项目
n8n_deploy_template
Don't
不建议
- Use unless necessary (wastes tokens)
detail: "full" - Forget nodeType prefix ()
nodes-base.* - Skip validation profiles
- Try to build workflows in one shot (iterate!)
- Ignore auto-sanitization behavior
- Use full prefix () with search/validate tools
n8n-nodes-base.* - Forget to activate workflows after building
- 非必要时使用(浪费令牌)
detail: "full" - 忘记nodeType前缀()
nodes-base.* - 跳过验证配置文件
- 尝试一次性构建工作流(要迭代!)
- 忽略自动清理机制的行为
- 在搜索/验证工具中使用完整前缀()
n8n-nodes-base.* - 构建完成后忘记激活工作流
Summary
总结
Most Important:
- Use get_node with (default) - covers 95% of use cases
detail: "standard" - nodeType formats differ: (search/validate) vs
nodes-base.*(workflows)n8n-nodes-base.* - Specify validation profiles (recommended)
runtime - Use smart parameters (,
branch="true")case=0 - Include intent parameter in workflow updates
- Auto-sanitization runs on ALL nodes during updates
- Workflows can be activated via API (operation)
activateWorkflow - Workflows are built iteratively (56s avg between edits)
Common Workflow:
- search_nodes → find node
- get_node → understand config
- validate_node → check config
- n8n_create_workflow → build
- n8n_validate_workflow → verify
- n8n_update_partial_workflow → iterate
- activateWorkflow → go live!
For details, see:
- SEARCH_GUIDE.md - Node discovery
- VALIDATION_GUIDE.md - Configuration validation
- WORKFLOW_GUIDE.md - Workflow management
Related Skills:
- n8n Expression Syntax - Write expressions in workflow fields
- n8n Workflow Patterns - Architectural patterns from templates
- n8n Validation Expert - Interpret validation errors
- n8n Node Configuration - Operation-specific requirements
- n8n Code JavaScript - Write JavaScript in Code nodes
- n8n Code Python - Write Python in Code nodes
最重要的要点:
- 使用get_node并设置(默认)- 覆盖95%的使用场景
detail: "standard" - nodeType格式不同:(搜索/验证) vs
nodes-base.*(工作流)n8n-nodes-base.* - 指定验证配置文件(推荐)
runtime - 使用智能参数(、
branch="true")case=0 - 工作流更新时包含intent参数
- 更新期间所有节点都会执行自动清理
- 可通过API激活工作流(操作)
activateWorkflow - 工作流需迭代构建(平均56秒编辑间隔)
通用工作流:
- search_nodes → 查找节点
- get_node → 了解配置
- validate_node → 检查配置
- n8n_create_workflow → 构建
- n8n_validate_workflow → 验证
- n8n_update_partial_workflow → 迭代
- activateWorkflow → 上线!
如需详细信息,请查看:
- SEARCH_GUIDE.md - 节点发现
- VALIDATION_GUIDE.md - 配置验证
- WORKFLOW_GUIDE.md - 工作流管理
相关技能:
- n8n表达式语法 - 在工作流字段中编写表达式
- n8n工作流模式 - 来自模板的架构模式
- n8n验证专家 - 解读验证错误
- n8n节点配置 - 特定操作的要求
- n8n代码JavaScript - 在代码节点中编写JavaScript
- n8n代码Python - 在代码节点中编写Python