Skip to main content
Glama

generate_with_controlnet

Generate images guided by a ControlNet preconditioned image (e.g., pose, depth, canny) and a text prompt. Upload the control image first, then pass its filename. Returns a prompt ID immediately.

Instructions

Generate an image conditioned by a ControlNet preprocessed image (pose skeleton, depth, canny, normal, etc.) plus a text prompt. Upload the control image first with upload_image, then pass its filename as control_image. Unspecified params fall back to your defaults; checkpoint and controlnet_model auto-resolve from local models. Returns prompt_id immediately; asset_id arrives in the completion notification. control_image must already be a preprocessed map (this tool does not run the preprocessor); requires a running ComfyUI with a matching controlnet model in models/controlnet/.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesPositive text prompt
control_imageYesFilename of the (already-uploaded) control image in ComfyUI's input dir
controlnet_modelNoControlNet model file (in models/controlnet/); auto-selected if omitted
strengthNoControlNet conditioning strength, typically 0.0-2.0 (default 1.0); higher = stronger adherence to the control image
negative_promptNoNegative prompt (default: empty / from defaults)
widthNoImage width in pixels
heightNoImage height in pixels
stepsNoSampling steps
cfgNoCFG scale
samplerNoSampler name (e.g. euler, dpmpp_2m)
schedulerNoScheduler (e.g. normal, karras)
seedNoSeed (omit to randomize)
checkpointNoCheckpoint filename; auto-selected if omitted
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses asynchronous behavior (returns prompt_id immediately, asset_id later), default fallback for unspecified params, auto-resolution of models, and runtime prerequisites. This is sufficient for a generation tool.

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 concise (three sentences) and well-structured: first sentence for purpose, second for usage and defaults, third for technical constraints. Every sentence adds unique value; no redundancy.

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 the complexity (13 parameters, no output schema, no annotations), the description covers purpose, prerequisites, async behavior, defaults, and model requirements. It does not detail error handling but provides sufficient context for an agent to use the tool effectively.

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?

With 100% schema coverage, baseline is 3. The description adds value by clarifying that control_image must be preprocessed (schema only says filename), providing typical range and default for strength, and explaining fallback behavior for unspecified params. This goes beyond the schema.

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 the tool's purpose: 'Generate an image conditioned by a ControlNet preprocessed image ... plus a text prompt.' It uses a specific verb ('Generate') and resource ('image'), and distinguishes from siblings like generate_image by emphasizing the ControlNet conditioning and required control image.

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?

The description provides explicit prerequisites: upload the control image first with upload_image, and ensure it is preprocessed. It also mentions requirements (running ComfyUI, matching model). However, it does not explicitly state when not to use this tool or mention alternatives, but the context is clear.

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