Skip to main content
Glama

generate_image

Generate images from text prompts using a diffusion model with customizable checkpoints, LoRA styles, resolution, and seed. Outputs include metadata for reproducible workflows.

Instructions

Generate an image with Animagine XL 4.0.

Uses the Diffusers pipeline with the lpw_stable_diffusion_xl custom pipeline. Images are saved to outputs/YYYY-MM-DD/ with accompanying metadata JSON.

Supports custom checkpoints and LoRA mixing for style control.

Recommended workflow:

  1. list_models → see available checkpoints and LoRAs

  2. validate_prompt → check for issues

  3. optimize_prompt → improve structure

  4. generate_image → create the image

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoRandom seed for reproducibility (random if not set)
lorasNoList of LoRA filenames to apply (in order). Examples: ["custom_lora.safetensors"] (user's local LoRAs)
stepsNoInference steps (default 28, use 4-8 with LCM LoRA)
widthNoImage width (default 832, portrait)
heightNoImage height (default 1216, portrait)
promptYesThe positive prompt (pre-validated recommended)
checkpointNoCheckpoint filename or 'default' for HuggingFace model. Examples: "custom_checkpoint.safetensors" (user's local checkpoint)
lora_scalesNoScale/strength per LoRA (0.0-2.0, defaults to 1.0 for each). Example: [0.8, 0.5] for two LoRAs
render_typeNoOptional render type specification ('gpu' or 'cpu'). If specified and doesn't match detected device, renders are aborted to prevent slow processing.
guidance_scaleNoCFG scale (default 5.0, use 1.5 with LCM LoRA)
negative_promptNoOptional; defaults to standard negative prompt

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/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 reveals that images are saved to outputs/YYYY-MM-DD/ with metadata JSON and that it uses a custom Diffusers pipeline, which are useful side effects. It does not describe failure modes or rate limits, but these are partially addressed by the schema (e.g., render_type).

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?

The description is front-loaded with a clear purpose, followed by relevant technical details and a valuable workflow. Each sentence contributes meaning, though the middle section about the pipeline and file output could be slightly tighter without losing key information.

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 of an 11-parameter image generation tool, the description covers the model, pipeline, file output, and recommended workflow, making it quite thorough. The presence of an output schema handles return values. Minor gaps remain around explicit error handling and resource costs, but overall it is complete enough for an agent.

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 description coverage is 100%, so baseline 3 is appropriate. The description adds context about custom checkpoints and LoRA mixing, but these already map directly to schema parameters. It does not enrich parameter meaning beyond what the schema already provides.

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 opens with 'Generate an image with Animagine XL 4.0', which is a specific verb and resource, clearly distinguishing this tool from siblings like generate_image_from_image. It also states the model and pipeline used, making the tool's main function unambiguous.

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 a recommended workflow with explicit steps (list_models → validate_prompt → optimize_prompt → generate_image), giving clear guidance on when to invoke this tool. However, it does not explicitly state when not to use it or mention alternative tools for similar tasks.

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/gabrielalmir/mcp-animaginexl'

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