Skip to main content
Glama

Generate an image

generate_image

Generates one image from a prompt, with an optional reference image and aspect ratio, and saves it to your FXI library. Spends credits. Returns the image URL when ready (usually within 25 seconds), or a generation id to check with get_generation (prefer its lifecycle_status field over the legacy status field). Uses the fast default model unless the user picks another one.

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

Input Schema

NameRequiredDescriptionDefault
seedNoOptional seed for repeatable results.
modelNoImage model. Leave this out, or use "z-image-turbo" (fast, cheapest), unless the user names a model or asks for higher detail. Do not upgrade because the prompt sounds cinematic, premium or photoreal. Higher-detail options cost more: "nano-banana-2" (balanced) and "nano-banana-pro" (highest detail, about 9x the credits). Offer them by name with their price from list_models, and switch only when the user agrees.
promptYesWhat the image should show.
model_idNoDeprecated alias of "model". Prefer "model".
input_imageNoOptional reference image. Public https URL, or an asset_url from create_upload_url, upload_from_url or upload_media_data (used as-is).
location_idNoOptional id of one of your saved locations (list_assets). Its reference image is attached so the scene keeps the same set.
aspect_ratioNoFor example "16:9", "1:1" or "9:16".
character_idNoOptional id of one of your saved characters (list_characters). Their saved look and reference image are used.
estimate_onlyNoIf true, returns the estimated credit cost for this exact request and does NOT generate anything or spend any credits.
idempotency_keyNoOptional. Reuse the same key to retry safely: the earlier result is returned and nothing is charged twice.
last_frame_imageNoOptional end image (models that support it). Public https URL, or an asset_url from create_upload_url, upload_from_url or upload_media_data (used as-is).
first_frame_imageNoOptional start image (models that support it). Public https URL, or an asset_url from create_upload_url, upload_from_url or upload_media_data (used as-is).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / character_id
      Added value: +{
      +  "description": "Optional id of one of your saved characters (list_characters). Their saved look and reference image are used.",
      +  "format": "uuid",
      +  "type": "string"
      +}
    • addedInput schema / properties / location_id
      Added value: +{
      +  "description": "Optional id of one of your saved locations (list_assets). Its reference image is attached so the scene keeps the same set.",
      +  "format": "uuid",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • changedInput schema / properties / model / description
      Previous value: -"Image model from list_models. Defaults to \"z-image-turbo\"."New value: +"Image model. Leave this out, or use \"z-image-turbo\" (fast, cheapest), unless the user names a model or asks for higher detail. Do not upgrade because the prompt sounds cinematic, premium or photoreal. Higher-detail options cost more: \"nano-banana-2\" (balanced) and \"nano-banana-pro\" (highest detail, about 9x the credits). Offer them by name with their price from list_models, and switch only when the user agrees."
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing that the call spends credits, persists an artifact to the user's library, typically completes in ~25 seconds or falls back to an id, and which lifecycle field to trust on the follow-up call. These cost, latency, side-effect and async-outcome details are exactly what an agent needs before invoking a non-read-only, open-world tool.

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?

Front-loads the core action and its side effect, then adds cost, return/polling behavior, and model policy in descending order of importance. Five sentences, no filler, and the parenthetical about preferring lifecycle_status over status prevents a concrete downstream mistake.

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?

With 12 parameters and no output schema, the description carries the right load: it explains what comes back (URL or generation id), roughly how long it takes, and that credits are consumed. Combined with the exhaustive per-parameter schema descriptions, an agent has everything needed to call it and handle the result.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description adds value by summarizing the parameters that matter for a typical call (prompt, optional reference image, aspect ratio) and by confirming the default-model policy up front. Much of that overlaps with the very detailed schema text, but the summarization reduces the need to parse 12 properties.

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?

States a specific verb and resource ('Generates one image from a prompt') plus the salient modifiers (optional reference image, aspect ratio) and the side effect of saving to the FXI library. It is easy to tell apart from generate_video and get_generation, the latter of which is even named as the polling alternative.

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?

Gives clear operating context: it spends credits, returns either a URL (~25s) or a generation id to hand to get_generation, and it steers toward the fast default model unless the user names another. What is missing is an explicit when-not-to-use statement (e.g. versus generate_video or compose_scene), so alternatives beyond get_generation are left implicit.

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.

Resources