Skip to main content
Glama

n8n_update_workflow

Modify existing n8n workflows by updating nodes, connections, settings, or renaming them through the Cursor IDE integration.

Instructions

Update an existing workflow. You can update name, nodes, connections, or settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe workflow ID to update
nameNoNew name for the workflow
nodesNoUpdated array of nodes (replaces all existing nodes)
connectionsNoUpdated connections object (replaces all existing connections)
settingsNoUpdated workflow settings

Implementation Reference

  • The main handler function that executes the n8n_update_workflow tool logic. It validates the workflow ID, constructs updateData from input arguments, calls the N8nApiClient.updateWorkflow method, and returns a formatted success response.
    n8n_update_workflow: async (
      client: N8nApiClient,
      args: Record<string, unknown>
    ): Promise<ToolResult> => {
      const id = args.id as string;
      if (!id) {
        throw new Error('Workflow ID is required');
      }
    
      const updateData: Parameters<typeof client.updateWorkflow>[1] = {};
      
      if (args.name !== undefined) updateData.name = args.name as string;
      if (args.nodes !== undefined) updateData.nodes = args.nodes as N8nNode[];
      if (args.connections !== undefined) updateData.connections = args.connections as N8nConnections;
      if (args.settings !== undefined) updateData.settings = args.settings as N8nWorkflowSettings;
    
      const workflow = await client.updateWorkflow(id, updateData);
    
      return {
        content: [
          {
            type: 'text' as const,
            text: JSON.stringify({
              success: true,
              message: `Workflow "${workflow.name}" updated successfully`,
              workflow: {
                id: workflow.id,
                name: workflow.name,
                active: workflow.active,
                nodeCount: workflow.nodes.length,
                updatedAt: workflow.updatedAt,
              },
            }, null, 2),
          },
        ],
      };
    },
  • The ToolDefinition object defining the input schema, description, and parameters validation for the n8n_update_workflow tool.
    {
      name: 'n8n_update_workflow',
      description: 'Update an existing workflow. You can update name, nodes, connections, or settings.',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'The workflow ID to update',
          },
          name: {
            type: 'string',
            description: 'New name for the workflow',
          },
          nodes: {
            type: 'array',
            description: 'Updated array of nodes (replaces all existing nodes)',
          },
          connections: {
            type: 'object',
            description: 'Updated connections object (replaces all existing connections)',
          },
          settings: {
            type: 'object',
            description: 'Updated workflow settings',
          },
        },
        required: ['id'],
      },
    },
  • src/server.ts:60-64 (registration)
    MCP server registration for listing tools, returning allTools which includes the n8n_update_workflow schema definition.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: allTools,
      };
    });
  • src/server.ts:122-125 (registration)
    Handler dispatch registration in MCP callTool request handler. Routes calls to n8n_update_workflow (and other workflow tools) by looking up in workflowToolHandlers object.
    if (name in workflowToolHandlers) {
      const handler = workflowToolHandlers[name as keyof typeof workflowToolHandlers];
      return handler(client, args);
    }
  • Central aggregation of all tool schemas into allTools by spreading workflowTools (containing n8n_update_workflow definition).
    export const allTools: ToolDefinition[] = [
      ...documentationTools,  // Documentation first for discoverability
      ...workflowTools,
      ...executionTools,
    ];
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool updates a workflow but fails to mention critical details like whether this requires specific permissions, if changes are reversible, potential side effects (e.g., replacing all nodes/connections), or error handling. This is inadequate for a mutation tool with zero annotation coverage.

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

Conciseness4/5

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

The description is a single, efficient sentence that front-loads the core action ('Update an existing workflow') and lists updatable elements. There is no wasted text, though it could be slightly more structured (e.g., separating guidance from purpose).

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?

Given the tool's complexity (mutation with 5 parameters, nested objects, no output schema, and no annotations), the description is incomplete. It lacks information on behavioral traits, output format, error conditions, and usage context, making it insufficient for safe and effective agent use despite the comprehensive schema.

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?

The schema description coverage is 100%, so the schema already documents all 5 parameters thoroughly. The description adds minimal value by listing updatable fields ('name, nodes, connections, or settings'), but this is largely redundant with the schema. It doesn't provide additional syntax, format, or usage details beyond what the schema specifies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Update') and resource ('an existing workflow'), specifying what can be updated ('name, nodes, connections, or settings'). It distinguishes from siblings like 'n8n_create_workflow' by focusing on updates rather than creation, though it doesn't explicitly mention all siblings like 'n8n_delete_workflow' or 'n8n_get_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?

The description provides no guidance on when to use this tool versus alternatives such as 'n8n_create_workflow' for new workflows or 'n8n_delete_workflow' for removal. It lacks context on prerequisites (e.g., needing an existing workflow ID) or exclusions, leaving usage implied but not explicit.

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/alicankiraz1/cursor-n8n-builder'

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