Skip to main content
Glama

generate_image

Create images from text prompts with configurable size, aspect ratio, and seed. Returns PNGs or base64 output for easy integration.

Instructions

Generate new image(s) from a text prompt.

    model: which image model to use; omit for the configured default. Currently available: "qwen21"
    (Qwen Image 2.1). list_models shows what is installed and ready.
    Canvas: give width and height (multiples of 32, default 1024×1024) or an aspect preset:
    square, landscape (1344×768), portrait (768×1344), wide (1536×640), tall (640×1536).
    seed: omit for random; the seed used is always returned so a result can be reproduced.
    steps default 25, cfg default 1.0 (Qwen 2.1 works best at cfg 1.0; a negative prompt only
    matters when cfg > 1). count 1-4 images in one run.
    save=true writes full-size PNGs to the configured output folder and returns their paths plus
    a small preview of each; save=false returns base64 PNG in the text instead of writing files.
    Blocks until done (typically 20-60 s). If it returns JSON with a job_id, the server was busy:
    use wait_for_job(job_id).
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cfgNo
saveNo
seedNo
countNo
modelNo
stepsNo
widthNo
aspectNo
heightNo
promptYes
negativeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and succeeds. It discloses blocking behavior and typical timing, the difference between writing files and returning base64, that the seed is always returned for reproducibility, and what to do if a job_id appears. This is rich operational behavior that an agent could not infer from the schema.

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 longer than average, but it is densely informative and organized by parameter area. Each line adds a necessary constraint, default, or behavioral fact, and the core purpose is front-loaded. Nothing reads as filler.

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 high-complexity tool with 11 parameters, no annotations, and no output schema, this description is complete. It covers input choices, defaults, output modes, timing, reproducibility, and async fallback behavior. An agent has what it needs to call the tool correctly and interpret the result.

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?

The input schema has 0% description coverage, so the description is the only source of parameter meaning. It explains every parameter: model, canvas/aspect, seed, steps, cfg, count, save, prompt, and negative, including defaults and constraints such as multiples of 32 and count 1-4. This fully compensates for the schema gap.

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 new image(s) from a text prompt,' a specific verb and resource. The word 'new' distinguishes it from the edit_image sibling, and the rest of the description stays focused on generation rather than manipulation.

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

Usage Guidelines5/5

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

The description gives concrete routing guidance: use list_models to see installed models, and if the server returns a job_id, use wait_for_job(job_id). It also explains when save=false is useful and notes that negative prompts only matter when cfg > 1, which is practical selection context.

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