Skip to main content
Glama

Generate Image

generate_image

Generate images from text prompts using Google Gemini, with control over aspect ratio, resolution, model, and output format for tailored visuals.

Instructions

Generate an image from a text prompt using Google Gemini.

Input Schema

NameRequiredDescriptionDefault
modelNoModel override. Options: - "gemini-nano-banana-2.1" (default): Best all-round, panoramic, grounding - "gemini-3.1-flash-lite-image": Fastest, cheapest, 1K only - "gemini-3.1-flash-image": Panoramic, grounding, 0.5K tier - "gemini-3-pro-image": Best text rendering, complex edits
promptYesText description of the image to generate
qualityNoQuality preset: "fast" (gemini-3.1-flash-lite-image), "balanced" (gemini-nano-banana-2.1), or "quality" (gemini-3-pro-image, 2K). Mutually exclusive with 'model'.
image_sizeNoResolution: "0.5K" (gemini-3.1-flash-image only), "1K" (default), "2K", or "4K". 2K/4K are not supported by gemini-3.1-flash-lite-image.
temperatureNoCreativity level 0.0-2.0
aspect_ratioNoImage dimensions (1:1, 16:9, 9:16, etc.)1:1
output_formatNoFile format: "png", "jpeg", or "webp"png
safety_settingNoSafety filter (preset:strict, preset:relaxed)preset:strict
output_filenameNoCustom filename (optional, auto-generated if not provided)
thinking_budgetNoThinking budget for extended reasoning (0-24576 tokens). Higher = deeper reasoning.
number_of_imagesNoGenerate 1-4 variations (default: 1)
reference_imagesNoPaths to reference images for style/character consistency (up to 14 images on gemini-nano-banana-2.1 and gemini-3.1-flash-image; 6 on gemini-3-pro-image)
person_generationNoAccepted for compatibility ("allow", "adults_only", "block"). Not enforced by the Gemini API; Gemini applies its own built-in restrictions on identifiable people.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.6.0
    • changedInput schema / properties / image_size / description
      Previous value: -"Resolution: \"1K\" (default), \"2K\", or \"4K\""New value: +"Resolution: \"0.5K\" (gemini-3.1-flash-image only),\n\"1K\" (default), \"2K\", or \"4K\". 2K/4K are not supported by\ngemini-3.1-flash-lite-image."
    • changedInput schema / properties / model / description
      Previous value: -"Model override. Options:\n- \"gemini-2.5-flash-image\" (default): Fast, cheap\n- \"gemini-3-pro-image-preview\": Best text, complex edits\n- \"gemini-3.1-flash-image-preview\": Panoramic, fast 4K"New value: +"Model override. Options:\n- \"gemini-nano-banana-2.1\" (default): Best all-round,\n  panoramic, grounding\n- \"gemini-3.1-flash-lite-image\": Fastest, cheapest, 1K only\n- \"gemini-3.1-flash-image\": Panoramic, grounding, 0.5K tier\n- \"gemini-3-pro-image\": Best text rendering, complex edits"
    • changedInput schema / properties / person_generation / description
      Previous value: -"People in images: \"allow\", \"adults_only\"\n(no minors), or \"block\" (no people). Only enforced with\nImagen models. Gemini has built-in person restrictions."New value: +"Accepted for compatibility (\"allow\",\n\"adults_only\", \"block\"). Not enforced by the Gemini API;\nGemini applies its own built-in restrictions on\nidentifiable people."
    • changedInput schema / properties / quality / description
      Previous value: -"Quality preset: \"fast\" (cheapest), \"balanced\"\n(good quality), or \"quality\" (best output). Mutually\nexclusive with 'model'."New value: +"Quality preset: \"fast\" (gemini-3.1-flash-lite-image),\n\"balanced\" (gemini-nano-banana-2.1), or \"quality\"\n(gemini-3-pro-image, 2K). Mutually exclusive with 'model'."
    • changedInput schema / properties / reference_images / description
      Previous value: -"Paths to reference images for style/character\nconsistency (up to 14 images)"New value: +"Paths to reference images for style/character\nconsistency (up to 14 images on gemini-nano-banana-2.1\nand gemini-3.1-flash-image; 6 on gemini-3-pro-image)"
  2. First observedv0.5.4

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden, yet it mentions nothing about cost, latency, file writes to disk, safety filtering, or model-specific limits. For a generative tool with 13 parameters and real side effects, this is a significant omission.

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?

One sentence, front-loaded, zero waste. It is efficient, though its brevity is partly under-specification rather than disciplined concision given the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 13 parameters, an output schema, no annotations, and a crowded sibling set, a single sentence is not enough. It should have flagged cost implications, output location/file writing, and how text-to-image differs from the editing siblings.

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

Parameters3/5

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

Schema description coverage is 100%, with rich per-parameter docs covering model tiers, quality presets, image_size constraints, reference image counts, and the person_generation compatibility note. The description adds nothing beyond the schema, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear verb ('Generate') plus resource ('an image') and names the underlying engine (Google Gemini). An agent can distinguish it from edit_image or transform_image by the 'from a text prompt' framing, though the differentiation is implicit rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this versus the 17 siblings, notably edit_image, transform_image, batch_generate, or estimate_cost. An agent must infer the boundary between text-to-image generation and image-to-image editing from names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.