{"record":{"id":"87ae5b67ab5bae08","repo":"n8n-io/n8n","slug":"validation-error-87ae5b","errorCode":"VALIDATION_ERROR","errorMessage":"Invalid rename node parameters","messagePattern":"Invalid rename node parameters","errorType":"error_code","errorClass":"ValidationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/ai-workflow-builder.ee/src/tools/rename-node.tool.ts","lineNumber":135,"sourceCode":"\t\t\t\t\toldName,\n\t\t\t\t\tnewName,\n\t\t\t\t\tmessage,\n\t\t\t\t};\n\n\t\t\t\tconst stateUpdates = renameNodeInWorkflow(validatedInput.nodeId, oldName, newName);\n\t\t\t\treporter.complete(output);\n\t\t\t\treturn createSuccessResponse(config, message, stateUpdates);\n\t\t\t} catch (error) {\n\t\t\t\tlet toolError;\n\n\t\t\t\tif (error instanceof z.ZodError) {\n\t\t\t\t\tconst validationError = new ValidationError('Invalid rename node parameters', {\n\t\t\t\t\t\tfield: error.errors[0]?.path.join('.'),\n\t\t\t\t\t\tvalue: error.errors[0]?.message,\n\t\t\t\t\t});\n\t\t\t\t\ttoolError = {\n\t\t\t\t\t\tmessage: validationError.message,\n\t\t\t\t\t\tcode: 'VALIDATION_ERROR',\n\t\t\t\t\t\tdetails: error.errors,\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\ttoolError = {\n\t\t\t\t\t\tmessage: error instanceof Error ? error.message : 'Unknown error occurred',\n\t\t\t\t\t\tcode: 'EXECUTION_ERROR',\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treporter.error(toolError);\n\t\t\t\treturn createErrorResponse(config, toolError);\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\tname: RENAME_NODE_TOOL.toolName,\n\t\t\tdescription: `Rename a node in the workflow. This updates the node's display name and automatically updates all connection references.\n\nUSAGE:","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/ai-workflow-builder.ee/src/tools/rename-node.tool.ts#L117-L153","documentation":"Zod schema validation failed on the input to rename_node. The schema (renameNodeSchema) requires nodeId as a string and newName as a non-empty string (min(1)). The catch block relabels the ZodError as VALIDATION_ERROR with the issue list in details.","triggerScenarios":"Missing nodeId; empty newName; non-string values for either field.","commonSituations":"The LLM passes an empty string for newName; nodeId omitted; an object passed instead of a UUID.","solutions":["Read details (ZodError.issues) for the first failing path.","Pass a valid nodeId UUID and a non-empty newName string.","Re-invoke rename_node with corrected input."],"exampleFix":"// before\nrename_node.invoke({ nodeId: 'abc', newName: '' });\n// after\nrename_node.invoke({ nodeId: 'abc-1234', newName: 'Process Orders' });","handlingStrategy":"validation","validationCode":"import { renameNodeSchema } from '@/tools/rename-node.tool';\n\nconst parsed = renameNodeSchema.safeParse(input);\nif (!parsed.success) { /* surface parsed.error.issues, skip the tool call */ }","typeGuard":"function isValidRenameInput(v: unknown): v is { nodeId: string; newName: string } {\n  return typeof v === 'object' && v !== null\n    && typeof (v as any).nodeId === 'string'\n    && typeof (v as any).newName === 'string'\n    && (v as any).newName.length > 0;\n}","tryCatchPattern":"try {\n  renameNodeSchema.parse(input);\n} catch (e) {\n  if (e instanceof z.ZodError) { /* e.issues has field-level detail */ }\n}","preventionTips":["Run the exported schema with safeParse before invoking rename_node.","Reject empty newName upstream of the tool.","Type agent tool-call arguments from the schema's inferred type."],"tags":["workflow-builder","validation","zod","input"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}