Skip to main content
Glama

generate_image

Turn text prompts into images with NVIDIA NIM models. Adjust resolution, sampler, scheduler, and save output as PNG.

Instructions

Generate images from text prompts using NVIDIA NIM image generation models (Stable Diffusion XL, SDXL Turbo, SD3, FLUX.1). Supports various resolutions, samplers, and schedulers. FLUX.1-schnell and FLUX.1-kontext-dev are available on the free NVIDIA AI Foundation tier. Can save generated images as PNG files to disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoRandom seed for reproducibility
imageNoBase64 data URL of input image (required for FLUX Kontext image-to-image editing, format: data:image/png;base64,...)
modelNoImage generation model ID (e.g., nvidia/stable-diffusion-xl, nvidia/sdxl-turbo, stabilityai/sd-3-medium, black-forest-labs/flux.1-dev, black-forest-labs/flux.1-schnell, black-forest-labs/flux.1-kontext-dev)
stepsNoNumber of diffusion steps (ignored for FLUX Schnell, fixed at 4)
widthNoImage width in pixels
heightNoImage height in pixels
promptYesText prompt describing the image to generate
samplerNoSampler algorithm (e.g., euler, euler_a, dpmpp_2m, dpmpp_sde, ddim)
cfg_scaleNoClassifier-free guidance scale
save_pathNoOptional file path to save the generated image as PNG (e.g., './output/image.png' or '/absolute/path/image.png')
schedulerNoScheduler type (e.g., karras, exponential, simple, ddim_uniform)
num_imagesNoNumber of images to generate
aspect_ratioNoAspect ratio for output (e.g., 'match_input_image', '1:1', '16:9', '4:3', '3:4', '21:9')
save_filenameNoOptional filename (without extension) to auto-generate path in current directory (e.g., 'my-image' creates './my-image.png')
negative_promptNoNegative prompt to avoid unwanted features
response_formatNoResponse format: URL or base64 JSONurl
Behavior3/5

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

No annotations are provided, so the description carries the burden. It discloses the ability to save PNGs to disk and notes free-tier model availability. However, it lacks information about output formats (URL vs b64_json), rate limits, or model-specific constraints beyond what the schema already states, leaving gaps in full behavioral disclosure.

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 three concise sentences, front-loaded with the primary purpose, followed by key capabilities and a practical note about free-tier models. Every sentence adds value without unnecessary fluff.

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?

With 16 parameters and no output schema, the description provides a useful overview but omits important return-value semantics (URL vs base64 JSON) and does not mention image-to-image editing via FLUX Kontext despite the schema having an image parameter. It covers core context but is not fully complete for a tool of this complexity.

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 the baseline is 3. The description adds a high-level summary (supports resolutions, samplers, schedulers) but does not provide additional meaning beyond what each parameter's schema description already offers.

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 generates images from text prompts using specific NVIDIA NIM models, which distinguishes it from siblings like text_generation or analyze_image. The verb+resource is specific and 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 clear context for when to use the tool (image generation) and hints at model selection (free tier for FLUX models). It doesn't explicitly exclude alternatives or name them, but the sibling tools are distinctly different tasks, making the usage context apparent.

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/david-eve-za/nvidia-nim-mcp'

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