Skip to main content
Glama

build_workflow

Builds a runnable ComfyUI workflow from a template and parameters, returning JSON ready to execute or save.

Instructions

Build a ComfyUI workflow from a template and parameters. Returns workflow JSON ready to execute or save. For txt2img_flux, call get_system_resources first and use only when flux_ready is true (FLUX needs ~12GB+ VRAM).

Input Schema

NameRequiredDescriptionDefault
paramsNoOptional: width, height, steps, cfg, prompt, negative_prompt, seed, ckpt_name, filename_prefix, batch_size, denoise; for txt2img_flux: clip_l, t5xxl, guidance
templateYesTemplate id (e.g. txt2img, txt2img_flux). Use list_templates to see available.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses the return value ('workflow JSON ready to execute or save') and a hardware prerequisite for FLUX, which is useful. It does not state whether the workflow is persisted, what permissions are required, or what happens on invalid templates/params, leaving meaningful behavioral gaps.

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?

Three compact sentences with no wasted text. Purpose and return value are front-loaded, and the conditional FLUX guidance follows directly. Every sentence earns its place.

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

Completeness4/5

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

The description covers purpose, output, and an important precondition for one template. The input schema fully documents the two parameters and enumerates expected param keys. It is slightly incomplete because it does not clarify relationships to nearby workflow-building tools.

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

Parameters3/5

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

Schema description coverage is 100%, so both parameters are already documented in structured fields. The description does not add syntax, defaults, or validation details beyond the schema. A baseline 3 is appropriate because the schema already does the parameter-documentation work.

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

Purpose4/5

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

States a specific verb and resource: 'Build a ComfyUI workflow from a template and parameters.' It also says what the output is: workflow JSON ready to execute or save. It does not explicitly distinguish itself from siblings such as create_workflow, apply_template, or build_restyle_workflow, so it falls short of a 5.

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

Usage Guidelines4/5

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

Provides an explicit conditional path for txt2img_flux: call get_system_resources first and use only when flux_ready is true. This is clear usage guidance for one template, including a when-not condition. However, it gives no guidance on choosing between this tool and related workflow-building siblings like create_workflow or apply_template.

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