Skip to main content
Glama

comfyui_generate_image

Generate images from text prompts or edit existing images using ComfyUI workflows. Provide a prompt and optional image references to create or modify visuals.

Instructions

Generate or edit images with the default image workflow (preset "image"). Without images it generates from the prompt. With images (URLs, base64, or ComfyUI input filenames) it edits them following the prompt, if the workflow supports it; refer to them in the prompt as , ... in the order given. Size: width/height in pixels, or aspect_ratio (any ratio: "16:9", "5:4", "1.5") and/or megapixels (1.0 = ~1024x1024), converted to pixels. Without any size it generates 1024x1024; when editing it uses the size of (scaled down if very large). upscale toggles the extra upscaled output when the workflow has one. Each output file has a label (e.g. "base", "upscale") when the workflow defines them.

Empty arguments keep the workflow's own values. extra sets more workflow params or raw "." overrides; workflow swaps the preset for another workflow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cfgNo
seedNo
waitNo
extraNo
stepsNo
widthNo
heightNo
imagesNo
promptYes
previewNo
timeoutNo
upscaleNo
workflowNo
batch_sizeNo
megapixelsNo
aspect_ratioNo
negative_promptNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Describes workflows, size behavior (default 1024x1024, editing uses <image1> size), upscale toggle, and label outputs. But does not mention async vs blocking, return format, or error handling. Since there are no annotations, the description carries the burden; it covers major behaviors but not all.

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?

Dense but well-organized: first sentence states purpose, then size behavior, then customizations. No fluff; every sentence adds value. Slightly long but necessary for the 17-param tool.

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?

Covers core workflows, size, and customization. However, lacks output details (image format, async behavior), error conditions, and does not mention how `preview`, `timeout`, `batch_size`, `cfg`, `seed`, `steps` interact with defaults. Some parameters have defaults but semantics are implied, not explicit.

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?

With 0% schema description coverage, the description must explain all parameters. It explains images, prompt placeholders, size (width/height, aspect_ratio, megapixels), upscale, extra, workflow, and empty arguments meaning. Almost every parameter is explicitly defined, making up for the schema gap.

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?

States a clear purpose: generate or edit images with the default image workflow. Disambiguates generation vs. editing based on presence of `images`. Differs from siblings like comfyui_generate_video/audio and comfyui_run by focusing on images with preset 'image'.

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?

Explicitly explains when to use without `images` (generate) and with `images` (edit), and how to reference image placeholders. Notes that editing requires workflow support and mentions alternatives like `workflow` parameter to swap presets. But does not contrast with siblings like comfyui_run or comfyui_generate_asset.

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