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. 1.Go to your n8n-mcp dashboard
  2. 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.

n8n API Key Required
ParameterTypeDescription
name*stringWorkflow name
nodes*arrayArray of node objects with id, name, type, typeVersion, position, and parameters
connections*objectNode connections object
settingsobjectWorkflow settings (timezone, error handling, etc.)
nodeGroupsarrayCanvas 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.
projectIdstringProject to create the workflow in (enterprise). Defaults to the personal project.
parentFolderIdstringFolder 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

javascript
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}]]
    }
  }
})
Use Cases
  • Creating new automation workflows
  • Deploying workflows programmatically
  • Setting up integrations via API
Best Practices
  • 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
Common Pitfalls
  • 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.

n8n API Key Required
ParameterTypeDescription
id*stringWorkflow ID
modestringDetail level. "active" returns the published graph; every other mode reads the draft.
fulldetailsactivestructurefilteredminimal
nodeNamesarrayRequired when mode="filtered". Node names or node IDs to return with full config. Discover names cheaply with mode="structure" first.

Get the draft workflow

javascript
n8n_get_workflow({id: "abc123"})

Get the published (running) graph

javascript
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

javascript
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

javascript
n8n_get_workflow({id: "abc123", mode: "details"})

Quick metadata check

javascript
n8n_get_workflow({id: "abc123", mode: "minimal"})
Use Cases
  • 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)
Best Practices
  • 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
Common Pitfalls
  • 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.

n8n API Key Required
ParameterTypeDescription
id*stringWorkflow ID to update
namestringNew workflow name
nodesarrayComplete array of nodes
connectionsobjectComplete connections object
settingsobjectWorkflow settings
nodeGroupsarrayCanvas 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.
intentstringDescription of the change

Rename only

javascript
n8n_update_full_workflow({
  id: "abc",
  name: "New Name"
})

Full structure update

javascript
n8n_update_full_workflow({
  id: "xyz",
  intent: "Add error handling nodes",
  nodes: [...],
  connections: {...}
})
Use Cases
  • Major workflow restructuring
  • Complete workflow replacement
  • Renaming workflows
Best Practices
  • 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.

n8n API Key Required
ParameterTypeDescription
id*stringWorkflow ID
operations*arrayArray 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.
validateOnlybooleanOnly validate without applying
continueOnErrorbooleanBest-effort mode
intentstringDescription of the change

Add a node and connect it

javascript
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

javascript
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

javascript
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)

javascript
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

javascript
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

javascript
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

javascript
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

javascript
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"}
  ]
})
Use Cases
  • 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+)
Best Practices
  • 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
Common Pitfalls
  • 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.

n8n API Key Required
ParameterTypeDescription
id*stringWorkflow ID to delete

Delete a workflow

javascript
n8n_delete_workflow({id: "abc123"})
Use Cases
  • Removing obsolete workflows
  • Cleanup after testing
  • Managing workflow lifecycle
Best Practices
  • Always confirm before deleting
  • Consider exporting workflow first for backup
  • Deactivate workflow before deletion
Common Pitfalls
  • 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).

n8n API Key Required
ParameterTypeDescription
limitnumberResults per page (max: 100)
cursorstringPagination cursor
activebooleanFilter by active/inactive
tagsarrayFilter by exact tag matches
projectIdstringFilter by project (enterprise)
excludePinnedDatabooleanExclude pinned data from the response

First 20 workflows

javascript
n8n_list_workflows({limit: 20})

Active production workflows

javascript
n8n_list_workflows({active: true, tags: ["production"]})
Use Cases
  • Listing all workflows in an instance
  • Finding active workflows
  • Filtering by tags for organization
  • Pagination through large workflow sets
Best Practices
  • 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
Common Pitfalls
  • 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.

n8n API Key Required
ParameterTypeDescription
id*stringWorkflow ID to validate
optionsobjectValidation options (same as validate_workflow)

Default validation

javascript
n8n_validate_workflow({id: "wf_abc123"})

Strict validation

javascript
n8n_validate_workflow({
  id: "wf_abc123",
  options: {profile: "strict"}
})
Use Cases
  • Validating workflows before running them in production
  • Checking imported workflows for compatibility
  • Debugging workflow execution failures
  • Pre-deployment validation in CI/CD pipelines
Best Practices
  • 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.

n8n API Key Required
ParameterTypeDescription
id*stringWorkflow ID to fix
applyFixesbooleanApply fixes (false = preview)
fixTypesarrayTypes of fixes to apply
expression-formattypeversion-correctionerror-output-confignode-type-correctionwebhook-missing-pathtypeversion-upgradeversion-migration
confidenceThresholdstringMinimum confidence
highmediumlow
maxFixesnumberMaximum fixes to apply

Preview all fixes

javascript
n8n_autofix_workflow({id: "wf_abc123"})

Apply all medium+ confidence fixes

javascript
n8n_autofix_workflow({id: "wf_abc123", applyFixes: true})

Only high-confidence fixes

javascript
n8n_autofix_workflow({
  id: "wf_abc123",
  applyFixes: true,
  confidenceThreshold: "high"
})
Use Cases
  • Fixing expression format issues
  • Upgrading node versions
  • Fixing configuration errors
  • Migrating workflows to newer n8n versions
Best Practices
  • 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.

n8n API Key Required
ParameterTypeDescription
workflowId*stringWorkflow ID to execute
triggerTypestringTrigger type
webhookformchatauto
httpMethodstringFor webhook: HTTP method
webhookPathstringOverride webhook path
messagestringFor chat: message to send
sessionIdstringFor chat: session ID
dataobjectInput data/payload
headersobjectCustom HTTP headers
timeoutnumberTimeout in ms
waitForResponsebooleanWait for completion

Auto-detect and trigger

javascript
n8n_test_workflow({workflowId: "123"})

Webhook with data

javascript
n8n_test_workflow({
  workflowId: "123",
  triggerType: "webhook",
  data: {name: "John", email: "john@example.com"}
})

Chat trigger

javascript
n8n_test_workflow({
  workflowId: "123",
  triggerType: "chat",
  message: "Hello AI assistant"
})
Use Cases
  • Testing workflows during development
  • Triggering workflows programmatically
  • Testing chat/AI workflows
  • Validating webhook integrations
Best Practices
  • Use auto-detect for most cases
  • Include test data matching expected input format
  • Test with different input scenarios
Common Pitfalls
  • 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".

n8n API Key Required
ParameterTypeDescription
action*stringAction to perform
getlistdelete
idstringExecution ID (for get/delete)
modestringFor get: response detail. "error" is optimized for debugging failures.
previewsummaryfilteredfullerror
nodeNamesarrayFor get+filtered: filter by nodes
itemsLimitnumberFor get+filtered: items per node (0 = structure only, -1 = unlimited)
includeInputDatabooleanFor get: include input data alongside output
errorItemsLimitnumberFor get+error: how many upstream items to sample (max: 100)
includeStackTracebooleanFor get+error: include the full stack trace instead of a truncated one
includeExecutionPathbooleanFor get+error: include the execution path leading to the error
fetchWorkflowbooleanFor get+error: fetch the workflow for accurate upstream detection. Set false to save ~50-100ms when you already know the structure.
workflowIdstringFor list: filter by workflow
statusstringFor list: filter by status
successerrorwaiting
projectIdstringFor list: filter by project (enterprise)
includeDatabooleanFor list: include execution data in each entry
limitnumberFor list: results per page (1-100)
cursorstringFor list: pagination cursor

Debug a failed execution (recommended)

javascript
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

javascript
n8n_executions({
  action: "get",
  id: "exec_456",
  mode: "error",
  errorItemsLimit: 5,
  includeStackTrace: true
})

List recent executions

javascript
n8n_executions({
  action: "list",
  workflowId: "abc123",
  limit: 10
})

Get execution summary

javascript
n8n_executions({action: "get", id: "exec_456"})

Get specific nodes from execution

javascript
n8n_executions({
  action: "get",
  id: "exec_456",
  mode: "filtered",
  nodeNames: ["HTTP Request", "Slack"]
})
Use Cases
  • 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
Best Practices
  • 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
Common Pitfalls
  • 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).

n8n API Key Required
ParameterTypeDescription
mode*stringOperation mode
listgetrollbackdeleteprune
workflowIdstringWorkflow ID (required for list, rollback, delete, and prune)
versionIdnumberVersion ID. Required for get and for deleting a single version; optional for rollback to a specific version.
limitnumberMax versions to return
validateBeforebooleanValidate before rollback
deleteAllbooleanDelete all versions
maxVersionsnumberVersions to keep (prune)

List version history

javascript
n8n_workflow_versions({mode: "list", workflowId: "abc123", limit: 5})

Rollback to latest saved version

javascript
n8n_workflow_versions({mode: "rollback", workflowId: "abc123"})

Prune to keep only 5 most recent

javascript
n8n_workflow_versions({mode: "prune", workflowId: "abc123", maxVersions: 5})
Use Cases
  • Recovering from an accidental or broken workflow change
  • Viewing workflow history and maintaining an audit trail
  • Managing version storage
  • Comparing workflow versions
Best Practices
  • 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
Common Pitfalls
  • 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.

n8n API Key Required
ParameterTypeDescription
templateId*numberTemplate ID from n8n.io
namestringCustom workflow name
autoUpgradeVersionsbooleanUpgrade node typeVersions
autoFixbooleanAuto-fix expression issues
stripCredentialsbooleanRemove credential references

Deploy with default settings

javascript
n8n_deploy_template({templateId: 2776})

Deploy with custom name

javascript
n8n_deploy_template({
  templateId: 2776,
  name: "My Google Drive to Airtable Sync"
})
Use Cases
  • Quickly deploying popular templates
  • Setting up common integrations
  • Using templates as starting points
Best Practices
  • 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.

n8n API Key Required
ParameterTypeDescription
action*stringOperation to perform
createTablelistTablesgetTableupdateTabledeleteTablegetRowsinsertRowsupdateRowsupsertRowsdeleteRows
tableIdstringRequired for all row actions and table get/update/delete
namestringTable name (createTable / updateTable)
columnsarrayColumn definitions — each {name, type} where type is one of string|number|boolean|date. Required for createTable (at least one).
dataobjectRow payload (insertRows: array of rows; updateRows/upsertRows: object of column→value)
filterobject{type?: 'and'|'or', filters: [{columnName, condition, value}]} — conditions: eq, neq, like, ilike, gt, gte, lt, lte. Combinator defaults to 'and'.
limitnumberMax results for listTables/getRows (1-100)
cursorstringPagination cursor for listTables/getRows
sortBystringFor getRows: "columnName:asc" or "columnName:desc". Use it for deterministic ordering.
searchstringFor getRows: full-text search across string columns
returnTypestringFor insertRows: how much to return
countidall
returnDatabooleanFor updateRows/upsertRows/deleteRows: return the affected rows
dryRunbooleanFor updateRows/upsertRows/deleteRows: preview changes without writing (recommended before bulk operations)

Create a table

javascript
n8n_manage_datatable({
  action: "createTable",
  name: "Contacts",
  columns: [
    {name: "email", type: "string"},
    {name: "score", type: "number"}
  ]
})

Get rows with filter

javascript
n8n_manage_datatable({
  action: "getRows",
  tableId: "dt-123",
  filter: {filters: [{columnName: "status", condition: "eq", value: "active"}]},
  limit: 50
})

Bulk update with dry-run preview

javascript
n8n_manage_datatable({
  action: "updateRows",
  tableId: "dt-123",
  filter: {filters: [{columnName: "score", condition: "lt", value: 5}]},
  data: {status: "inactive"},
  dryRun: true
})

Upsert by email

javascript
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

javascript
n8n_manage_datatable({
  action: "getRows",
  tableId: "dt-123",
  search: "john",
  sortBy: "name:asc"
})

Full-text search across string columns, with deterministic ordering

Use Cases
  • 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
Best Practices
  • 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
Common Pitfalls
  • 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.

n8n API Key Required
ParameterTypeDescription
action*stringOperation to perform
listgetcreateupdatedeletegetSchema
idstringCredential ID (required for get/update/delete)
namestringCredential display name (create/update)
typestringCredential type slug (e.g., 'slackApi', 'httpHeaderAuth') — required for create and getSchema
dataobjectSecret values for create/update. Stripped from responses.
includeUsagebooleanOn 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.
cursorstringFor list: pagination cursor from a previous response's nextCursor. Ignored when includeUsage is true.
limitnumberFor list: credentials per page (1-100). Ignored when includeUsage is true.

Discover required fields for a type

javascript
n8n_manage_credentials({action: "getSchema", type: "httpHeaderAuth"})

Create a credential

javascript
n8n_manage_credentials({
  action: "create",
  name: "My Slack Token",
  type: "slackApi",
  data: {accessToken: "xoxb-..."}
})

Pre-deletion safety check

javascript
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

javascript
n8n_manage_credentials({action: "list", includeUsage: true})
Use Cases
  • Provisioning credentials for new integrations
  • Rotating secrets and seeing which workflows are affected
  • Auditing shared/over-privileged credentials
  • Cleaning up unused credentials safely
Best Practices
  • 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
Common Pitfalls
  • 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).

n8n API Key Required
ParameterTypeDescription
action*stringOperation to perform
createlistgetrenamemovedelete
projectIdstringProject containing the folder(s). On enterprise instances pass an explicit ID rather than relying on the default.
folderIdstringFolder ID (required for get, rename, move, and delete)
namestringFor create: the folder name (required). For rename: the new name (required).
parentFolderIdstring | nullFor 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.
transferToFolderIdstringFor delete: folder that receives the contents ('0' = project root). Omitting it archives the folder's workflows.
nameFilterstringFor list: name contains-match filter
sortBystringFor list: sort order
name:ascname:desccreatedAt:asccreatedAt:descupdatedAt:ascupdatedAt:desc
skipnumberFor list: pagination offset
takenumberFor list: page size (max 100)

Create a folder

javascript
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

javascript
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

javascript
n8n_manage_folders({
  action: "move",
  folderId: "abc123",
  parentFolderId: null
})

Delete a folder without archiving its workflows

javascript
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+)

javascript
// 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

Use Cases
  • 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
Best Practices
  • 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
Common Pitfalls
  • 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.

n8n API Key Required
ParameterTypeDescription
action*stringOperation to perform
runcancellist_runsget_runlist_cases
workflowId*stringWorkflow ID the test runs belong to
runIdstringTest run ID. Required for get_run, list_cases, and cancel.
statusstringFor list_runs: filter by run status
newrunningcompletederrorcancelled
limitnumberResults per page (1-250)
cursorstringPagination cursor from a previous response

Trigger a run, then poll it

javascript
// 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

javascript
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

javascript
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

javascript
n8n_evaluations({
  action: "cancel",
  workflowId: "abc123",
  runId: "run456"
})

Accepted while the run winds down — confirm with get_run that it reached "cancelled"

Use Cases
  • 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
Best Practices
  • 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
Common Pitfalls
  • 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