Workflow Management Tools
Create, update, and manage n8n workflows directly from your AI assistant. These tools connect to your n8n instance and require API credentials.
Setup Required
To use these tools, you need to connect your n8n instance:
- 1.Go to your n8n-mcp dashboard
- 2.Navigate to Instances, then add your instance URL and API key
You can generate an API key in your n8n instance under Settings → API.
Available Tools
n8n_create_workflow
Create a new workflow in your n8n instance. Workflows are always created in an inactive state, allowing you to configure credentials before activation.
| Parameter | Type | Description |
|---|---|---|
name* | string | Workflow name |
nodes* | array | Array of node objects with id, name, type, typeVersion, position, and parameters |
connections* | object | Node connections object |
settings | object | Workflow settings (timezone, error handling, etc.) |
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}]]
}
}
})- •Creating new automation workflows
- •Deploying workflows programmatically
- •Setting up integrations via API
- •Validate with validate_workflow first
- •Use unique node IDs
- •Position nodes for readability (typically 200px apart)
- •Test with n8n_test_workflow after creation
- •Use n8n_get_workflow if you need to verify the created workflow structure
- •Workflows are created INACTIVE - must activate separately
- •Node IDs must be unique within workflow
- •Credentials must be configured separately in n8n UI
- •Node type names must include package prefix
n8n_get_workflow
Retrieve a workflow from your n8n instance. Get workflow by ID with different detail levels to control response size.
| Parameter | Type | Description |
|---|---|---|
id* | string | Workflow ID |
mode | string | Detail levelfulldetailsstructureminimal |
Get complete workflow
n8n_get_workflow({id: "abc123"})Get workflow with execution stats
n8n_get_workflow({id: "abc123", mode: "details"})Quick metadata check
n8n_get_workflow({id: "abc123", mode: "minimal"})- •View and edit workflow (mode=full)
- •Analyze workflow performance (mode=details)
- •Clone or compare workflow structure (mode=structure)
- •List workflows with status (mode=minimal)
- •Use mode="minimal" when you only need metadata
- •Use mode="structure" for topology analysis
- •Use mode="details" for debugging execution issues
n8n_update_full_workflow
Complete workflow replacement. Any nodes or connections not included will be removed.
| Parameter | Type | Description |
|---|---|---|
id* | string | Workflow ID to update |
name | string | New workflow name |
nodes | array | Complete array of nodes |
connections | object | Complete connections object |
settings | object | Workflow settings |
intent | string | Description of the change |
Rename only
n8n_update_full_workflow({
id: "abc",
name: "New Name"
})Full structure update
n8n_update_full_workflow({
id: "xyz",
intent: "Add error handling nodes",
nodes: [...],
connections: {...}
})- •Major workflow restructuring
- •Complete workflow replacement
- •Renaming workflows
- •Always include intent parameter for better responses
- •Get workflow first, modify, then update
- •Validate with validate_workflow before updating
- •Use n8n_update_partial_workflow for small changes
- •Use n8n_get_workflow with mode='structure' if you need to verify the update
n8n_update_partial_workflow
Update workflow incrementally with diff operations. Supports 17 operation types for precise modifications. Operations are validated and applied atomically by default.
| Parameter | Type | Description |
|---|---|---|
id* | string | Workflow ID |
operations* | array | Array of diff operations (addNode, removeNode, updateNode, moveNode, enableNode, disableNode, addConnection, removeConnection, rewireConnection, cleanStaleConnections, replaceConnections, updateSettings, updateName, addTag, removeTag, activateWorkflow, deactivateWorkflow) |
validateOnly | boolean | Only validate without applying |
continueOnError | boolean | Best-effort mode |
intent | string | Description of the change |
Add a node and connect it
n8n_update_partial_workflow({
id: "wf_123",
intent: "Add HTTP request for API call",
operations: [
{type: "addNode", node: {
name: "HTTP Request",
type: "n8n-nodes-base.httpRequest",
position: [400, 300],
parameters: {url: "https://api.example.com"}
}},
{type: "addConnection", source: "Webhook", target: "HTTP Request"}
]
})Update node parameter
n8n_update_partial_workflow({
id: "abc",
intent: "Fix API URL",
operations: [{
type: "updateNode",
nodeName: "HTTP Request",
updates: {"parameters.url": "https://new-api.example.com"}
}]
})AI Agent connections
n8n_update_partial_workflow({
id: "ai_wf",
intent: "Set up AI Agent with tools",
operations: [
{type: "addConnection", source: "OpenAI", target: "AI Agent", sourceOutput: "ai_languageModel"},
{type: "addConnection", source: "HTTP Tool", target: "AI Agent", sourceOutput: "ai_tool"},
{type: "addConnection", source: "Memory", target: "AI Agent", sourceOutput: "ai_memory"}
]
})- •Incremental workflow updates
- •Adding/removing individual nodes
- •Rewiring connections
- •Setting up AI Agent workflows
- •Always include intent parameter with specific description
- •Use rewireConnection instead of remove+add for changing targets
- •Use branch="true"/"false" for IF nodes instead of sourceIndex
- •Use cleanStaleConnections after renaming/removing nodes
- •Validate with validateOnly first for complex changes
- •Use n8n_get_workflow with mode='structure' if you need to verify applied operations
n8n_delete_workflow
Permanently delete a workflow including all associated data and execution history. This action cannot be undone.
| Parameter | Type | Description |
|---|---|---|
id* | string | Workflow ID to delete |
Delete a workflow
n8n_delete_workflow({id: "abc123"})- •Removing obsolete workflows
- •Cleanup after testing
- •Managing workflow lifecycle
- •Always confirm before deleting
- •Consider exporting workflow first for backup
- •Deactivate workflow before deletion
- •Cannot be undone - permanent deletion
- •Deletes all execution history
- •Active workflows can be deleted
- •No built-in confirmation
n8n_list_workflows
List workflows from n8n with filtering options. Returns only minimal metadata (id, name, active, dates, tags).
| Parameter | Type | Description |
|---|---|---|
limit | number | Results per page (max: 100) |
cursor | string | Pagination cursor |
active | boolean | Filter by active/inactive |
tags | array | Filter by exact tag matches |
projectId | string | Filter by project (enterprise) |
First 20 workflows
n8n_list_workflows({limit: 20})Active production workflows
n8n_list_workflows({active: true, tags: ["production"]})- •Listing all workflows in an instance
- •Finding active workflows
- •Filtering by tags for organization
- •Pagination through large workflow sets
- •Use tags to organize workflows
- •Use cursor for pagination through large sets
- •Filter by active=true to find running workflows
n8n_validate_workflow
Validate a workflow from your n8n instance by ID. Fetches a workflow from n8n and runs comprehensive validation.
| Parameter | Type | Description |
|---|---|---|
id* | string | Workflow ID to validate |
options | object | Validation options (same as validate_workflow) |
Default validation
n8n_validate_workflow({id: "wf_abc123"})Strict validation
n8n_validate_workflow({
id: "wf_abc123",
options: {profile: "strict"}
})- •Validating workflows before running them in production
- •Checking imported workflows for compatibility
- •Debugging workflow execution failures
- •Pre-deployment validation in CI/CD pipelines
- •Validate before activating workflows
- •Use strict profile for production workflows
- •Check warnings even if validation passes
n8n_autofix_workflow
Automatically fix common workflow validation errors including expression formats, typeVersions, error outputs, webhook paths, and node type corrections.
| Parameter | Type | Description |
|---|---|---|
id* | string | Workflow ID to fix |
applyFixes | boolean | Apply fixes (false = preview) |
fixTypes | array | Types of fixes to applyexpression-formattypeversion-correctionerror-output-confignode-type-correctionwebhook-missing-pathtypeversion-upgradeversion-migration |
confidenceThreshold | string | Minimum confidencehighmediumlow |
maxFixes | number | Maximum fixes to apply |
Preview all fixes
n8n_autofix_workflow({id: "wf_abc123"})Apply all medium+ confidence fixes
n8n_autofix_workflow({id: "wf_abc123", applyFixes: true})Only high-confidence fixes
n8n_autofix_workflow({
id: "wf_abc123",
applyFixes: true,
confidenceThreshold: "high"
})- •Fixing expression format issues
- •Upgrading node versions
- •Fixing configuration errors
- •Migrating workflows to newer n8n versions
- •Always preview fixes first (applyFixes: false)
- •Start with high confidence threshold for production
- •Review the fix summary to understand what changed
- •Test workflows after auto-fixing
n8n_test_workflow
Test and trigger workflow execution through HTTP-based methods. Supports webhook, form, and chat triggers. Auto-detects trigger type from workflow.
| Parameter | Type | Description |
|---|---|---|
workflowId* | string | Workflow ID to execute |
triggerType | string | Trigger typewebhookformchatauto |
httpMethod | string | For webhook: HTTP method |
webhookPath | string | Override webhook path |
message | string | For chat: message to send |
sessionId | string | For chat: session ID |
data | object | Input data/payload |
headers | object | Custom HTTP headers |
timeout | number | Timeout in ms |
waitForResponse | boolean | Wait for completion |
Auto-detect and trigger
n8n_test_workflow({workflowId: "123"})Webhook with data
n8n_test_workflow({
workflowId: "123",
triggerType: "webhook",
data: {name: "John", email: "john@example.com"}
})Chat trigger
n8n_test_workflow({
workflowId: "123",
triggerType: "chat",
message: "Hello AI assistant"
})- •Testing workflows during development
- •Triggering workflows programmatically
- •Testing chat/AI workflows
- •Validating webhook integrations
- •Use auto-detect for most cases
- •Include test data matching expected input format
- •Test with different input scenarios
- •Workflow must be ACTIVE to be triggered
- •Only works with webhook/form/chat triggers
- •Schedule/manual triggers cannot be triggered via API
n8n_executions
Unified tool for execution management: get details, list executions, or delete records.
| Parameter | Type | Description |
|---|---|---|
action* | string | Action to performgetlistdelete |
id | string | Execution ID (for get/delete) |
mode | string | For get: response detailpreviewsummaryfilteredfull |
nodeNames | array | For get+filtered: filter by nodes |
itemsLimit | number | For get+filtered: items per node |
workflowId | string | For list: filter by workflow |
status | string | For list: filter by statussuccesserrorwaiting |
limit | number | For list: results per page |
cursor | string | For list: pagination cursor |
List recent executions
n8n_executions({
action: "list",
workflowId: "abc123",
limit: 10
})Get execution summary
n8n_executions({action: "get", id: "exec_456"})Get specific nodes from execution
n8n_executions({
action: "get",
id: "exec_456",
mode: "filtered",
nodeNames: ["HTTP Request", "Slack"]
})- •Debugging workflow failures
- •Analyzing execution performance
- •Cleaning up execution history
- •Monitoring workflow runs
- •Use status="error" to find failed executions
- •Use mode="filtered" to focus on specific nodes
- •Delete old executions to save storage
n8n_workflow_versions
Comprehensive workflow version management: list versions, rollback, cleanup.
| Parameter | Type | Description |
|---|---|---|
mode* | string | Operation modelistgetrollbackdeleteprunetruncate |
workflowId | string | Workflow ID |
versionId | number | Specific version ID |
limit | number | Max versions to return |
validateBefore | boolean | Validate before rollback |
deleteAll | boolean | Delete all versions |
maxVersions | number | Versions to keep (prune) |
confirmTruncate | boolean | Required for truncate |
List version history
n8n_workflow_versions({mode: "list", workflowId: "abc123", limit: 5})Rollback to latest saved version
n8n_workflow_versions({mode: "rollback", workflowId: "abc123"})Prune to keep only 5 most recent
n8n_workflow_versions({mode: "prune", workflowId: "abc123", maxVersions: 5})- •Rolling back broken changes
- •Viewing workflow history
- •Managing version storage
- •Comparing workflow versions
- •Always list versions before rollback
- •Enable validateBefore for rollback
- •Use prune regularly to manage storage
- •Never use truncate in production without explicit need
n8n_deploy_template
Deploy a workflow template from n8n.io directly to your n8n instance with auto-fixing of common issues.
| Parameter | Type | Description |
|---|---|---|
templateId* | number | Template ID from n8n.io |
name | string | Custom workflow name |
autoUpgradeVersions | boolean | Upgrade node typeVersions |
autoFix | boolean | Auto-fix expression issues |
stripCredentials | boolean | Remove credential references |
Deploy with default settings
n8n_deploy_template({templateId: 2776})Deploy with custom name
n8n_deploy_template({
templateId: 2776,
name: "My Google Drive to Airtable Sync"
})- •Quickly deploying popular templates
- •Setting up common integrations
- •Using templates as starting points
- •Use search_templates to find template IDs
- •Review required credentials in the response
- •Configure credentials in n8n UI before activating
- •Test workflow before connecting to production