Skip to main content
Glama

comfy_generate

Generate images, videos, or upscales via curated ComfyUI workflows. Submit a prompt and operation, get reproducible outputs.

Instructions

Generate image, video, or upscale via a curated ComfyUI workflow.

RATIONALE

Consolidated portmanteau: all generation modes share the same ComfyUI workflow submission and result polling pipeline. The operation discriminator selects the workflow type.

Return Format

{"success": bool, "prompt_id": str, "outputs": [...], "seed": int, "message": str}

Examples

comfy_generate(operation="image", workflow_id="flux-klein-t2i",
               prompt="a cat surfing on a pizza slice", seed=42)
comfy_generate(operation="upscale", workflow_id="esrgan-upscale",
               prompt="", image_input="<base64>")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoRandom seed for reproducibility. Omit for random.
sizeNoImage size as WxH (e.g. '1024x1024').
promptYesText prompt for generation.
operationYesGeneration type.
image_inputNoBase64 image for i2v/inpaint/edit.
workflow_idYesWorkflow ID from comfy_workflows/list.
negative_promptNoNegative prompt.
auto_install_nodesNoInstall missing custom nodes via ComfyUI-Manager.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

There are no annotations, so the description carries the behavioral disclosure burden. It does add useful context by revealing the shared workflow submission and result polling pipeline and by providing a return format. However, it does not explain asynchronous behavior, failure modes, side effects, or cost/network implications, so transparency is only partial.

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 well-structured and appropriately sized: a one-line summary, a rationale for the consolidated design, a return-format block, and two concrete examples. Every section earns its place and there is no filler or repetition of the input schema.

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?

For a tool with 8 parameters and 5 enum values, the description is largely complete: it provides the return format, illustrates required parameters, and explains why one pipeline covers all operations. It lacks examples for video, inpaint, and edit, and does not elaborate on operation-specific input dependencies, but the schema covers those details, making the remaining gaps minor.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds operational meaning through its examples: it shows how operation pairs with workflow_id, demonstrates that upscale uses an empty prompt with a base64 image_input, and illustrates the optional seed parameter. This helps an agent combine parameters correctly beyond what the schema alone provides.

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?

The description opens with a clear verb and resource: 'Generate image, video, or upscale via a curated ComfyUI workflow.' The rationale explains that a single operation discriminator selects the workflow type, which distinguishes it from sibling workflow-management and list tools. However, the first sentence omits the 'inpaint' and 'edit' operations that appear in the schema enum, and it does not explicitly name sibling alternatives.

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

Usage Guidelines3/5

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

Usage is mostly implied rather than stated. The rationale says all generation modes share the same workflow submission and result polling pipeline, and the examples show image and upscale invocations, but the description does not explicitly say when to use this tool versus comfy_workflows or comfy_agentic_assist. There are no exclusion conditions or alternative routing instructions.

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