Skip to main content
Glama

generate_image

Generate and save images at exact pixel sizes using Google Flow's Nano Banana model, with support for multiple variants, formats, and reference images for iterative editing.

Instructions

Generate one or more images with Google Flow and save them to disk. You can ask for an exact pixel size (e.g. 1200x630): it generates at the closest native aspect ratio and crops to the size you asked for. Images cost no credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fitNoHow to fit into `size`: "cover" crops to fill, "contain" fits everything and pads the edges.cover
sizeNoExact output size, "WIDTHxHEIGHT" format, e.g. "1200x630". Omit to use the native size.
countNoHow many variants to generate (1 to 4).
aspectNoNative aspect ratio. If omitted and `size` is given, the closest one is chosen.
formatNoOutput format.jpg
promptYesImage description. In any language.
out_dirNoDestination folder. Defaults to FLOW_OUTPUT_DIR.
basenameNoBase filename. Derived from the prompt by default.
backgroundNoPadding color for fit="contain", as a CSS color ("#0f172a", "black"). White by default.
reference_imagesNoLocal paths to images to use as references. Flow starts from them instead of from scratch, so the prompt describes what to change rather than what to create. Useful for versioning a logo, iterating on a previous result, or holding a style across pieces.
reference_library_namesNoFilenames ALREADY in the project library, to attach without uploading them again. Use this when iterating on the same reference: re-uploading the same file only leaves duplicate rows in the library and makes each generation slower.
Install Server

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It discloses two genuinely non-obvious traits: the closest-native-aspect-ratio-and-crop behavior for exact sizes, and the zero-credit cost. However, it reveals no side effects such as where files land, how long generation may block, or what the invocation returns.

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?

Three sentences, each earning its place: the main verb and outcome, the size/cropping behavior, and the cost call. The size example is front-loaded as the most decision-relevant detail. There is no redundancy or filler.

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?

An 11-parameter tool with no output schema and no annotations needs more than this. The description covers only purpose and size behavior; it says nothing about count variants, reference-based iteration workflows, output format, the destination folder default, or what the tool returns after saving files. These are meaningful gaps for an agent planning a real task.

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 coverage is 100%, so the baseline is 3. The description does add a unifying model of how size, aspect, and fit interact (generate at the closest native AR, then crop), which goes slightly beyond restating individual fields, but most parameter meaning is already fully captured in the schema itself.

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?

Opens with a specific verb and resource, 'Generate one or more images with Google Flow and save them to disk', which clearly states the core action and output. It implicitly contrasts with flow_status and download_image, but it does not disambiguate from the closely named sibling generate_batch.

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?

The description offers no explicit when-to-use guidance and names no alternatives. The 'costs no credits' note is a useful decision signal, and the size/crop behavior aids usage, but nothing tells an agent when to choose this over generate_batch or download_image.

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

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

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