Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

Get n8n Workflow

n8n_get_workflow
Read-onlyIdempotent

Retrieve complete workflow details including nodes, connections, and settings by providing the workflow ID. Use this tool to inspect workflow configurations and understand automation structures.

Instructions

Get full details of a specific workflow including all nodes and connections.

Args:

  • id (string): The workflow ID

Returns: Complete workflow object with:

  • name, id, active status

  • nodes array with all node configurations

  • connections mapping

  • settings

  • tags

  • timestamps

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe unique identifier of the resource

Implementation Reference

  • The handler function for 'n8n_get_workflow' retrieves a workflow by ID and formats it for output.
      async (params: z.infer<typeof IdParamSchema>) => {
        const workflow = await get<N8nWorkflow>(`/workflows/${params.id}`);
        
        const nodeList = workflow.nodes.map(n => `  - ${n.name} (${n.type})`).join('\n');
        const text = `${formatWorkflow(workflow)}\n\n**Nodes (${workflow.nodes.length}):**\n${nodeList}`;
        
        return {
          content: [{ type: 'text', text }],
          structuredContent: workflow
        };
      }
    );
  • Tool registration for 'n8n_get_workflow'.
      server.registerTool(
        'n8n_get_workflow',
        {
          title: 'Get n8n Workflow',
          description: `Get full details of a specific workflow including all nodes and connections.
    
    Args:
      - id (string): The workflow ID
    
    Returns:
      Complete workflow object with:
      - name, id, active status
      - nodes array with all node configurations
      - connections mapping
      - settings
      - tags
      - timestamps`,
          inputSchema: IdParamSchema,
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        },
Behavior4/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false, covering safety and idempotency. The description adds valuable context about what 'full details' means (nodes, connections, settings, tags, timestamps) and the complete structure returned, which goes beyond what annotations provide. No contradiction with annotations exists.

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 efficiently structured with a clear opening sentence stating the purpose, followed by organized 'Args' and 'Returns' sections. Every sentence adds value without redundancy, making it easy to parse and understand quickly. The formatting enhances readability without unnecessary verbosity.

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 (retrieving detailed workflow data) and rich annotations, the description provides good completeness by detailing the return structure. However, there's no output schema, so the description must fully explain returns, which it does adequately. Minor gaps include lack of error handling or pagination info, but overall it's sufficient for the tool's purpose.

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% with the parameter 'id' well-documented as 'The unique identifier of the resource.' The description adds no additional parameter semantics beyond what the schema provides, but since schema coverage is complete, the baseline score of 3 is appropriate. The description does not compensate for any gaps because there are none.

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 the specific action ('Get full details') and resource ('specific workflow including all nodes and connections'), distinguishing it from sibling tools like n8n_list_workflows (which lists workflows) and n8n_get_execution (which gets execution details). The verb 'Get' combined with the detailed scope makes the purpose unambiguous.

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

Usage Guidelines3/5

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

The description implies usage when detailed workflow information is needed, but doesn't explicitly state when to use this tool versus alternatives like n8n_list_workflows (for summaries) or n8n_get_execution (for execution data). There's no guidance on prerequisites or when-not-to-use scenarios, leaving usage context somewhat implied rather than explicitly documented.

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

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