Skip to main content
Glama

generate_image

Generate images from text prompts using Gemini models. Supports aspect ratios, resolutions up to 4K, and optional search grounding for real-time data.

Instructions

Generate a single image with Nano Banana (Gemini image models). Models: nano=fast/1K, flash=best all-around/up to 4K (default), pro=professional/4K/thinking/grounding. Use cases: illustrations, product photography, logos, posters, photorealistic scenes, stickers, mockups. Output format follows the file extension: .png (default) or .jpg (flash/pro only — nano always returns PNG). Set use_search to ground in real-time data (weather, news, scores). Returns interaction_id — pass it to edit_image to iterate. Prompt tip: describe subject + setting + lighting + camera/lens + mood in full sentences; narrative beats keyword soup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoOutput resolution; 0.5K flash only1K
modelNonano=1K fast, flash=default/4K, pro=professional/4K/thinkingflash
ratioNoAspect ratio, e.g. 16:9, 1:1, 9:16, 4:3; 21:9/1:4/4:1/1:8/8:1 flash only1:1
outputYesOutput file path; extension picks the format (.png or .jpg; jpg needs flash/pro), e.g. generated/hero.jpg
promptYesImage generation prompt
previewNoReturn a small preview image so the client can see the result
use_searchNoGround with Google Search for real-time info (flash/pro)
show_thinkingNoInclude the model's thought summaries in the response (pro)
use_image_searchNoAlso ground with Google Image Search as visual context (flash only)
Behavior4/5

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

With no annotations, the description carries full burden. It discloses model behavior differences, output format dependency on file extension, interaction_id for iteration, and search grounding. It does not cover failure modes or authentication, but key behavioral aspects are covered.

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?

Description is front-loaded with purpose and model overview. It uses bullet-like sentences for clarity. Some redundancy (e.g., repeating model capabilities in both first sentence and parameter list) could be trimmed, but overall efficient for the amount of information.

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

Completeness3/5

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

Covers models, output, search, and preview. However, no output schema exists, and the description does not detail the full return value (e.g., whether image is returned as URL or base64, or the structure of interaction_id). The preview parameter is mentioned but response format incomplete.

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%, giving baseline 3. The description adds value by explaining model nuances (nano=fast/1K, flash=best/4K, pro=professional/thinking), output format selection via extension, and search capability. Prompt tips further enhance parameter understanding beyond schema.

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 'Generate a single image' with specific model names (Nano Banana) and explicitly lists use cases (illustrations, product photography, etc.). It differentiates this tool from siblings like edit_image and generate_icon_set by focusing on single 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 explicit guidance on when to use each model (nano for fast, flash for best all-around, pro for professional) and when to enable search. However, it does not explicitly state when not to use this tool (e.g., for generating multiple images at once), though sibling names imply alternatives.

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

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