Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

Update n8n Workflow

n8n_update_workflow
Idempotent

Modify existing n8n workflows by updating their name, nodes, connections, settings, or tags. Provide complete arrays for nodes and connections to replace current configurations.

Instructions

Update an existing workflow. Can update name, nodes, connections, settings, or tags.

⚠️ IMPORTANT: When updating nodes or connections, you must provide the COMPLETE arrays. Partial updates are not supported - the provided values will replace existing ones.

Args:

  • id (string): Workflow ID to update (required)

  • name (string, optional): New workflow name

  • nodes (array, optional): Complete updated nodes array

  • connections (object, optional): Complete updated connections

  • settings (object, optional): Updated settings

  • tags (array, optional): Updated tag IDs

Returns: The updated workflow object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesWorkflow ID to update
nameNoNew workflow name
nodesNoUpdated nodes array
connectionsNoUpdated connections
settingsNoUpdated settings
staticDataNoUpdated static data
tagsNoUpdated tag IDs

Implementation Reference

  • The definition and handler implementation for the n8n_update_workflow tool. It uses the `put` utility to send a request to the n8n API.
      server.registerTool(
        'n8n_update_workflow',
        {
          title: 'Update n8n Workflow',
          description: `Update an existing workflow. Can update name, nodes, connections, settings, or tags.
    
    ⚠️ IMPORTANT: When updating nodes or connections, you must provide the COMPLETE arrays.
    Partial updates are not supported - the provided values will replace existing ones.
    
    Args:
      - id (string): Workflow ID to update (required)
      - name (string, optional): New workflow name
      - nodes (array, optional): Complete updated nodes array
      - connections (object, optional): Complete updated connections
      - settings (object, optional): Updated settings
      - tags (array, optional): Updated tag IDs
    
    Returns:
      The updated workflow object.`,
          inputSchema: UpdateWorkflowSchema,
          annotations: {
            readOnlyHint: false,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        },
        async (params: z.infer<typeof UpdateWorkflowSchema>) => {
          const { id, ...updateData } = params;
          const workflow = await put<N8nWorkflow>(`/workflows/${id}`, updateData);
          
          return {
            content: [{ type: 'text', text: `✅ Workflow updated successfully!\n\n${formatWorkflow(workflow)}` }],
            structuredContent: workflow
          };
        }
      );
Behavior4/5

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

The description adds valuable behavioral context beyond annotations: the critical warning about complete array replacement for nodes/connections (partial updates not supported), which isn't covered by annotations. Annotations already indicate it's not read-only, not destructive, and idempotent, but the description provides specific implementation behavior that helps the agent understand how to use the tool correctly.

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: purpose statement first, critical warning prominently displayed, then parameter summary and return value. Every sentence earns its place - the warning is essential, the parameter list helps scanning, and the return statement clarifies output. No wasted words.

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?

For a mutation tool with rich schema (7 params, nested objects) and annotations covering safety aspects, the description provides good context: purpose, critical behavioral constraint, parameter overview, and return value. The main gap is lack of output schema, but the description states what's returned. It could benefit from more context about error conditions or prerequisites.

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?

With 100% schema description coverage, the baseline is 3. The description adds value by explaining that nodes/connections require 'COMPLETE arrays' and that 'provided values will replace existing ones,' which clarifies the semantics beyond the schema's structural definitions. However, it doesn't provide additional context about parameter interactions or usage examples.

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 verb ('Update') and resource ('existing workflow'), and specifies what can be updated ('name, nodes, connections, settings, or tags'). It distinguishes from siblings like n8n_create_workflow (create vs update) and n8n_update_workflow_tags (partial vs complete update).

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 guidance about when to use this tool vs alternatives through the warning about complete arrays for nodes/connections, implying this is for full replacements rather than partial updates. However, it doesn't explicitly mention when NOT to use it (e.g., vs n8n_update_workflow_tags for tag-only updates) or other specific alternatives.

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