Skip to main content
Glama

validate_workflow

Check workflow syntax for errors before execution. Parses DSL content to identify issues and returns validation results with specific error details.

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 main handler function for the 'validate_workflow' tool, decorated with @mcp.tool. It validates DSL syntax by attempting to parse it with DSLParser and returns a dictionary indicating validity, errors, and basic stats like node and section counts.
    @mcp.tool 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