Skip to main content
Glama

n8n_get_workflow

Read-onlyIdempotent

Retrieve an n8n workflow by ID with configurable detail levels, from minimal metadata to full published graph, including draft, active, and execution stats.

Instructions

Get workflow by ID with different detail levels. n8n has a draft/publish model: the workflow body holds the draft (latest edits); use mode='active' to see the published graph that is actually running. Modes: 'full' (draft + metadata), 'details' (full + execution stats), 'active' (published graph only), 'structure' (nodes/connections topology), 'filtered' (full config of only the nodes named in nodeNames - use to read one heavy node without the whole workflow), 'minimal' (id/name/active/tags).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesWorkflow ID
modeNoDetail level: full=draft + metadata (activeVersionId pointer kept, heavy activeVersion payload stripped), details=full+execution stats, active=published graph (errors if workflow has no live version), structure=nodes/connections topology, filtered=full config of only the nodes listed in nodeNames, minimal=metadata onlyfull
nodeNamesNoFor mode='filtered': node names or node IDs to return with full config. Returns only matching nodes (avoids client-side truncation on large workflows with long Code-node source). Discover names with mode='structure' first.
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint. The description adds valuable context: explains the n8n draft/publish model, what each mode returns, and that active mode requires a live version. No contradictions with annotations.

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 a single paragraph with no wasted sentences. It is well-organized, starting with the core purpose, then explaining the draft/publish model, then listing modes compactly. Every sentence adds value.

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?

Given the tool's complexity (multiple modes, draft/publish model), the description covers key aspects. It explains what each mode returns, though a brief example of the output structure would enhance completeness. No output schema exists, but the description adequately hints at return types.

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

Parameters4/5

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

Schema has 100% coverage, so baseline is 3. The description adds meaning beyond schema: explains the draft/publish model, clarifies that mode='active' returns published graph, and suggests using mode='structure' first to discover node names for mode='filtered'.

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 clearly states 'Get workflow by ID with different detail levels.' It specifies the verb (Get), resource (workflow), and the key differentiator (different detail levels). This distinguishes it from sibling tools like get_node or get_template.

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 explicit context for each mode (e.g., 'use mode='active' to see the published graph', 'use mode='filtered' to read one heavy node'). It also warns that mode='active' errors if no live version. It could be improved with a more explicit 'use this when... and not when...' but is still clear.

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

Install Server

Other Tools

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