Skip to main content
Glama

generate_image

Make or create an image from text or a reference photo. Default model: nano_banana_pro (best face preservation, supports reference photo). Use nano_banana_2 or z_image only if the user asks for a cheaper one; read the coin cost from list_models (cost_coins, and cost_by_resolution when present), never from memory. Do not ask about model or resolution: the default resolution is 2K when it costs the same as 1K for the model, else 1K; use 4K only when the user asks. Aspect ratio: story, reel, TikTok, Shorts 9:16; YouTube 16:9; Instagram post or carousel 4:5; unknown 9:16. For multi-character or character-plus-outfit shots, pass extra anchor images in reference_image_urls — Nano Banana 2 / Pro accept up to 7 inputs. Returns job_id; poll check_job until status=done.

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
modelNo
photosNoPhotos the user attached in this chat. Use this for attachments; image URL fields are only for public https links.
promptYes
resolutionNo1K cheapest; 4K up to 50% more. Default: 2K when it costs the same as 1K for the model (Nano Banana Pro), else 1K.
aspect_ratioNoChoose it from where the person will use it: story, reel, TikTok, Shorts 9:16; YouTube 16:9; Instagram post or carousel 4:5; anything else or unknown 9:16 (the default). A model that does not take the ratio gets the nearest one it does; the result says which in aspect_ratio_used, so report that one.
reference_image_urlNoPrimary reference image. Optional. For multi-ref pass reference_image_urls instead or in addition.
reference_image_urlsNoExtra reference images (Nano Banana 2 / Pro accept up to 7 total including reference_image_url). Use for multi-character, face + outfit, style references. Order matters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / aspect_ratio / enum
      Previous value: -[
      -  "16:9",
      -  "9:16",
      -  "1:1",
      -  "4:5",
      -  "3:4",
      -  "5:4",
      -  "4:3"
      -]New value: +[
      +  "9:16",
      +  "2:3",
      +  "3:4",
      +  "4:5",
      +  "1:1",
      +  "5:4",
      +  "4:3",
      +  "3:2",
      +  "16:9",
      +  "21:9",
      +  "1:4",
      +  "1:8",
      +  "4:1",
      +  "8:1",
      +  "auto"
      +]
  2. Changed3 schema fields changed
    • changedInput schema / properties / aspect_ratio / description
      Previous value: -"Do not ask the user for a format. Vertical 9:16 unless they ask for something else. For an Instagram feed post use 4:5. A model that does not take the ratio gets the nearest one it does; the result says which in aspect_ratio_used, so report that one."New value: +"Choose it from where the person will use it: story, reel, TikTok, Shorts 9:16; YouTube 16:9; Instagram post or carousel 4:5; anything else or unknown 9:16 (the default). A model that does not take the ratio gets the nearest one it does; the result says which in aspect_ratio_used, so report that one."
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "nano_banana_2",
      -  "z_image",
      -  "google_nano_banana",
      -  "google_nano_banana_edit",
      -  "gpt_image_2",
      -  "nano_banana_pro"
      -]New value: +[
      +  "nano_banana_pro",
      +  "nano_banana_2",
      +  "z_image",
      +  "google_nano_banana",
      +  "google_nano_banana_edit",
      +  "gpt_image_2"
      +]
    • changedInput schema / properties / resolution / description
      Previous value: -"1K cheapest; 4K up to 50% more. Default 1K."New value: +"1K cheapest; 4K up to 50% more. Default: 2K when it costs the same as 1K for the model (Nano Banana Pro), else 1K."
  3. Changed2 schema fields changed
    • addedInput schema / properties / aspect_ratio / description
      Added value: +"Do not ask the user for a format. Vertical 9:16 unless they ask for something else. For an Instagram feed post use 4:5. A model that does not take the ratio gets the nearest one it does; the result says which in aspect_ratio_used, so report that one."
    • changedInput schema / properties / aspect_ratio / enum
      Previous value: -[
      -  "16:9",
      -  "9:16",
      -  "1:1"
      -]New value: +[
      +  "16:9",
      +  "9:16",
      +  "1:1",
      +  "4:5",
      +  "3:4",
      +  "5:4",
      +  "4:3"
      +]
  4. Changed2 schema fields changed
    • addedInput schema / $defs
      Added value: +{
      +  "AttachedFile": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "download_url": {
      +        "type": "string"
      +      },
      +      "file_id": {
      +        "type": "string"
      +      },
      +      "file_name": {
      +        "type": "string"
      +      },
      +      "mime_type": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "download_url",
      +      "file_id"
      +    ],
      +    "type": "object"
      +  }
      +}
    • addedInput schema / properties / photos
      Added value: +{
      +  "description": "Photos the user attached in this chat. Use this for attachments; image URL fields are only for public https links.",
      +  "items": {
      +    "$ref": "#/$defs/AttachedFile"
      +  },
      +  "maxItems": 7,
      +  "type": "array"
      +}
  5. Changed1 schema field changed
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "nano_banana_2",
      -  "z_image",
      -  "google_nano_banana",
      -  "google_nano_banana_edit",
      -  "gpt4o_image",
      -  "gpt_image_2",
      -  "nano_banana_pro"
      -]New value: +[
      +  "nano_banana_2",
      +  "z_image",
      +  "google_nano_banana",
      +  "google_nano_banana_edit",
      +  "gpt_image_2",
      +  "nano_banana_pro"
      +]
  6. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that the tool returns a job_id and requires polling check_job until status=done, which is critical async behavior. It also explains model-specific reference-image limits, default resolution cost logic, and aspect-ratio fallback reporting via aspect_ratio_used.

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?

The description is dense and front-loads the main action and defaults, with no obviously irrelevant sentences. It is somewhat long for a single paragraph, but the length is justified by the tool's complexity and the practical guidance it provides.

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 no output schema, the description still tells the agent that the tool returns job_id and must be polled with check_job. It covers model selection, cost lookup, resolution defaults, aspect-ratio selection, and multi-reference inputs, which is complete enough to call the tool correctly.

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 description adds substantial meaning beyond the schema: default model rationale, when cheaper models are appropriate, where to read cost_coins and cost_by_resolution, resolution defaults based on cost parity, and aspect-ratio mapping by use case. It also clarifies multi-reference usage and the seven-image limit for Nano Banana 2 / Pro.

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 states a specific verb and resource: make or create an image from text or a reference photo. It distinguishes this from sibling tools such as generate_video, list_models, and check_job by describing image generation, model/cost lookup, and job polling separately.

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?

It gives explicit guidance on default model selection, when to use cheaper models, how to obtain coin costs from list_models, when to use 4K, and how to choose aspect ratios by destination. It also says not to ask about model or resolution, removing ambiguity for the agent.

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.