Skip to main content
Glama

images_generate

Generates an image from a text prompt (Gemini 2.5 Flash Image, with Seedream and OpenAI as automatic fallbacks; model picks one). Returns a file_id consumable by messages.send(attachments=[...]) and other file-aware tools. Supports up to 12 reference image file_ids for subject-consistent edits and composition (use file IDs from the [ATTACHMENTS] block, files.search, or search.files). Latency: ~8-30s per image. Output: PNG or JPEG.

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": "images_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoWhich generator draws. 'auto' (default): Gemini 2.5 Flash Image, and Seedream then OpenAI if Gemini is unavailable. 'gemini', 'seedream' (ByteDance Seedream, strong at edits from a reference) or 'openai' (gpt-image-2, best at keeping a reference's details; set quality) use only that one, and report its failure.auto
promptYesText description of the image to generate (3-4000 chars).
qualityNoOpenAI only: 'low' (cheapest, drafts), 'medium', 'high' (finest detail, several times dearer) or 'auto' (default). Ignored by the other models.auto
aspect_ratioNoOutput aspect ratio.1:1
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.
reference_file_idsNoOptional list of up to 3 file_ids whose images should be used as visual references (for edits, subject consistency, or composition). Files must be image MIME types (image/png, image/jpeg, image/webp, image/gif).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / model
      Added value: +{
      +  "default": "auto",
      +  "description": "Which generator draws. 'auto' (default): Gemini 2.5 Flash Image, and Seedream then OpenAI if Gemini is unavailable. 'gemini', 'seedream' (ByteDance Seedream, strong at edits from a reference) or 'openai' (gpt-image-2, best at keeping a reference's details; set quality) use only that one, and report its failure.",
      +  "enum": [
      +    "auto",
      +    "gemini",
      +    "seedream",
      +    "openai"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / quality
      Added value: +{
      +  "default": "auto",
      +  "description": "OpenAI only: 'low' (cheapest, drafts), 'medium', 'high' (finest detail, several times dearer) or 'auto' (default). Ignored by the other models.",
      +  "enum": [
      +    "auto",
      +    "low",
      +    "medium",
      +    "high"
      +  ],
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  3. First observed

TDQS

B3.4/5.0
Behavior3/5

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

The description adds genuinely non-obvious behavior beyond the annotations: latency (~8-30s), the file_id return channel and its consumers, and the automatic Gemini→Seedream→OpenAI fallback chain. However, it states support for 'up to 12 reference image file_ids' while the schema caps the parameter at 3, so a key operational constraint is misreported. The readOnly=false and non-destructive profile is already carried by the annotations and is correctly not repeated.

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?

Five tight sentences, front-loaded with the core action and back-loaded with consumption, reference handling, latency and output format. Each sentence contributes a fact an agent needs, including the practical latency and MIME/format details, with no filler.

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?

With no output schema, the description correctly covers the return value (file_id) and its downstream use, plus latency and output format, which is what an agent needs before calling a slow generation tool. Completeness is marred only by the reference-count inconsistency with the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline would be 3, but the description actively contradicts the schema by claiming up to 12 reference file_ids when the parameter documents a maximum of 3. Its other parameter commentary (model fallback behavior, where to source file IDs) is real added value, but the count mismatch is a concrete error an agent would act on.

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 first sentence names a specific verb and resource ('Generates an image from a text prompt') and adds the underlying providers, so an agent can immediately distinguish it from images_search or videos_generate. It stops short of naming either sibling explicitly, so the differentiation is inferred from the verb rather than stated.

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

Usage Guidelines3/5

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

There is useful guidance on where reference file IDs come from ('[ATTACHMENTS] block, files.search, or search.files') and on how the result is consumed ('messages.send(attachments=[...])'), but no explicit when-to-use/when-not framing versus image search or video generation. The agent must infer that this is the creation path rather than a lookup path, and nothing states when a fallback model should be forced.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.