Skip to main content
Glama

generate_image

Submits an asynchronous text-to-image generation job with prompt, size, sampler, and LoRA controls, returning a job ID to poll for the result.

Instructions

Submit an async text-to-image generation job.

Runs the packaged SDXL workflow: loads the diffusion model, encodes the prompt pair, samples, and decodes. Returns immediately with a job id -- poll get_job_status for the result.

Args: prompt: What to generate. negative_embedding: Textual-inversion embedding appended to the negative prompt. negative_prompt: What to avoid. width: Output width in pixels. height: Output height in pixels. steps: Sampling steps. More is slower and usually better. cfg_scale: Classifier-free guidance. Higher follows the prompt harder. sampler: Sampler name, as ComfyUI exposes it. scheduler: Scheduler name, as ComfyUI exposes it. lora: Single LoRA filename from comfyui/models/loras/. lora_weight: Weight for lora. loras: Several LoRAs at once, as [{"name": ..., "weight": ...}]. seed: Fixed seed for reproducibility. Omitted means a random one. output_format: png keeps provenance metadata; other values do not.

Returns: A job record with job_id, the resolved parameters, and the workflow path.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>"
    },
    "name": "generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
loraNo
seedNo
lorasNo
stepsNo
widthNo
heightNo
promptYes
samplerNoeuler_ancestral
cfg_scaleNo
schedulerNonormal
lora_weightNo
output_formatNopng
negative_promptNotext, watermark, blurry, low quality
negative_embeddingNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With zero annotations the description must carry the full behavioral load, and it does most of it: async/non-blocking execution, the fact that it loads the diffusion model (implying model-load cost), the returned job record fields, random seed when omitted, the steps/speed tradeoff, and the metadata provenance difference between png and other formats. It does not cover queueing/concurrency limits, failure behavior, or permission requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded correctly: the one-line purpose and the async/poll rule come before the parameter catalogue. The Args block is long but earns its space given 14 parameters. The trailing Returns section is largely redundant with the existing output schema and could be dropped.

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?

For a 14-parameter generation tool with no annotations and a 0%-covered schema, this is close to complete: purpose, async contract, every parameter, and the follow-up tool are all present, and an output schema exists so return detail is a bonus rather than a requirement. Remaining omissions (valid sampler/scheduler names, numeric ranges, behavior when the server is down) are refinements rather than blockers for correct invocation.

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 description coverage is 0%, so the Args block is the only source of parameter meaning, and it documents all 14 parameters with genuine added value: seed for reproducibility, higher cfg_scale follows the prompt harder, lora resolves to a file under comfyui/models/loras/, and loras takes a list of name/weight objects. The gap is sampler and scheduler, which are only described as 'as ComfyUI exposes it' with no valid values and no enums in the schema, plus no ranges for width/height/steps/cfg_scale.

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?

Opens with a specific verb and resource ('Submit an async text-to-image generation job') and immediately pins down the exact pipeline being run: the packaged SDXL workflow, from model load through prompt encoding, sampling, and decode. That pipeline description is distinctive enough that an agent can tell this apart from the sibling generation tools without reading any schema.

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?

Gives explicit follow-up routing: the call returns immediately and the agent must poll get_job_status for the result. That is real workflow guidance, not just context. However, it offers no guidance on when to prefer batch_generate or generate_ipadapter over this single-shot path, and no stated preconditions such as the ComfyUI server needing to be running.

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