Skip to main content
Glama

n8n_get_workflow

Read-onlyIdempotent

Get an n8n workflow by ID with selectable detail levels: full draft, published graph, execution stats, node topology, or filtered nodes.

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 readOnly and idempotent hints. The description adds critical context about the draft/publish model, mode-specific behaviors (e.g., errors for active mode if no live version), and what each mode returns. No contradiction 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?

Highly concise and well-structured. First sentence states purpose immediately, followed by a clear explanation of the draft/publish model and a bullet-like list of modes. Every sentence earns its place with no redundancy.

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

Completeness5/5

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

Given three parameters and no output schema, the description fully explains return values for each mode, covers edge cases (active mode error), and provides usage hints. It is complete for an agent to select and invoke the tool correctly.

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 coverage is 100%, but the description enriches understanding by explaining the draft/publish model and providing usage guidance for each mode. For 'nodeNames', it clarifies the purpose and suggests a discovery step. This adds significant value beyond the schema descriptions.

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?

Description clearly states 'Get workflow by ID' with specific detail levels, distinguishing from sibling tools. The verb 'get' and resource 'workflow' are precise, and the enumeration of modes differentiates this read-only retrieval from update or delete siblings.

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?

Explicit guidance on when to use each mode, such as 'use mode='active' to see the published graph' and 'use mode='filtered' to read one heavy node'. Suggests discovering names with 'structure' first. While it doesn't explicitly list alternatives for listing workflows or other operations, the context is clear for the tool's intended usage.

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/luislopezsanchez/n8n-mcp-server'

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