Skip to main content
Glama

validate_workflow

Check workflow syntax for errors before execution. Parses DSL content and returns validation status with any issues found.

Instructions

Validate DSL workflow syntax.

Parses DSL and checks for syntax errors without executing the workflow. Returns validation status and any errors found.

Args: dsl: Workflow content in DSL format

Returns: Validation result with is_valid, errors, and warnings

Examples: validate_workflow(dsl_content)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dslYes

Implementation Reference

  • The validate_workflow tool handler: parses DSL syntax using DSLParser, returns validation status, errors, node/section counts on success, or error details on failure.
    def validate_workflow(dsl: str) -> dict:
        """Validate DSL workflow syntax.
    
        Parses DSL and checks for syntax errors without executing the workflow.
        Returns validation status and any errors found.
    
        Args:
            dsl: Workflow content in DSL format
    
        Returns:
            Validation result with is_valid, errors, and warnings
    
        Examples:
            validate_workflow(dsl_content)
        """
        try:
            parser = DSLParser()
            workflow_ast = parser.parse(dsl)
    
            # If parsing succeeded, it's valid
            return {
                "is_valid": True,
                "errors": [],
                "warnings": [],
                "node_count": sum(len(section.nodes) for section in workflow_ast.sections),
                "section_count": len(workflow_ast.sections)
            }
    
        except Exception as e:
            return {
                "is_valid": False,
                "errors": [str(e)],
                "warnings": [],
                "message": "DSL syntax error"
            }

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/christian-byrne/comfy-mcp'

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