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.) |
nodeGroups | array | Canvas groups (n8n 2.28+): [{name, nodeIds, description?}]. Members must form a connected run with no trigger among them. Dropped with a warning on older n8n. |
projectId | string | Project to create the workflow in (enterprise). Defaults to the personal project. |
parentFolderId | string | Folder to place the workflow in (n8n 2.32+; rejected with a 400 on older instances). Omit for the project root. Create folders with n8n_manage_folders. |
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. n8n keeps a draft (what you see in the editor) and an active version (the published graph that actually runs) — the workflow body is the draft, and mode="active" returns the published graph. Six modes control response size.
| Parameter | Type | Description |
|---|---|---|
id* | string | Workflow ID |
mode | string | Detail level. "active" returns the published graph; every other mode reads the draft.fulldetailsactivestructurefilteredminimal |
nodeNames | array | Required when mode="filtered". Node names or node IDs to return with full config. Discover names cheaply with mode="structure" first. |
Get the draft workflow
n8n_get_workflow({id: "abc123"})Get the published (running) graph
n8n_get_workflow({id: "abc123", mode: "active"})Use this to reason about what is actually running in production, not what is being edited. Diff against mode="full" to see unpublished changes.
Read one heavy node without the whole workflow
n8n_get_workflow({
id: "abc123",
mode: "filtered",
nodeNames: ["Process Data"]
})Pulls the full config of just these nodes — the way to read a long Code node on a large workflow that would otherwise be truncated
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 the draft (mode=full)
- •Inspect what is actually running in production (mode=active)
- •Diff draft vs published before promoting (mode=full + mode=active)
- •Read a single heavy node such as a long Code body (mode=filtered)
- •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, then mode="filtered" to read a specific heavy node
- •Use mode="active" when the question is "what is running right now?"
- •Use mode="details" for debugging execution issues
- •mode="full" no longer carries the nested activeVersion payload — use mode="active" if you previously read it from there
- •mode="active" returns code NO_ACTIVE_VERSION for workflows that were never published
- •mode="filtered" matches each entry against node name OR node id, so returnedCount can exceed nodeNames.length when names collide — disambiguate by the id on each returned node
- •Older n8n versions have no draft/publish split; mode="active" falls back to workflow.nodes when the workflow is active
- •Credentials are referenced by ID but their values are never included
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 |
nodeGroups | array | Canvas groups (n8n 2.28+): [{name, nodeIds, description?}]. Omit to keep existing groups; pass [] to ungroup everything. Groups whose members a nodes[] update deleted are pruned automatically. |
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 21 operation types for precise modifications, including patchNodeField for surgical string edits inside Code nodes. Operations are validated and applied atomically by default.
| Parameter | Type | Description |
|---|---|---|
id* | string | Workflow ID |
operations* | array | Array of diff operations. Nodes — addNode, removeNode, updateNode, patchNodeField, moveNode, enableNode, disableNode. Connections — addConnection, removeConnection, rewireConnection, cleanStaleConnections, replaceConnections. Metadata — updateSettings, updateName, setNodeGroups, addTag, removeTag. Activation — activateWorkflow, deactivateWorkflow. Placement — transferWorkflow, moveToFolder. |
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"}
]
})Surgical Code node edit (patchNodeField)
n8n_update_partial_workflow({
id: "wf_123",
intent: "Bump retry limit in Code node from 3 to 5",
operations: [{
type: "patchNodeField",
nodeName: "Process Items",
fieldPath: "parameters.jsCode",
patches: [{
find: "const MAX_RETRIES = 3;",
replace: "const MAX_RETRIES = 5;"
}]
}]
})Edits a specific string inside a long Code node body without re-sending the whole script. Strict: errors if the find string is missing, and errors on multiple matches unless replaceAll is set.
Replace every occurrence, or match by regex
n8n_update_partial_workflow({
id: "wf_123",
intent: "Point the Code node at the new API domain",
operations: [{
type: "patchNodeField",
nodeName: "Process Items",
fieldPath: "parameters.jsCode",
patches: [
{find: "api.old.com", replace: "api.new.com", replaceAll: true},
{find: "const\\s+limit\\s*=\\s*\\d+", replace: "const limit = 100", regex: true}
]
}]
})Patches apply sequentially. Escape regex metacharacters when regex: true and you want a literal match.
Remove a property with null
n8n_update_partial_workflow({
id: "wf_123",
intent: "Migrate deprecated continueOnFail to onError",
operations: [{
type: "updateNode",
nodeName: "HTTP Request",
updates: {
continueOnFail: null,
onError: "continueErrorOutput"
}
}]
})Setting a value to null removes the property. Required here because continueOnFail and onError are mutually exclusive — setting only the new one fails validation.
Move a workflow into a folder
n8n_update_partial_workflow({
id: "wf_123",
intent: "File this workflow under Production",
operations: [{
type: "moveToFolder",
parentFolderId: "abc123"
}]
})Pass null for parentFolderId to move it back to the project root. Requires n8n 2.32+; create folders with n8n_manage_folders.
IF node with semantic branch
n8n_update_partial_workflow({
id: "wf_123",
intent: "Wire IF node outputs",
operations: [
{type: "addConnection", source: "If Premium User", target: "Send VIP Email", branch: "true"},
{type: "addConnection", source: "If Premium User", target: "Send Standard Email", branch: "false"}
]
})- •Incremental workflow updates
- •Adding/removing individual nodes
- •Rewiring connections
- •Setting up AI Agent workflows
- •Surgical edits to Code node bodies and email templates (patchNodeField)
- •Removing deprecated properties during node version migrations (updates: {prop: null})
- •Managing canvas groups (setNodeGroups, n8n 2.28+)
- •Transferring workflows between team projects (transferWorkflow, enterprise/cloud)
- •Filing a workflow into a folder (moveToFolder, n8n 2.32+)
- •Always include intent parameter with specific description
- •Use patchNodeField (not full updateNode) for small string edits inside Code nodes
- •Prefer patchNodeField over the older __patch_find_replace form — it errors on not-found and detects ambiguous matches instead of warning
- •Use rewireConnection instead of remove+add for changing targets
- •Use branch="true"/"false" for IF nodes and case=N for Switch nodes (avoids manual sourceIndex math)
- •Rename nodes with updateNode — all connection references update automatically, no manual rewiring needed
- •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
- •For IF nodes ALWAYS use branch="true"/"false" — reusing sourceIndex=0 for multiple connections puts them all on the TRUE branch and silently breaks your logic
- •For Switch nodes ALWAYS use case=N — the same sourceIndex for multiple connections lands them on one output
- •Explicit sourceIndex overrides the smart branch/case parameters if both are given
- •Over MCP always use null (not undefined) to remove a property — undefined is dropped by JSON serialization and becomes a silent no-op
- •setNodeGroups is a full replacement: pass every group you want to keep, or [] to ungroup everything
- •n8n validates canvas groups on every write, so groups may be auto-pruned by unrelated edits — check details.warnings
- •continueOnError breaks the atomic guarantee — valid operations apply even if others fail
- •replaceConnections overwrites the entire connections object; cleanStaleConnections removes all broken connections and cannot be selective
- •Array elements are addressed by index, and out-of-range indices are rejected — new elements cannot be appended this way
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) |
excludePinnedData | boolean | Exclude pinned data from the response |
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
- •Always check the hasMore flag, then page with nextCursor until it is false
- •Filter by active=true to find running workflows
- •Maximum 100 workflows per request, and the server may return fewer than requested
- •The returned field counts the current page only — it is not the instance total
- •Returns no nodes or connections; use n8n_get_workflow for structure
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. mode="error" is the purpose-built debugging path — it extracts the error, samples upstream input, traces the execution path, and suggests fixes at 80-90% fewer tokens than mode="full".
| Parameter | Type | Description |
|---|---|---|
action* | string | Action to performgetlistdelete |
id | string | Execution ID (for get/delete) |
mode | string | For get: response detail. "error" is optimized for debugging failures.previewsummaryfilteredfullerror |
nodeNames | array | For get+filtered: filter by nodes |
itemsLimit | number | For get+filtered: items per node (0 = structure only, -1 = unlimited) |
includeInputData | boolean | For get: include input data alongside output |
errorItemsLimit | number | For get+error: how many upstream items to sample (max: 100) |
includeStackTrace | boolean | For get+error: include the full stack trace instead of a truncated one |
includeExecutionPath | boolean | For get+error: include the execution path leading to the error |
fetchWorkflow | boolean | For get+error: fetch the workflow for accurate upstream detection. Set false to save ~50-100ms when you already know the structure. |
workflowId | string | For list: filter by workflow |
status | string | For list: filter by statussuccesserrorwaiting |
projectId | string | For list: filter by project (enterprise) |
includeData | boolean | For list: include execution data in each entry |
limit | number | For list: results per page (1-100) |
cursor | string | For list: pagination cursor |
Debug a failed execution (recommended)
n8n_executions({action: "get", id: "exec_456", mode: "error"})Returns the error, the upstream data that caused it, the path taken, and fix suggestions — 80-90% smaller than mode: "full"
Debug with more upstream context
n8n_executions({
action: "get",
id: "exec_456",
mode: "error",
errorItemsLimit: 5,
includeStackTrace: true
})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 cheaply (mode=error)
- •Getting AI-generated fix suggestions for common error patterns
- •Inspecting the input data that triggered a failure
- •Analyzing execution performance
- •Cleaning up execution history
- •Monitoring workflow runs
- •Reach for mode="error" first on any failure — mode="full" is rarely worth its token cost
- •Use status="error" to find failed executions
- •Use mode="filtered" to focus on specific nodes in large workflows
- •Set fetchWorkflow: false if you already know the workflow structure
- •Delete old executions to save storage
- •mode="full" can return very large responses for complex workflows
- •mode="error" fetches the workflow by default, adding ~50-100ms
- •Deletion is permanent and cannot be undone
n8n_workflow_versions
Comprehensive workflow version management: list versions, inspect a snapshot, rollback, and clean up. Versions are scoped to your own credentials, and old backups are pruned automatically (10 most recent per workflow, plus an age-based retention window).
| Parameter | Type | Description |
|---|---|---|
mode* | string | Operation modelistgetrollbackdeleteprune |
workflowId | string | Workflow ID (required for list, rollback, delete, and prune) |
versionId | number | Version ID. Required for get and for deleting a single version; optional for rollback to a specific version. |
limit | number | Max versions to return |
validateBefore | boolean | Validate before rollback |
deleteAll | boolean | Delete all versions |
maxVersions | number | Versions to keep (prune) |
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})- •Recovering from an accidental or broken workflow change
- •Viewing workflow history and maintaining an audit trail
- •Managing version storage
- •Comparing workflow versions
- •Always list versions before rollback to pick the right one
- •Enable validateBefore for rollback to catch structural issues first
- •Use prune regularly to keep version history manageable
- •Note why you rolled back — the version log is your audit trail
- •Rollback overwrites the current workflow, though a backup is created automatically first
- •Deleted versions cannot be recovered
- •Versions are scoped to your instance and credentials — versions from other instances are not visible
- •Version IDs are sequential but may have gaps after deletes
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
n8n_manage_datatable
Unified tool for managing n8n data tables and their rows. Supports table CRUD, row CRUD with filtering and pagination, upsert, and dry-run previews.
| Parameter | Type | Description |
|---|---|---|
action* | string | Operation to performcreateTablelistTablesgetTableupdateTabledeleteTablegetRowsinsertRowsupdateRowsupsertRowsdeleteRows |
tableId | string | Required for all row actions and table get/update/delete |
name | string | Table name (createTable / updateTable) |
columns | array | Column definitions — each {name, type} where type is one of string|number|boolean|date. Required for createTable (at least one). |
data | object | Row payload (insertRows: array of rows; updateRows/upsertRows: object of column→value) |
filter | object | {type?: 'and'|'or', filters: [{columnName, condition, value}]} — conditions: eq, neq, like, ilike, gt, gte, lt, lte. Combinator defaults to 'and'. |
limit | number | Max results for listTables/getRows (1-100) |
cursor | string | Pagination cursor for listTables/getRows |
sortBy | string | For getRows: "columnName:asc" or "columnName:desc". Use it for deterministic ordering. |
search | string | For getRows: full-text search across string columns |
returnType | string | For insertRows: how much to returncountidall |
returnData | boolean | For updateRows/upsertRows/deleteRows: return the affected rows |
dryRun | boolean | For updateRows/upsertRows/deleteRows: preview changes without writing (recommended before bulk operations) |
Create a table
n8n_manage_datatable({
action: "createTable",
name: "Contacts",
columns: [
{name: "email", type: "string"},
{name: "score", type: "number"}
]
})Get rows with filter
n8n_manage_datatable({
action: "getRows",
tableId: "dt-123",
filter: {filters: [{columnName: "status", condition: "eq", value: "active"}]},
limit: 50
})Bulk update with dry-run preview
n8n_manage_datatable({
action: "updateRows",
tableId: "dt-123",
filter: {filters: [{columnName: "score", condition: "lt", value: 5}]},
data: {status: "inactive"},
dryRun: true
})Upsert by email
n8n_manage_datatable({
action: "upsertRows",
tableId: "dt-123",
filter: {filters: [{columnName: "email", condition: "eq", value: "a@b.com"}]},
data: {score: 15}
})Search and sort rows
n8n_manage_datatable({
action: "getRows",
tableId: "dt-123",
search: "john",
sortBy: "name:asc"
})Full-text search across string columns, with deterministic ordering
- •Storing workflow state across executions
- •Building lookup tables for routing/enrichment
- •Managing user/contact records used by multiple workflows
- •Bulk-updating records based on filter criteria
- •Always run dryRun: true before bulk updateRows/deleteRows to verify the filter
- •Define column types upfront — schema changes are harder than fresh creation
- •Use returnType: 'count' (default) for insertRows to keep responses small
- •deleteRows requires a filter — there is no 'delete all' shortcut
- •Filter conditions are case-sensitive for eq/neq; use ilike for case-insensitive matching
- •Date values should be ISO 8601 strings
- •createTable requires at least one column, and column types cannot be changed afterwards via the API
- •updateTable can only rename a table — column modifications are not supported by the public API
- •deleteTable permanently removes the table and all its rows
n8n_manage_credentials
Unified tool for managing n8n credentials. Full CRUD, schema discovery for any credential type, and reverse-lookup of which workflows reference each credential. Secrets are never returned in responses.
| Parameter | Type | Description |
|---|---|---|
action* | string | Operation to performlistgetcreateupdatedeletegetSchema |
id | string | Credential ID (required for get/update/delete) |
name | string | Credential display name (create/update) |
type | string | Credential type slug (e.g., 'slackApi', 'httpHeaderAuth') — required for create and getSchema |
data | object | Secret values for create/update. Stripped from responses. |
includeUsage | boolean | On list/get: reverse-scan workflows and attach usedIn[{id, name, active}] and usageCount to each credential. On list, scans every page (up to 5,000 credentials) and ignores cursor/limit. |
cursor | string | For list: pagination cursor from a previous response's nextCursor. Ignored when includeUsage is true. |
limit | number | For list: credentials per page (1-100). Ignored when includeUsage is true. |
Discover required fields for a type
n8n_manage_credentials({action: "getSchema", type: "httpHeaderAuth"})Create a credential
n8n_manage_credentials({
action: "create",
name: "My Slack Token",
type: "slackApi",
data: {accessToken: "xoxb-..."}
})Pre-deletion safety check
n8n_manage_credentials({action: "get", id: "cred-123", includeUsage: true})Returns usedIn[] so you can see which workflows break if you delete the credential
Audit credential usage across the instance
n8n_manage_credentials({action: "list", includeUsage: true})- •Provisioning credentials for new integrations
- •Rotating secrets and seeing which workflows are affected
- •Auditing shared/over-privileged credentials
- •Cleaning up unused credentials safely
- •Call getSchema first when creating a credential of an unfamiliar type
- •Use includeUsage: true before delete or rotation to see impact
- •Verify creation with a follow-up list — n8n strips data on response by design
- •data field is stripped from get/create/update responses (defense-in-depth) — record the secret yourself before calling
- •includeUsage triggers a full workflow scan client-side — slower on large instances (capped at 5,000 workflows)
- •A 'no usages' result does not guarantee unused — verify before destructive actions
- •Credential type slugs are case-sensitive and must match exactly — use getSchema to confirm
- •OAuth2 credentials may need a browser-based authorization flow that cannot be completed via API alone
- •delete is permanent, and workflows referencing the credential will break
n8n_manage_folders
Manage workflow folders (n8n 2.19+): create, list, get, rename, move, and delete. Note the split — this tool shapes the folder tree, but putting a workflow into a folder happens in the workflow tools (parentFolderId on n8n_create_workflow, the moveToFolder diff operation on n8n_update_partial_workflow).
| Parameter | Type | Description |
|---|---|---|
action* | string | Operation to performcreatelistgetrenamemovedelete |
projectId | string | Project containing the folder(s). On enterprise instances pass an explicit ID rather than relying on the default. |
folderId | string | Folder ID (required for get, rename, move, and delete) |
name | string | For create: the folder name (required). For rename: the new name (required). |
parentFolderId | string | null | For create: parent folder to nest under. For move: the target parent, or null to move to the project root (required). For list: return only direct children of this folder. |
transferToFolderId | string | For delete: folder that receives the contents ('0' = project root). Omitting it archives the folder's workflows. |
nameFilter | string | For list: name contains-match filter |
sortBy | string | For list: sort ordername:ascname:desccreatedAt:asccreatedAt:descupdatedAt:ascupdatedAt:desc |
skip | number | For list: pagination offset |
take | number | For list: page size (max 100) |
Create a folder
n8n_manage_folders({action: "create", name: "Production"})Creates at the project root. Pass parentFolderId to nest it under another folder.
List folders with counts and breadcrumbs
n8n_manage_folders({action: "list"})Each entry carries workflowCount, subFolderCount, and a path breadcrumb. Do this before creating — folder names are not unique, so duplicates are easy to make by accident.
Move a folder to the project root
n8n_manage_folders({
action: "move",
folderId: "abc123",
parentFolderId: null
})Delete a folder without archiving its workflows
n8n_manage_folders({
action: "delete",
folderId: "abc123",
transferToFolderId: "0"
})Moves the contents to the project root first. Omit transferToFolderId and the workflows are archived — which deactivates them.
Place a workflow in a folder (n8n 2.32+)
// At creation
n8n_create_workflow({
name: "My flow",
nodes: [...],
connections: {...},
parentFolderId: "abc123"
});
// Or move an existing one
n8n_update_partial_workflow({
id: "wf1",
operations: [{type: "moveToFolder", parentFolderId: "abc123"}]
});Placement lives in the workflow tools, not in n8n_manage_folders
- •Organizing a grown instance into per-environment or per-team folders
- •Setting up folder structure before deploying a batch of related workflows
- •Finding empty folders via workflowCount/subFolderCount and cleaning them up
- •Restructuring nested folder trees without touching the workflows inside
- •List first to discover the existing structure — names are not unique, so it is easy to create duplicates
- •Prefer delete with transferToFolderId ('0' for the root) unless archiving the contents is genuinely what you want
- •On enterprise instances pass explicit projectId values rather than relying on the personal default
- •A workflow's folder cannot be read back through the n8n API — never build logic that needs to query folder membership, and note that workflow listings cannot filter by folder
- •delete without transferToFolderId archives the folder's workflows, which deactivates them
- •Folder names are not unique within a project, or even within the same parent folder
- •Folders need a licensed instance: they unlock on the registered free Community tier (Settings → Usage and plan) and up, and your API key needs the folder:* scopes — a key issued before you registered will not have them
- •Folder CRUD needs n8n 2.19+; placing workflows into folders needs 2.32+ (parentFolderId is rejected with a 400 on older instances)
- •The 'personal' project alias is resolved server-side by n8n only for create — for other actions the tool resolves it itself, so on an empty Community instance with no workflows you must pass an explicit projectId or run create first
n8n_evaluations
Run and read evaluation test runs for a workflow: trigger a run, cancel one, list runs, get a run with aggregated metrics, or fetch per-case results. This is how you catch prompt and model regressions in AI workflows before your users do.
| Parameter | Type | Description |
|---|---|---|
action* | string | Operation to performruncancellist_runsget_runlist_cases |
workflowId* | string | Workflow ID the test runs belong to |
runId | string | Test run ID. Required for get_run, list_cases, and cancel. |
status | string | For list_runs: filter by run statusnewrunningcompletederrorcancelled |
limit | number | Results per page (1-250) |
cursor | string | Pagination cursor from a previous response |
Trigger a run, then poll it
// Cases execute asynchronously — the response only
// confirms the run was created.
const {id} = n8n_evaluations({
action: "run",
workflowId: "abc123"
});
// Poll until status is completed / error / cancelled
n8n_evaluations({
action: "get_run",
workflowId: "abc123",
runId: id
});List completed runs
n8n_evaluations({
action: "list_runs",
workflowId: "abc123",
status: "completed",
limit: 10
})Newest first. Compare metrics across runs to catch prompt or model regressions.
Inspect per-case results
n8n_evaluations({
action: "list_cases",
workflowId: "abc123",
runId: "run456"
})Each case carries its executionId — pass it to n8n_executions to inspect the full execution behind a failure
Cancel a run in progress
n8n_evaluations({
action: "cancel",
workflowId: "abc123",
runId: "run456"
})Accepted while the run winds down — confirm with get_run that it reached "cancelled"
- •Triggering an evaluation run after changing a prompt, then polling it to completion
- •Comparing metric aggregates across runs to catch prompt or model regressions
- •Pulling per-case failures and inspecting the underlying executions
- •Exporting evaluation results to an external dashboard
- •Cancelling a long-running evaluation started by mistake
- •Confirm the workflow has a configured evaluation trigger with a dataset before calling run — a missing trigger is a 409, not a silent no-op
- •Poll get_run rather than assuming run completed; cases execute asynchronously
- •Filter list_runs by status="completed" when you only need finished results
- •Keep list_cases at the default limit of 20 and paginate — case payloads carry raw inputs and outputs
- •Store run IDs rather than case payloads when tracking results over time
- •Reading requires n8n 2.30+; run and cancel require n8n 2.32+ (on 2.30/2.31 those routes answer 405 and 404)
- •API keys created before those releases silently lack the testRun scopes — a 403 means re-create the key, not a bug
- •run and cancel also need the key owner to hold the workflow:execute project scope
- •Evaluations are license- and quota-gated in n8n: an unlicensed instance returns 403, an exhausted quota returns 402
- •A successful run response means the run was created, not that any case finished