Skip to main content
Glama

generate_image

Generate an image from a text prompt. Builds a txt2img workflow using configured defaults for unspecified parameters. Returns prompt ID for tracking; image delivered asynchronously.

Instructions

Generate an image from a text prompt — the high-level entry point. Builds a txt2img workflow, filling any unspecified parameter from your configured defaults (set_defaults / COMFYUI_DEFAULT_* / config file), auto-selecting a local checkpoint when none is given. Returns the prompt_id immediately; the resulting asset_id arrives in the completion notification and can be passed to view_image or regenerate. For full control over the node graph, use create_workflow + enqueue_workflow instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesPositive text prompt
negative_promptNoNegative prompt (default: empty / from defaults)
widthNoImage width
heightNoImage height
stepsNoSampling steps
cfgNoCFG scale
samplerNoSampler name (e.g. euler, dpmpp_2m)
schedulerNoScheduler (e.g. normal, karras)
seedNoSeed (omit to randomize)
checkpointNoCheckpoint filename; auto-selected from local models if omitted
batch_sizeNoNumber of images to generate
Behavior5/5

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

No annotations are present, so the description carries full burden. It fully discloses behavior: builds txt2img workflow, fills unspecified parameters from defaults, auto-selects checkpoint, returns prompt_id immediately, asset_id arrives later, and can be used with view_image/regenerate.

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?

Two sentences with perfect front-loading: purpose first, then key behavioral details, then alternative. No superfluous words.

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?

While there are 11 parameters and no output schema, the description explains the asynchronous workflow, default mechanisms, and related tools. It feels fully complete for this complexity level.

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% with clear descriptions. The description adds value by explaining default filling and auto-selection for checkpoint, but most semantic information is already in the schema. Slight extra context earns a 4.

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 clearly states 'Generate an image from a text prompt' and identifies itself as 'the high-level entry point', distinguishing from sibling tools like create_workflow + enqueue_workflow.

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 tells when to use this tool (high-level txt2img with defaults) and when not, providing an alternative: 'For full control over the node graph, use create_workflow + enqueue_workflow instead.'

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/artokun/comfyui-mcp'

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