validate_node_config
Validate n8n workflow node configurations against type definitions to ensure proper setup before execution.
Instructions
Validate a node configuration against its type definition
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | The node type name | |
| params | Yes | The node parameters to validate | |
| credentials | No | Optional credentials object |
Implementation Reference
- src/index.ts:703-715 (handler)MCP server handler method that executes the 'validate_node_config' tool by calling N8nClient's validation method and formatting the response.private async handleValidateNodeConfig(args: { type: string; params: Record<string, any>; credentials?: Record<string, string> }) { const result = await this.n8nClient.validateNodeConfiguration( args.type, args.params, args.credentials ); return { content: [{ type: 'text', text: JSON.stringify(jsonSuccess(result), null, 2) }] }; }
- src/index.ts:138-159 (schema)Input schema definition for the 'validate_node_config' tool, returned in listTools response.{ name: 'validate_node_config', description: 'Validate a node configuration against its type definition', inputSchema: { type: 'object', properties: { type: { type: 'string', description: 'The node type name', }, params: { type: 'object', description: 'The node parameters to validate', }, credentials: { type: 'object', description: 'Optional credentials object', }, }, required: ['type', 'params'], }, },
- src/index.ts:259-264 (registration)Tool dispatch registration in the CallToolRequestSchema switch statement.case 'validate_node_config': return await this.handleValidateNodeConfig(request.params.arguments as { type: string; params: Record<string, any>; credentials?: Record<string, string> });
- src/n8n-client.ts:303-309 (helper)N8nClient wrapper method that delegates node configuration validation to node-validator.async validateNodeConfiguration( nodeType: string, parameters: Record<string, any>, credentials?: Record<string, string> ): Promise<ValidationResult> { return validateFullNodeConfig(nodeType, parameters, credentials); }
- src/node-validator.ts:267-279 (helper)Core validation function that combines parameter and credential validation for full node config validation.export function validateFullNodeConfig( nodeType: string, parameters: Record<string, any>, credentials: Record<string, string> = {} ): ValidationResult { const parameterValidation = validateNodeConfig(nodeType, parameters); const credentialErrors = validateCredentials(nodeType, credentials); return { valid: parameterValidation.valid && credentialErrors.length === 0, errors: [...parameterValidation.errors, ...credentialErrors], }; }