Skip to main content
Glama
nikolausm

n8n MCP Server

by nikolausm

update_workflow

Update an existing workflow by modifying its name, nodes, connections, settings, tags, or activation status. Provide the workflow ID to apply changes.

Instructions

Update an existing workflow

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYesThe ID of the workflow to update
nameNoNew name for the workflow
nodesNoUpdated nodes array
connectionsNoUpdated connections object
activeNoActivation status
settingsNoUpdated workflow settings
tagsNoUpdated tags

Implementation Reference

  • src/tools.ts:80-118 (registration)
    Registration/definition of the 'update_workflow' tool in the tools array, including its name, description, and input schema (workflowId required, with optional name, nodes, connections, active, settings, tags).
    {
      name: "update_workflow",
      description: "Update an existing workflow",
      inputSchema: {
        type: "object",
        properties: {
          workflowId: {
            type: "string",
            description: "The ID of the workflow to update",
          },
          name: {
            type: "string",
            description: "New name for the workflow",
          },
          nodes: {
            type: "array",
            description: "Updated nodes array",
          },
          connections: {
            type: "object",
            description: "Updated connections object",
          },
          active: {
            type: "boolean",
            description: "Activation status",
          },
          settings: {
            type: "object",
            description: "Updated workflow settings",
          },
          tags: {
            type: "array",
            items: { type: "string" },
            description: "Updated tags",
          },
        },
        required: ["workflowId"],
      },
    },
  • Zod validation schema 'UpdateWorkflowSchema' for update_workflow: validates workflowId (string), name, nodes, connections, active, settings, and tags.
    const UpdateWorkflowSchema = z.object({
      workflowId: z.string(),
      name: z.string().optional(),
      nodes: z.array(z.any()).optional(),
      connections: z.record(z.any()).optional(),
      active: z.boolean().optional(),
      settings: z.record(z.any()).optional(),
      tags: z.array(z.string()).optional(),
    });
  • Handler case for 'update_workflow' in handleToolCall: parses args with UpdateWorkflowSchema, destructures workflowId from updateData, then calls client.updateWorkflow(workflowId, updateData).
    case "update_workflow": {
      const { workflowId, ...updateData } = UpdateWorkflowSchema.parse(args);
      return await client.updateWorkflow(workflowId, updateData);
    }
  • N8nClient.updateWorkflow method: sends a PATCH request to /api/v1/workflows/{id} with the workflow data, and validates the response with WorkflowSchema.
    async updateWorkflow(id: string, workflow: any) {
      const response = await this.client.patch(`/api/v1/workflows/${id}`, workflow);
      return WorkflowSchema.parse(response.data);
    }
Behavior2/5

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

No annotations provided, and the description only says 'update' without explaining whether it merges or overwrites, permissions needed, or side effects.

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

Conciseness3/5

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

Extremely brief (4 words), which is concise but under-specifies; could add more value without becoming verbose.

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

Completeness2/5

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

For a tool with 7 parameters, complex nested objects, and no output schema, the description is insufficient; lacks return value, error conditions, and update semantics.

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?

Input schema covers all 7 parameters with descriptions, so the schema does the heavy lifting; the description adds no extra meaning beyond the baseline.

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 the resource 'an existing workflow', distinguishing it from sibling tools like create_workflow and activate_workflow.

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

Usage Guidelines2/5

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

No guidance on when to use this tool vs alternatives like create_workflow or deactivate_workflow; lacks prerequisites or context.

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

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