Skip to main content
Glama
mnthe
by mnthe

generate_image

Generate images from text descriptions using Gemini models. Configure size, aspect ratio, and include reference images for custom results.

Instructions

Generate images using Gemini's native image generation (Nano Banana). Supports gemini-3-pro-image, gemini-3.1-flash-image, gemini-3.1-flash-lite-image, and gemini-2.5-flash-image models. gemini-3.1-flash-lite-image (Nano Banana 2 Lite) is the fast, low-cost GA tier: 1K output only, standard aspect ratios (no 1:4/1:8/4:1/8:1), no thinkingLevel, up to 14 reference images. gemini-3.1-flash-image is required for 0.5K and 1:4/1:8/4:1/8:1 ratios. gemini-2.5-flash-image (legacy, retires 2026-10-02) supports at most 3 reference images and does not support imageSize. Reference images use imagePaths and must be PNG (.png), JPEG (.jpg/.jpeg), WEBP (.webp), HEIC (.heic), HEIF (.heif). Audio and video reference files are not accepted by generate_image. Images are saved to /root/Pictures/gemini-generated and returned as base64.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoImage model (default: gemini-3-pro-image). gemini-3.1-flash-lite-image = fast/low-cost GA tier (1K only, no thinkingLevel, no 1:4/1:8/4:1/8:1 ratios). gemini-2.5-flash-image = legacy (at most 3 reference images, no imageSize, retires 2026-10-02) — prefer gemini-3.1-flash-lite-image.
promptYesImage generation prompt
imageSizeNoResolution (0.5K requires gemini-3.1-flash-image; gemini-3.1-flash-lite-image supports 1K only; default: 1K)
imagePathsNoLocal file paths of reference images to include as input (max 14; gemini-2.5-flash-image supports at most 3). Supported file types: PNG (.png), JPEG (.jpg/.jpeg), WEBP (.webp), HEIC (.heic), HEIF (.heif). Audio/video files are not accepted.
aspectRatioNoAspect ratio (default: 1:1; 1:4, 1:8, 4:1, and 8:1 require gemini-3.1-flash-image)
thinkingLevelNoOptional thinking level; only supported by gemini-3.1-flash-image
mediaResolutionNoOptional media resolution for reference image inputs
systemInstructionNoOptional system instruction for Gemini 3 image models
Behavior4/5

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

Discloses behavioral traits: supported models, constraints per model (e.g., max reference images, supported resolutions/aspect ratios), file types, output location, and base64 return. Lacks info on auth, rate limits, but is sufficient.

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?

Information is well-structured and front-loaded. Slightly long but every sentence adds value. Could be trimmed slightly without loss of clarity.

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

Completeness4/5

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

For a complex tool with 8 parameters and no output schema, description covers model differences, constraints, output location, and return format. Lacks error handling details but is complete enough.

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%, and description adds extra context (e.g., model tiers, limitations, supported file types) that goes beyond schema descriptions, enriching parameter meaning.

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?

Clearly states 'Generate images using Gemini's native image generation' and lists specific models. Distinguishes from sibling tools like generate_speech and generate_video by focusing on image generation.

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?

Provides detailed guidance on which model to use for specific needs (e.g., fast/low-cost tier, required model for certain resolutions/aspect ratios). However, does not explicitly compare against sibling tools like generate_video, but context makes it clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mnthe/gemini-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server