Skip to main content
Glama

comfyui_validate_workflow

Read-onlyIdempotent

Check a ComfyUI workflow for structural errors, missing nodes, security risks, and suspicious inputs. Receive a validity flag, detailed errors, warnings, and pipeline type.

Instructions

Validate a ComfyUI workflow for structural correctness and security.

    Checks: node structure, connection references, installed node types,
    available models, dangerous nodes, and suspicious inputs.

    Args:
        workflow (required): JSON string of the workflow to validate.

    Returns:
        Dict with keys:

        - ``valid`` (bool): True only if there are zero entries in ``errors``.
        - ``errors`` (list[str]): blocking issues — invalid structure,
          connections that reference nonexistent nodes, ``class_type``
          not installed on the connected server, missing required
          inputs, security blocks, etc. Each entry is a human-readable
          string identifying the offending node id and what's wrong.
        - ``warnings`` (list[str]): non-blocking concerns — missing model
          files, dangerous node names, suspicious input patterns
          (e.g. ``__import__``), or a server-unreachable note when the
          installed-class_type check has to be skipped.
        - ``node_count`` (int): number of nodes in the workflow.
        - ``pipeline`` (str): coarse type — one of ``txt2img``,
          ``img2img``, ``upscale``, ``img2img -> upscale``,
          ``txt2img -> upscale``, or ``unknown``. (For the full
          structural breakdown, use ``comfyui_analyze_workflow``.)
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations provide readOnlyHint, openWorldHint, idempotentHint, and destructiveHint, but the description adds substantial behavioral context: it performs security blocks, detects suspicious inputs like '__import__', and may skip the installed-class_type check with a server-unreachable note. This goes well beyond the annotation hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with a one-sentence summary, followed by a compact list of checks and a clear bulleted return-value specification. Each part earns its place, and the formatting makes it easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description fully covers the tool's behavior, including the output schema keys (valid, errors, warnings, node_count, pipeline) and their meanings, the distinction between blocking errors and non-blocking warnings, and the fallback behavior when the server is unreachable. It is sufficiently complete for an agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema only says 'workflow' is a string; the description clarifies it must be a JSON string of the workflow to validate. This is critical semantic information that the schema does not convey. With 0% schema coverage, the description fully compensates.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource: 'Validate a ComfyUI workflow for structural correctness and security.' It clearly distinguishes the tool from siblings like comfyui_analyze_workflow and comfyui_audit_dangerous_nodes by enumerating its unique checks (node structure, connections, installed node types, models, dangerous nodes, suspicious inputs).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states what the tool checks and when it is appropriate, and it points to a specific alternative: 'For the full structural breakdown, use comfyui_analyze_workflow.' This gives clear usage guidance and excludes overlap with a sibling tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/hybridindie/comfyui_mcp'

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