Skip to main content
Glama

generate_image

DestructiveIdempotent

Create one image without a source; use derive_image for source-guided edits, upscale_image for dedicated processing, or batch_generate for multiple jobs. Preview returns requestId and preview (parameters, readiness, expiry, estimatedChargePoints); auto/run reuse that ID. Run requires user approval. Execution returns task/status and possibly nextAction; resume it after interruption, never resubmit. Retry a failed task with preview retryTaskId only.

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": {
      "action": "<action>"
    },
    "name": "generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
sizeNoGPT pixel size; other sizes in list_models.
countNoImages, default 1; 0 keeps legacy default.
modelNoImage model from list_models; omit for default.
actionYespreview freezes inputs and quotes cost; auto checks saved spending authorization; run requires explicit user approval.
promptNoRequired image instructions.
qualityNoGPT quality affects the quote; default auto. See list_models. Image 2 forwards other values unchanged.
requestIdNoOriginal preview receipt for auto/run; reuse it after interruption, without re-previewing.
frameCountNoGIF 2–16 frames; default 9. Rate: pricing.gifFramePoints/frame.
retryTaskIdNoFailed task ID; preview only, without replacement image parameters.
deliveryModeNonative returns previews and original links; links returns original links; metadata omits image delivery.
outputFormatNoGPT supports WebP; 2.6 adds GIF/SVG. Default png.
thinkingLevelNoGemini reasoning; see list_models.
frameDurationMsNoGIF frame ms: 20–2000; default 200. Timing does not change price.
referenceImagesNoUp to 8 images; preview freezes bytes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • changedInput schema / properties / count / description
      Previous value: -"Image count; default 1, maximum 16. Zero retains the legacy default."New value: +"Images, default 1; 0 keeps legacy default."
    • addedInput schema / properties / frameCount
      Added value: +{
      +  "description": "GIF 2–16 frames; default 9. Rate: pricing.gifFramePoints/frame.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / frameDurationMs
      Added value: +{
      +  "description": "GIF frame ms: 20–2000; default 200. Timing does not change price.",
      +  "type": "integer"
      +}
    • changedInput schema / properties / model / description
      Previous value: -"Public image model ID from list_models; omit for the configured recommendation."New value: +"Image model from list_models; omit for default."
    • changedInput schema / properties / outputFormat / description
      Previous value: -"Original image format; default png."New value: +"GPT supports WebP; 2.6 adds GIF/SVG. Default png."
    • changedInput schema / properties / outputFormat / enum
      Previous value: -[
      -  "jpeg",
      -  "png"
      -]New value: +[
      +  "jpeg",
      +  "png",
      +  "webp",
      +  "gif",
      +  "svg"
      +]
    • changedInput schema / properties / prompt / description
      Previous value: -"Image instructions; required for a fresh preview."New value: +"Required image instructions."
    • changedInput schema / properties / quality / description
      Previous value: -"GPT: auto (default), low, medium, high; 2.5 Sunburst/Flare also xhigh, max; affects the quote. Others: list_models qualities."New value: +"GPT quality affects the quote; default auto. See list_models. Image 2 forwards other values unchanged."
    • changedInput schema / properties / referenceImages / description
      Previous value: -"Up to 8 source images; preview freezes their bytes. Use derive_image for editing."New value: +"Up to 8 images; preview freezes bytes."
    • changedInput schema / properties / referenceImages / items / description
      Previous value: -"Public image URL or image data URL."New value: +"Public URL or image data URL."
    • changedInput schema / properties / size / description
      Previous value: -"GPT: pixel size e.g. 3840x2160. Others: list_models sizes."New value: +"GPT pixel size; other sizes in list_models."
    • changedInput schema / properties / thinkingLevel / description
      Previous value: -"Gemini reasoning level; supported values and price multipliers come from list_models."New value: +"Gemini reasoning; see list_models."
  2. Changed2 schema fields changed
    • changedInput schema / properties / quality / description
      Previous value: -"Supported quality tier from list_models; affects the quote."New value: +"GPT: auto (default), low, medium, high; 2.5 Sunburst/Flare also xhigh, max; affects the quote. Others: list_models qualities."
    • changedInput schema / properties / size / description
      Previous value: -"Supported aspect ratio from list_models, e.g. 1:1."New value: +"GPT: pixel size e.g. 3840x2160. Others: list_models sizes."
  3. Changed13 schema fields changed
    • addedInput schema / properties / action / description
      Added value: +"preview freezes inputs and quotes cost; auto checks saved spending authorization; run requires explicit user approval."
    • addedInput schema / properties / count / description
      Added value: +"Image count; default 1, maximum 16. Zero retains the legacy default."
    • addedInput schema / properties / deliveryMode / description
      Added value: +"native returns previews and original links; links returns original links; metadata omits image delivery."
    • addedInput schema / properties / model / description
      Added value: +"Public image model ID from list_models; omit for the configured recommendation."
    • addedInput schema / properties / outputFormat / description
      Added value: +"Original image format; default png."
    • addedInput schema / properties / prompt / description
      Added value: +"Image instructions; required for a fresh preview."
    • addedInput schema / properties / quality / description
      Added value: +"Supported quality tier from list_models; affects the quote."
    • changedInput schema / properties / referenceImages / description
      Previous value: -"URL/data URL."New value: +"Up to 8 source images; preview freezes their bytes. Use derive_image for editing."
    • addedInput schema / properties / referenceImages / items / description
      Added value: +"Public image URL or image data URL."
    • addedInput schema / properties / requestId / description
      Added value: +"Original preview receipt for auto/run; reuse it after interruption, without re-previewing."
    • addedInput schema / properties / retryTaskId / description
      Added value: +"Failed task ID; preview only, without replacement image parameters."
    • changedInput schema / properties / size / description
      Previous value: -"Ratio."New value: +"Supported aspect ratio from list_models, e.g. 1:1."
    • changedInput schema / properties / thinkingLevel / description
      Previous value: -"Gemini thinking; extended=高级模式."New value: +"Gemini reasoning level; supported values and price multipliers come from list_models."
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare non-read-only, destructive, idempotent behavior, and the description supplies the operational detail behind those flags: cost quoting via estimatedChargePoints, parameter/readiness/expiry receipts, the approval gate on run, and the interruption policy of resuming an existing requestId instead of resubmitting. It also discloses the execution return shape (task/status, possible nextAction) and the failure-recovery path, which annotations alone cannot convey.

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?

Front-loaded with purpose and alternatives, then the preview/auto/run lifecycle, then recovery rules — a sensible order. The prose is telegraphic and dense ("auto/run reuse that ID"), which is efficient but occasionally terse enough to require a second read.

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 14-parameter, cost-incurring generation tool with no output schema, the description covers the gaps that matter: the two-phase preview-then-execute model, what the receipt contains, the approval requirement, and how to handle interruption and failure. Remaining parameter detail is fully documented in the schema, so nothing an agent needs to invoke this correctly is missing.

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 meaning on top by explaining that requestId is a preview receipt to be reused after interruption and that retryTaskId is preview-only and takes no replacement image parameters. Those are cross-parameter usage rules the schema does not state, though most individual parameter semantics are left to the schema.

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 opening clause states a specific verb and resource plus a defining constraint: "Create one image without a source." It immediately names the siblings it is not (derive_image for source-guided edits, upscale_image for processing, batch_generate for multiples), so an agent can route correctly without inspecting schemas.

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?

Explicit routing guidance to three alternatives and a clear three-mode workflow (preview freezes/quotes, auto checks spending authorization, run requires approval), plus a rule to resume rather than resubmit and to retry only via retryTaskId. The one weakness is that batch_generate is cited as an alternative but does not appear in the sibling list, which could send an agent looking for a nonexistent tool.

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