Skip to main content
Glama

generate_image

Generate an image from a text prompt and save it to disk, returning the file path for further use.

Instructions

Generate an image from a text prompt. Saves to disk and returns the file path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoOutput resolution
modelNoGemini image model id (default: gemini-3.1-flash-image)
promptYesImage description
filenameNoBase filename without extension
groundingNoGround with Google Search for factual accuracy
outputDirNoSave directory (default: ./nano-banana)
aspectRatioNoe.g. 1:1, 16:9, 9:16, 21:9, up to 1:4 or 8:1
thinkingLevelNoModel reasoning effort; high helps complex or text-heavy images
Behavior3/5

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

With no annotations, the description must disclose behaviors, and it does mention saving to disk and returning a file path, which is a key side effect. Yet it omits other important behaviors such as overwrite behavior, permissions, or error handling, leaving gaps in transparency.

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?

The description is two sentences, concise, and front-loaded with the core purpose and return value. It contains no unnecessary words and is well-structured.

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 tool with 8 parameters and no annotations or output schema, the description covers the essential flow: generate, save to disk, and return the file path. It does not provide guidance on model/size selection or potential edge cases, but it is adequate for the tool's simplicity.

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?

The schema provides descriptions for all 8 parameters, so the baseline is 3. The tool description does not add additional meaning beyond the schema's parameter details, so it remains at the baseline.

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 it generates an image from a text prompt, which is a specific verb+resource combination. It distinguishes from sibling tools edit_image and list_models by focusing on creation from text.

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 provides clear context that this tool is for generating new images from text. However, it does not explicitly state when not to use it or mention alternatives like edit_image for existing images, so it lacks explicit exclusions.

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/getjoystick/nanobanana-mcp'

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