Skip to main content
Glama

generate_image

Create images from text prompts using Stable Diffusion. Specify pipeline, prompts, and settings to generate a complete image.

Instructions

Generate an image using Stable Diffusion. Waits for completion and returns the result.

Args:
    pipeline: Pipeline to use — "sd15", "sdxl", or "illustrious"
    positive_prompt: Text prompt describing the desired image
    model_checkpoint: Model checkpoint filename to use
    negative_prompt: Negative prompt (things to avoid)
    width: Image width in pixels (256-2048)
    height: Image height in pixels (256-2048)
    steps: Number of inference steps (1-150)
    cfg_scale: Classifier-free guidance scale (1-30)
    seed: Random seed (-1 for random)
    scheduler: Noise scheduler name
    loras: Optional list of LoRA configs, each with "name" (str) and optional "strength" (float 0-1)
    custom_vae: Optional custom VAE checkpoint filename

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNo
lorasNo
stepsNo
widthNo
heightNo
pipelineYes
cfg_scaleNo
schedulerNoDPM++ 2M
custom_vaeNo
negative_promptNo
positive_promptYes
model_checkpointYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It does disclose the blocking nature ('Waits for completion and returns the result') and encodes validation constraints (width/height ranges, seed -1 semantics, loras structure). But it omits operational realities such as expected runtime, compute cost, failure modes (missing checkpoint, generation errors), and whether inputs are validated server-side.

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?

One purpose sentence followed by a scannable, Google-style Args block covering all 12 parameters without redundancy. Every line earns its place by adding a range or value hint, and the text is neither bloated nor under-specified.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The parameter surface is thoroughly covered, and the output schema handles return-value expectations, so nothing about arguments is missing. What is missing for a complex 12-parameter generation tool is routing context: when to prefer this over submit_generate or batch_generate, and what operational cost/latency to expect from a blocking GPU call.

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?

Schema description coverage is 0% — no property is documented in the schema — and the description compensates fully. It enumerates valid pipeline values ('sd15', 'sdxl', 'illustrious'), gives numeric ranges (256-2048, 1-150, 1-30), explains seed -1 semantics, and defines the nested loras structure (name + optional strength 0-1). This is exactly the compensation a low-coverage schema requires.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Generate an image using Stable Diffusion') and adds a behavioral differentiator: 'Waits for completion and returns the result,' which separates it from the async submit_generate sibling. However, it never names the siblings it is not, so the differentiation remains implicit rather than explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to call this tool versus its alternatives. With submit_generate, submit_inpaint, and batch_generate present, an agent must infer that this is the synchronous single-image path; the description never states exclusions, conditions, or the async alternative, so the sync/async choice is left entirely to the agent.

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/mcaimi/sd-api-mcp'

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