Skip to main content
MCP tools reference

n8n-mcp tools reference

n8n-mcp exposes practical workflow tools through the Model Context Protocol. Configure MCP-compatible clients with https://mcp.n8nworkflow.com/mcp and a platform API key to route tool calls through the gateway.

Authentication

Clients call the hosted endpoint with a platform Bearer key. n8n API keys stay encrypted inside the gateway.

Workflow operations

Tools cover listing, reading, creating, validating, patching, activating and rolling back workflows.

Execution support

Agents can trigger workflow executions and inspect recent execution history when permitted.

Server-side controls

Every call passes through authentication, quotas, audit logging and SSRF-protected outbound requests.

Workflow Agent mode

Use Workflow Agent mode for production n8n workflow creation, repair, validation and deployment. Use Code Agent mode for repository code, docs, tests and Dashboard changes.

Template-first production

When an agent creates a workflow, it searches templates first, adapts a close match when available and only drafts from scratch after checking local node knowledge.

Knowledge-backed nodes

Agents use node search, node essentials and node validation before a node enters the workflow draft, including credential hints and operation-specific settings.

Diff and partial updates

Existing workflows are changed through previewed patches and safe partial updates where possible, instead of replacing the entire workflow JSON.

Deploy and test gates

Validation errors block deployment. Warnings require review before activation, and deploy/test results are captured for audit and rollback.

Workflow safety model

Never Trust Defaults

Webhook, HTTP, branch, merge, email and AI nodes must declare their critical behavior explicitly before deployment.

Server-side policy

Read-only tools cannot mutate n8n. Disabled, destructive or high-risk operations fail closed unless policy and confirmation requirements are met.

Full-update controls

Full workflow updates are a fallback for changes that cannot be represented as a patch. Large or uncertain edits should start from an inactive draft clone.

Agent Console

The Dashboard Agent Console presents the plan, template match, node sources, validation, diff preview, confirmation state, deploy/test result and rollback entry point.

Available tools

list_workflows

JSON-RPC toolRead-only

List workflows from the user's n8n instance. Returns workflow IDs, names, and active status.

{
  "type": "object",
  "properties": {
    "active": {
      "type": "boolean",
      "description": "Filter by active state"
    },
    "limit": {
      "type": "number",
      "default": 50,
      "description": "Max number of workflows to return"
    }
  }
}

get_workflow

JSON-RPC toolRead-only

Get detailed information about a specific workflow including its nodes and connections.

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID"
    }
  }
}

execute_workflow

JSON-RPC toolPolicy gated

Trigger a workflow execution. Returns execution ID for tracking.

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID to execute"
    },
    "data": {
      "type": "object",
      "description": "Optional input data passed to the workflow"
    },
    "confirm": {
      "type": "boolean",
      "description": "Required: set to true to confirm this workflow execution."
    }
  }
}

list_executions

JSON-RPC toolRead-only

List recent workflow executions with their status and timestamps. Use to check execution history or debug failed runs.

{
  "type": "object",
  "properties": {
    "workflowId": {
      "type": "string",
      "description": "Optional: Filter by specific workflow ID"
    },
    "limit": {
      "type": "number",
      "default": 20,
      "description": "Max number of executions to return"
    }
  }
}

import_workflow_template

JSON-RPC toolPolicy gated

Import a workflow template into the user's n8n instance. Returns the created workflow ID. Use search_workflow_templates to find templates first.

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "number",
      "description": "Template id from search_workflow_templates"
    },
    "name": {
      "type": "string",
      "description": "Optional: Override workflow name on import"
    },
    "activate": {
      "type": "boolean",
      "default": false,
      "description": "Activate the workflow after import"
    }
  }
}

create_workflow

JSON-RPC toolPolicy gated

Create a new workflow in the user's n8n instance. Returns the created workflow with ID.

{
  "type": "object",
  "required": [
    "name",
    "nodes",
    "connections"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Workflow name"
    },
    "nodes": {
      "type": "array",
      "description": "Array of workflow nodes"
    },
    "connections": {
      "type": "object",
      "description": "Node connections object"
    },
    "settings": {
      "type": "object",
      "description": "Optional workflow settings"
    },
    "staticData": {
      "type": "object",
      "description": "Optional static data"
    },
    "tags": {
      "type": "array",
      "description": "Optional workflow tags"
    }
  }
}

update_workflow

JSON-RPC toolPolicy gated

Update an existing workflow. Supports full or partial updates. Returns the updated workflow.

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID to update"
    },
    "name": {
      "type": "string",
      "description": "Optional: New workflow name"
    },
    "nodes": {
      "type": "array",
      "description": "Optional: Updated nodes array"
    },
    "connections": {
      "type": "object",
      "description": "Optional: Updated connections"
    },
    "settings": {
      "type": "object",
      "description": "Optional: Updated settings"
    },
    "staticData": {
      "type": "object",
      "description": "Optional: Updated static data"
    },
    "tags": {
      "type": "array",
      "description": "Optional: Updated tags"
    },
    "active": {
      "type": "boolean",
      "description": "Optional: Activate or deactivate"
    },
    "confirm": {
      "type": "boolean",
      "description": "Required: set to true to confirm this workflow-changing operation."
    }
  }
}

delete_workflow

JSON-RPC toolConfirmation required

Delete a workflow from the user's n8n instance. This action cannot be undone.

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID to delete"
    },
    "confirm": {
      "type": "boolean",
      "description": "Required with confirmationToken to confirm this irreversible operation."
    },
    "confirmationToken": {
      "type": "string",
      "description": "Short-lived token returned by the previous delete_workflow confirmation challenge."
    }
  }
}

activate_workflow

JSON-RPC toolPolicy gated

Activate or deactivate a workflow. Active workflows can be triggered by their trigger nodes.

{
  "type": "object",
  "required": [
    "id",
    "active"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID"
    },
    "active": {
      "type": "boolean",
      "description": "true to activate, false to deactivate"
    },
    "confirm": {
      "type": "boolean",
      "description": "Required: set to true to confirm this activation state change."
    }
  }
}

validate_workflow

JSON-RPC toolRead-only

Validate a workflow for errors, missing connections, and configuration issues. Returns detailed validation results.

{
  "type": "object",
  "required": [
    "workflow"
  ],
  "properties": {
    "workflow": {
      "type": "object",
      "description": "Workflow object with nodes and connections to validate"
    }
  }
}

search_nodes

JSON-RPC toolRead-only

Search local n8n node knowledge before drafting or changing a workflow. Read-only.

{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "query": {
      "type": "string",
      "description": "Node type, display name, or capability to search"
    },
    "limit": {
      "type": "number",
      "default": 20,
      "description": "Max number of nodes to return"
    }
  }
}

get_node

JSON-RPC toolRead-only

Get local n8n node essentials, operations, and credential hints for a node type. Read-only.

{
  "type": "object",
  "required": [
    "nodeType"
  ],
  "properties": {
    "nodeType": {
      "type": "string",
      "description": "n8n node type or short suffix"
    }
  }
}

validate_node

JSON-RPC toolRead-only

Validate one n8n node configuration before placing it in a workflow. Read-only.

{
  "type": "object",
  "required": [
    "nodeType"
  ],
  "properties": {
    "nodeType": {
      "type": "string",
      "description": "n8n node type or short suffix"
    },
    "parameters": {
      "type": "object",
      "description": "Node parameters to validate"
    },
    "credentials": {
      "type": "object",
      "description": "Structured n8n credential references attached to the candidate node"
    }
  }
}

search_templates

JSON-RPC toolRead-only

Search local workflow templates before constructing a workflow from scratch. Read-only.

{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "query": {
      "type": "string",
      "description": "Workflow intent or template search query"
    },
    "limit": {
      "type": "number",
      "default": 10,
      "description": "Max number of templates to return"
    }
  }
}

get_template

JSON-RPC toolRead-only

Get a local workflow template by id. Read-only.

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Template id from search_templates"
    }
  }
}

preview_workflow_diff

JSON-RPC toolRead-only

Preview partial workflow operations in memory, including validation and diff metadata. Does not mutate n8n.

{
  "type": "object",
  "required": [
    "workflowId",
    "operations",
    "sourcePreviewCallId"
  ],
  "properties": {
    "workflowId": {
      "type": "string",
      "description": "Workflow ID to preview"
    },
    "operations": {
      "type": "array",
      "description": "Operations such as updateNode, addNode, addConnection, removeConnection, cleanStaleConnections"
    },
    "sourcePreviewCallId": {
      "type": "string",
      "description": "Successful owner-scoped preview_workflow_diff call authorizing these operations"
    },
    "sourcePreviewOperationIndexes": {
      "type": "array",
      "items": {
        "type": "integer",
        "minimum": 0
      },
      "description": "Server-validated preview operation indexes used by the Dashboard"
    },
    "policy": {
      "type": "object",
      "description": "Optional operation policy context"
    }
  }
}

update_partial_workflow

JSON-RPC toolConfirmation required

Apply validated partial workflow operations after policy checks and diff preview. Prefer this over full workflow JSON updates.

{
  "type": "object",
  "required": [
    "workflowId",
    "operations"
  ],
  "properties": {
    "workflowId": {
      "type": "string",
      "description": "Workflow ID to update"
    },
    "operations": {
      "type": "array",
      "description": "Operations such as updateNode, addNode, addConnection, removeConnection, cleanStaleConnections"
    },
    "policy": {
      "type": "object",
      "description": "Optional operation policy context"
    },
    "confirm": {
      "type": "boolean",
      "description": "Required by policy for active production workflows."
    }
  }
}

analyze_workflow_graph

JSON-RPC toolRead-only

Analyze an existing workflow graph without modifying it. Use for large workflows before proposing changes.

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID to analyze"
    }
  }
}

apply_workflow_patch

JSON-RPC toolConfirmation required

Apply a validated local patch to an existing workflow. Prefer this over deleting and recreating large workflows.

{
  "type": "object",
  "required": [
    "id",
    "patch"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID to patch"
    },
    "patch": {
      "type": "object",
      "required": [
        "operations"
      ],
      "properties": {
        "operations": {
          "type": "array",
          "description": "Safe patch operations such as updateNodeParameters, addConnection, removeConnection."
        }
      }
    },
    "confirm": {
      "type": "boolean",
      "description": "Required with confirmationToken to confirm this workflow-changing patch."
    },
    "confirmationToken": {
      "type": "string",
      "description": "Short-lived token returned by the previous apply_workflow_patch confirmation challenge."
    }
  }
}

preview_workflow_patch

JSON-RPC toolRead-only

Preview node and connection changes for a workflow patch without mutating n8n. Use before applying patches to large workflows.

{
  "type": "object",
  "required": [
    "id",
    "patch"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID to preview"
    },
    "patch": {
      "type": "object",
      "required": [
        "operations"
      ],
      "properties": {
        "operations": {
          "type": "array",
          "description": "Patch operations to preview."
        }
      }
    }
  }
}

safe_apply_workflow_patch

JSON-RPC toolConfirmation required

Apply a workflow patch with post-apply validation and automatic rollback when validation fails.

{
  "type": "object",
  "required": [
    "id",
    "patch"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID to patch"
    },
    "patch": {
      "type": "object",
      "required": [
        "operations"
      ],
      "properties": {
        "operations": {
          "type": "array",
          "description": "Patch operations to apply safely."
        }
      }
    },
    "postApplyChecks": {
      "type": "array",
      "description": "Optional checks after applying. Currently supports expressionDependencies."
    },
    "confirm": {
      "type": "boolean",
      "description": "Required with confirmationToken to confirm this workflow-changing patch."
    },
    "confirmationToken": {
      "type": "string",
      "description": "Short-lived token returned by the previous safe_apply_workflow_patch confirmation challenge."
    }
  }
}

propose_workflow_patch

JSON-RPC toolRead-only

Propose conservative patch operations for an existing workflow without modifying it. Only suggests low-risk mechanical fixes.

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID to inspect"
    }
  }
}

propose_workflow_simplification

JSON-RPC toolRead-only

Conservative Workflow Simplification: propose low-risk cleanup candidates without modifying the workflow. Only static-proof suggestions are returned; node removals are review candidates, not automatically applied.

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID to inspect for conservative simplification"
    }
  }
}

preview_workflow_simplification

JSON-RPC toolRead-only

Preview conservative workflow simplification for selected candidate nodes without mutating n8n. Rejects nodes that are not current approved simplification candidates.

{
  "type": "object",
  "required": [
    "id",
    "candidateNodeNames"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID to preview"
    },
    "candidateNodeNames": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Node names selected from propose_workflow_simplification.removableNodes"
    }
  }
}

safe_apply_workflow_simplification

JSON-RPC toolPolicy gated

Create a new inactive simplified draft from approved simplification candidates. This never mutates the source workflow.

{
  "type": "object",
  "required": [
    "id",
    "candidateNodeNames"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Source workflow ID"
    },
    "candidateNodeNames": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Node names selected from propose_workflow_simplification.removableNodes"
    },
    "name": {
      "type": "string",
      "description": "Optional name for the simplified draft workflow"
    }
  }
}

clone_workflow_as_draft

JSON-RPC toolPolicy gated

Clone an existing workflow into a new inactive draft for safe large-workflow edits and review.

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Source workflow ID to clone"
    },
    "name": {
      "type": "string",
      "description": "Optional draft workflow name"
    }
  }
}

summarize_workflow_modules

JSON-RPC toolRead-only

Summarize trigger-rooted modules in a large workflow without modifying it. Use before editing complex workflows.

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID to summarize"
    }
  }
}

summarize_workflow_semantic_modules

JSON-RPC toolRead-only

Summarize a large workflow into semantic modules such as ingress, transform, branch, notification, and external access.

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID to summarize"
    }
  }
}

infer_workflow_business_intent

JSON-RPC toolRead-only

Infer business intent for every node in a workflow from node names, URLs, operations, credentials, expressions, and data flow context.

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID to infer business intent for"
    }
  }
}

create_workflow_review_batches

JSON-RPC toolRead-only

Split a very large workflow into overlapping review batches so an agent can inspect it in safe chunks.

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID to batch"
    },
    "batchSize": {
      "type": "number",
      "default": 50,
      "description": "Nodes per review batch"
    },
    "overlap": {
      "type": "number",
      "default": 3,
      "description": "Node overlap between batches"
    }
  }
}

audit_expression_dependencies

JSON-RPC toolRead-only

Audit n8n expressions for $node dependencies and missing referenced nodes without modifying the workflow.

{
  "type": "object",
  "required": [
    "id"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Workflow ID to audit"
    }
  }
}

create_workflow_from_blueprint

JSON-RPC toolPolicy gated

Create a workflow from a high-level blueprint (recommended). Automatically compiles to valid n8n JSON, validates, and creates. Much easier than create_workflow.

{
  "type": "object",
  "required": [
    "name",
    "trigger",
    "steps"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Workflow name"
    },
    "trigger": {
      "type": "object",
      "required": [
        "kind",
        "config"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "schedule",
            "webhook",
            "manual"
          ],
          "description": "Trigger type"
        },
        "config": {
          "type": "object",
          "description": "Trigger configuration (e.g., cron for schedule, path for webhook)"
        }
      }
    },
    "steps": {
      "type": "array",
      "description": "Array of action steps",
      "items": {
        "type": "object",
        "required": [
          "kind",
          "config"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "slack",
              "http",
              "email",
              "googleSheets",
              "openai",
              "mcpClient",
              "code",
              "if",
              "set"
            ],
            "description": "Action node type"
          },
          "action": {
            "type": "string",
            "description": "Optional: specific action (e.g., 'sendMessage' for Slack)"
          },
          "config": {
            "type": "object",
            "description": "Node-specific configuration"
          }
        }
      }
    },
    "activate": {
      "type": "boolean",
      "default": false,
      "description": "Activate after creation"
    },
    "requireCredentials": {
      "type": "boolean",
      "default": false,
      "description": "If true, return missing credential requirements instead of creating credentialed workflows."
    }
  }
}

fix_workflow_errors

JSON-RPC toolConfirmation required

Automatically analyze and fix common errors in a workflow. Detects missing required parameters, broken connections, invalid node configurations, and provides actionable repair suggestions.

{
  "type": "object",
  "required": [
    "workflowId"
  ],
  "properties": {
    "workflowId": {
      "type": "string",
      "description": "ID of the workflow to analyze and fix"
    },
    "autoApply": {
      "type": "boolean",
      "default": false,
      "description": "If true, automatically apply fixes. If false, return suggested fixes only."
    },
    "confirm": {
      "type": "boolean",
      "description": "Required with confirmationToken when autoApply is true."
    },
    "confirmationToken": {
      "type": "string",
      "description": "Short-lived token returned by the previous fix_workflow_errors confirmation challenge."
    },
    "useAI": {
      "type": "boolean",
      "default": false,
      "description": "Use AI to analyze complex errors and suggest intelligent fixes."
    }
  }
}

get_workflow_history

JSON-RPC toolRead-only

Get the audit history for a workflow: who changed what and when, with before/after snapshots. Use the returned audit log id with rollback_workflow.

{
  "type": "object",
  "required": [
    "workflowId"
  ],
  "properties": {
    "workflowId": {
      "type": "string",
      "description": "The workflow ID to get history for"
    },
    "limit": {
      "type": "number",
      "default": 20,
      "description": "Max number of history entries to return"
    }
  }
}

rollback_workflow

JSON-RPC toolConfirmation required

⚠️ MEDIUM RISK: Roll a workflow back to a previous state captured in its audit history. Restores the before-snapshot of the given audit log entry. Find the id with get_workflow_history.

{
  "type": "object",
  "required": [
    "auditLogId"
  ],
  "properties": {
    "auditLogId": {
      "type": "string",
      "description": "Audit log id to roll back to (from get_workflow_history)"
    },
    "reason": {
      "type": "string",
      "description": "Reason for the rollback (recommended)"
    },
    "confirm": {
      "type": "boolean",
      "description": "Required with confirmationToken to confirm this rollback."
    },
    "confirmationToken": {
      "type": "string",
      "description": "Short-lived token returned by the previous rollback_workflow confirmation challenge."
    }
  }
}

get_audit_statistics

JSON-RPC toolRead-only

Summarize workflow audit activity over time (counts by operation and by day). Useful for understanding usage patterns.

{
  "type": "object",
  "properties": {
    "days": {
      "type": "number",
      "default": 30,
      "description": "Number of days to analyze"
    }
  }
}

detect_suspicious_activity

JSON-RPC toolRead-only

Analyze recent audit history for suspicious patterns such as bulk deletions or activity during unusual hours.

{
  "type": "object",
  "properties": {
    "hours": {
      "type": "number",
      "default": 24,
      "description": "Number of hours to analyze"
    }
  }
}