Skip to main content
Glama

generate_image

Generate an image. Default model: nano_banana_2 (good quality, ~10 coins, supports reference photo). Use z_image (1 coin) only if the user wants the cheapest possible result. Use nano_banana_pro (18-24) only when the user explicitly asks for face preservation or maximum quality. Default resolution 1K — never use 2K/4K unless the user explicitly asks. Default aspect ratio 1:1; generate straight away and change it only when the user asks. 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.

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 1K.
aspect_ratioNo
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. 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"
      +}
  2. 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"
      +]
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only establish that this is a non-read-only, non-destructive, open-world call; the description adds substantial context beyond that — per-model cost in coins, a cost-driven default, and the async contract ("Returns job_id; poll check_job until status=done"). That async disclosure is the single most important behavioral fact and is stated plainly.

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?

Dense but zero filler — every clause is either a default, a selection rule, or the follow-up contract. Defaults and the highest-cost decisions are front-loaded, so an agent can act after the first two sentences.

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?

No output schema exists, and the description closes that gap by stating the return value (job_id) and the polling path via check_job. Combined with model cost guidance and reference-image limits, an agent has everything needed to call this correctly 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?

With 57% schema coverage, the description compensates well for the weakly documented fields: it supplies defaults and cost trade-offs for model and resolution, a default for aspect_ratio, and usage guidance for reference_image_urls (multi-character, character+outfit, ordering, up to 7 inputs). It omits the three alternate model enum values (google_nano_banana, google_nano_banana_edit, gpt_image_2), leaving an agent to infer their role from the schema alone.

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?

Opens with a specific verb+resource ("Generate an image") and immediately scopes it with model routing, resolution defaults, and aspect-ratio defaults. It also names check_job as the follow-up, which cleanly separates this tool from the async poller and from generate_video.

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?

Explicit selection rules for every recommended model: nano_banana_2 as default, z_image only for cheapest, nano_banana_pro only for face preservation or max quality. Adds explicit negative guidance ("never use 2K/4K unless the user explicitly asks", "generate straight away and change it only when the user asks") and a condition for multi-reference inputs.

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.