Skip to main content
Glama

generate_image

Generate images from text prompts or reference images using Google's Nano Banana AI. Supports up to 14 reference images for editing or combining, with adjustable resolution and aspect ratio.

Instructions

Generate an image using Google Nano Banana (Gemini) AI model. Can generate from text only, or use one or more reference images (up to 14) to guide generation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoModel to use: gemini-2.5-flash-image (fast) or gemini-3-pro-image-preview (high quality, default)gemini-3-pro-image-preview
promptYesText description of the image to generate or instructions for editing/combining reference images
imagePathsNoOptional array of file paths to reference images (up to 14). Supports png, jpg, jpeg, webp, gif.
outputPathNoFile path to save the generated image. If not provided, image data is returned inline.
resolutionNoResolution of the generated image. 512 only on gemini-3.1-flash-image-preview. Nano Banana Pro supports 1K, 2K, 4K.1K
aspectRatioNoAspect ratio of the generated image. Additional ratios (1:4, 4:1, 1:8, 8:1) available on gemini-3.1-flash-image-preview.1:1
outputFormatNoOutput image formatpng
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It discloses the AI model and the capability to accept up to 14 reference images, but doesn't address return behavior or potential pitfalls. The outputPath schema covers the return mechanism, so partial credit is warranted.

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?

Two sentences, front-loaded with the core action and resource. Every word contributes to understanding the tool's purpose and main capabilities.

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?

The description provides a high-level overview of the tool's capability, and the rich schema covers all parameters. Since there is no output schema, the description could mention the inline return behavior, but the outputPath parameter description already covers it. Adequate for a generation tool.

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%, so the schema already documents all parameters. The description only repeats the 'up to 14' reference image limit, which is already in the imagePaths parameter description, adding no new semantic value.

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 clearly states the tool's primary function: generating an image using the Google Nano Banana (Gemini) AI model. It distinguishes from the sibling tool generate_favicons by covering general image generation with text or reference images.

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?

The description explicitly identifies two usage modes: text-only generation and reference-image-guided generation. It does not mention alternatives or exclusions, but the context is clear enough for typical use cases.

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/codeFi/mcp-nano-banana'

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