Skip to main content
Glama

update_node

Modify an existing node's configuration, parameters, or credentials within an n8n workflow to adapt automation processes as requirements change.

Instructions

Update an existing node in an n8n workflow

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYes
nodeIdYes
paramsNo
credentialsNo
nameNo
typeVersionNo

Implementation Reference

  • Main handler function that performs the node update by fetching the current workflow, locating the target node by ID, merging provided updates to parameters, credentials, name, or typeVersion, and persisting the modified workflow using optimistic concurrency control.
    async updateNode(request: UpdateNodeRequest): Promise<UpdateNodeResponse> { await this.performWorkflowUpdate(request.workflowId, (workflow) => { const nodeIndex = workflow.nodes.findIndex((node) => node.id === request.nodeId); if (nodeIndex === -1) { throw new Error(`Node with id ${request.nodeId} not found in workflow ${request.workflowId}`); } const node = workflow.nodes[nodeIndex]; if (request.params !== undefined) node.parameters = { ...node.parameters, ...request.params }; if (request.credentials !== undefined) node.credentials = { ...node.credentials, ...request.credentials }; if (request.name !== undefined) node.name = request.name; if (request.typeVersion !== undefined) node.typeVersion = request.typeVersion; }); return { nodeId: request.nodeId }; }
  • MCP server handler for the 'update_node' tool call, which delegates to the N8nClient.updateNode method and formats the response.
    private async handleUpdateNode(args: UpdateNodeRequest) { const result = await this.n8nClient.updateNode(args); return { content: [ { type: 'text', text: JSON.stringify(jsonSuccess(result), null, 2), }, ], };
  • src/index.ts:212-212 (registration)
    Tool registration in the MCP list_tools response, defining the name, description, and input schema.
    { name: 'update_node', description: 'Update an existing node in an n8n workflow', inputSchema: { type: 'object', properties: { workflowId: { oneOf: [{ type: 'string' }, { type: 'number' }] }, nodeId: { type: 'string' }, params: { type: 'object' }, credentials: { type: 'object' }, name: { type: 'string' }, typeVersion: { type: 'number' } }, required: ['workflowId', 'nodeId'] } },
  • TypeScript interface defining the input parameters for the update_node tool.
    export interface UpdateNodeRequest { workflowId: string | number; nodeId: string; params?: Record<string, any>; credentials?: Record<string, string>; name?: string; typeVersion?: number; }
  • src/index.ts:317-318 (registration)
    Dispatch case in the MCP CallToolRequest handler that routes 'update_node' calls to the specific handler method.
    case 'update_node': return await this.handleUpdateNode(request.params.arguments as unknown as UpdateNodeRequest);

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

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