Skip to main content
Glama

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
NameRequiredDescriptionDefault
typeYesThe node type name
paramsYesThe node parameters to validate
credentialsNoOptional credentials object

Implementation Reference

  • 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) }] };
    }
  • 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> 
      });
  • 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);
    }
  • 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],
      };
    }

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