Skip to main content
Glama

generate_image

Generate an image from a text prompt. Builds a text-to-image workflow with configurable parameters and returns a prompt ID for tracking.

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?

With no annotations provided, the description thoroughly covers behavioral traits: builds txt2img workflow, fills unspecified parameters from defaults, auto-selects checkpoint, returns prompt_id immediately, and explains how to get the asset_id via notification and use it with view_image or 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?

Four sentences, front-loaded with the main purpose, then key behavioral details, and finally an alternative use case. Every sentence is valuable and the structure is efficient.

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?

Given 11 parameters, no output schema, and no annotations, the description covers essential behavioral aspects (async, defaults, auto-checkpoint, result retrieval). It lacks explicit mention of error conditions or rate limits but is otherwise complete for an agent to use the tool correctly.

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 coverage is 100% with descriptions for all 11 parameters. The description adds high-level context about defaults and auto-selection but does not add detailed semantics beyond what the schema provides, meeting the baseline for high coverage.

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 — the high-level entry point' and distinguishes from sibling tools like create_workflow + enqueue_workflow, providing a specific verb and resource with differentiation.

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 says 'For full control over the node graph, use create_workflow + enqueue_workflow instead', giving clear when-to-use and when-not-to-use guidance, and mentions defaults and auto-selection for convenience.

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