Skip to main content
Glama

Generate or edit an image

generate_image

Generate an image from a prompt, or edit/combine images by passing them as references. Each call is charged to the user. Call it once per request: the result is already shown to the user inline, so do not call it again to refine, retry or verify, and do not call show_images for it, unless the user asks for changes or more images. When the user wants several options or variations of the same idea, set count (up to 4) in this one call instead of calling it several times; each image is charged. Returns an asset_id for later edits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoHow many images to make from this same prompt (1-4), each charged at the normal price. Use it when the user asks for several options or variations (e.g. "4 logo ideas"); otherwise leave it at 1.
modelNoModel id. Default nano-banana-2.1. Map what the user names to one of these without calling list_models or asking which variant (first listed wins): nano-banana-2.1 (Nano Banana 2.1); nano-banana-2-lite (Nano Banana 2 Lite); nano-banana-pro (Nano Banana Pro); gpt-image-2.5 (GPT Image 2.5); gpt-image-2.5-fast (GPT Image 2.5 Fast); flux-3 (FLUX.3); seedream-5-pro (Seedream 5.0 Pro); seedream-5-flash (Seedream 5.0 Flash); qwen-image-3 (Qwen Image 3); recraft-v4.1 (Recraft V4.1); recraft-v4.1-vector (Recraft V4.1 Vector); grok-imagine-2 (Grok Imagine 2.0). Call list_models only for advice, prices or models not listed.nano-banana-2.1
promptYesWhat to generate, or the edit to apply to the reference images.
resolutionNoOne of the model's resolutions in list_models (e.g. 1K, 2K, 4K). Ignored for models without resolutions.
aspect_ratioNoe.g. 1:1, 3:4, 16:9. Supported values depend on the model (list_models aspect_ratios); unsupported ones are mapped to the nearest supported ratio. Omit when editing to keep the first reference asset's ratio.
reference_urlsNoPublic https image URLs to use as references.
reference_asset_idsNoasset_ids of previous or uploaded images to edit or use as references. Max per model: list_models max_references.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare non-read-only, open-world, non-destructive. The description adds the material facts annotations cannot carry: every call and every image is billed, results are already rendered inline, and the call returns an asset_id for later edits. The cost and idempotency disclosures are precisely the risk-relevant behavior an agent needs before invoking a paid generation 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-loaded with the core capability, then the constraints in descending order of importance (billing, single-call rule, batching, return value). Every sentence carries an operational instruction; nothing is decorative or repeated.

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 7-parameter generative tool with no output schema, the description covers the missing pieces an agent needs: cost model, retry/suppression behavior, the inline rendering that replaces a show_images call, batch-via-count, and the asset_id returned for follow-up edits. Nothing essential to correct invocation is absent.

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 description coverage is 100%, so the schema already documents all seven parameters well and baseline is 3. The description still adds value by stating count goes 'up to 4' in one call and by explaining the asset_id return that feeds reference_asset_ids, but it does not add anything about resolution, aspect_ratio, or reference limits beyond what the schema says.

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 concrete verb+resource pair and covers both modes ('Generate an image from a prompt, or edit/combine images by passing them as references'), which maps directly onto the reference_urls/reference_asset_ids parameters. It also names sibling tools (show_images, list_models) so an agent can separate this from adjacent capabilities without opening the schema.

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?

Gives explicit when-to-call and when-NOT-to-call guidance: call once per request, do not retry/refine/verify, do not follow with show_images, and only re-call if the user asks for changes. It also routes multi-option requests to the count parameter instead of repeated calls, which is exactly the ambiguity an agent would otherwise guess wrong on.

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