Skip to main content
Glama

n8n_workflow_versions

Destructive

Manage n8n workflow version history: list, compare, rollback, delete, or prune versions. Restore previous versions or clean up old snapshots from local or native sources.

Instructions

Manage workflow version history, rollback, comparison, and cleanup. Six modes:

  • list: Show version history for a workflow

  • get: Get details of a specific version

  • rollback: Restore workflow to a previous version (creates backup first)

  • diff: Compare two versions

  • delete: Delete specific version or all versions for a workflow

  • prune: Manually trigger pruning to keep N most recent versions

Two sources:

  • source: 'local' (default) - snapshots n8n-mcp takes before it changes a workflow. Scoped to your n8n instance, works on any n8n version, and covers only changes made through n8n-mcp. Old backups are pruned automatically (10 most recent per workflow, plus an age-based retention window).

  • source: 'native' - n8n's own workflow history, the same list the n8n UI shows, including edits made by people in the UI. Needs an n8n MCP access token and the workflow's "Available in MCP" setting; supports list, get, rollback and diff only. Native rollback is not pre-validated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoOperation mode (default: list)list
limitNoMax versions to return in list mode (native: capped at 50)
offsetNoSkip this many versions in native list mode
sourceNoWhich history to read: 'local' (n8n-mcp snapshots, default) or 'native' (n8n's own version history). delete and prune are local-only.local
deleteAllNoDelete all versions for workflow (delete mode only)
timeoutMsNoClient deadline for the native call (default 30000)
versionIdNoVersion ID. local: numeric snapshot id (number or numeric string); native: n8n's version id string. Required for get and diff, for a single-version delete, and for native rollback; optional for local rollback.
workflowIdNoWorkflow ID (required for list, rollback, delete, prune, diff; required for every native mode)
exposeToMcpNoNative only. When n8n refuses the workflow because it is not available in MCP, enable that setting on the workflow and retry once. This is a visible, persistent workflow setting - confirm with the user first.
maxVersionsNoKeep N most recent versions (prune mode only)
toVersionIdNoThe second version to compare against in diff mode (same id format as versionId)
validateBeforeNoValidate workflow structure before rollback (local only; accepted and ignored for native)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed3 schema fields changedv2.79.0
    • addedInput schema / properties / mode / default
      Added value: +"list"
    • changedInput schema / properties / mode / description
      Previous value: -"Operation mode"New value: +"Operation mode (default: list)"
    • removedInput schema / required
      Removed value: -[
      -  "mode"
      -]
  2. Changed11 schema fields changedv2.77.0
    • addedInput schema / properties / exposeToMcp
      Added value: +{
      +  "description": "Native only. When n8n refuses the workflow because it is not available in MCP, enable that setting on the workflow and retry once. This is a visible, persistent workflow setting - confirm with the user first.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / limit / description
      Previous value: -"Max versions to return in list mode"New value: +"Max versions to return in list mode (native: capped at 50)"
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "list",
      -  "get",
      -  "rollback",
      -  "delete",
      -  "prune"
      -]New value: +[
      +  "list",
      +  "get",
      +  "rollback",
      +  "delete",
      +  "prune",
      +  "diff"
      +]
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Skip this many versions in native list mode",
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / source
      Added value: +{
      +  "default": "local",
      +  "description": "Which history to read: 'local' (n8n-mcp snapshots, default) or 'native' (n8n's own version history). delete and prune are local-only.",
      +  "enum": [
      +    "local",
      +    "native"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / timeoutMs
      Added value: +{
      +  "description": "Client deadline for the native call (default 30000)",
      +  "maximum": 600000,
      +  "minimum": 5000,
      +  "type": "integer"
      +}
    • addedInput schema / properties / toVersionId
      Added value: +{
      +  "description": "The second version to compare against in diff mode (same id format as versionId)"
      +}
    • changedInput schema / properties / validateBefore / description
      Previous value: -"Validate workflow structure before rollback"New value: +"Validate workflow structure before rollback (local only; accepted and ignored for native)"
    • changedInput schema / properties / versionId / description
      Previous value: -"Version ID (required for get mode and single version delete, optional for rollback)"New value: +"Version ID. local: numeric snapshot id (number or numeric string); native: n8n's version id string. Required for get and diff, for a single-version delete, and for native rollback; optional for local rollback."
    • removedInput schema / properties / versionId / type
      Removed value: -"number"
    • changedInput schema / properties / workflowId / description
      Previous value: -"Workflow ID (required for list, rollback, delete, prune)"New value: +"Workflow ID (required for list, rollback, delete, prune, diff; required for every native mode)"
  3. Changed2 schema fields changedv2.57.1
    • removedInput schema / properties / confirmTruncate
      Removed value: -{
      -  "default": false,
      -  "description": "REQUIRED: Must be true to truncate all versions (truncate mode only)",
      -  "type": "boolean"
      -}
    • changedInput schema / properties / mode / enum
      Previous value: -[
      -  "list",
      -  "get",
      -  "rollback",
      -  "delete",
      -  "prune",
      -  "truncate"
      -]New value: +[
      +  "list",
      +  "get",
      +  "rollback",
      +  "delete",
      +  "prune"
      +]
  4. Addedv2.56.0
  5. Removedv2.55.0
  6. Addedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructive behavior, and the description goes further by disclosing side effects: rollback creates a backup first, delete and prune are local-only, prune retains 10 most recent versions automatically, and exposeToMcp is a visible persistent workflow setting requiring user confirmation. This exceeds what annotations alone provide and helps agents anticipate consequences.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear first sentence, a compact mode list, and a source comparison section. It is longer than average, but the tool has 12 parameters and multiple modes, and every sentence contributes operational detail without repetition or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers modes, sources, prerequisites, side effects, and source-specific constraints, which is strong for a complex tool. It does not describe return value shapes or error conditions, and with no output schema present, some of that burden falls on the description; however, the core invocation context is nearly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema already documents all 12 parameters, including mode-specific behavior and defaults. The description adds high-level source semantics but does not meaningfully enrich individual parameter meanings beyond what the schema provides, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Manage workflow version history, rollback, comparison, and cleanup.' It then enumerates six precise modes, making the tool's scope unmistakable. This clearly distinguishes it from sibling workflow tools like n8n_create_workflow or n8n_update_partial_workflow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use the tool via its six modes and explains the critical distinction between the 'local' and 'native' sources. It does not explicitly name sibling alternatives or state when not to use this tool, but the mode breakdown leaves little ambiguity about intended usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/czlonkowski/n8n-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server