Skip to main content
Glama
s4shibam

Image Gen MCP

by s4shibam

generate_image_gemini

Batch-generate Google Gemini images from text prompts and save them to an absolute directory for use in websites or apps.

Instructions

Generate one or more images with Google Gemini (Nano Banana) via the Interactions API and save them to disk.

Use this when the user (or your plan) needs Gemini-generated assets for a website or app. Pass the Gemini image model id (e.g. gemini-3.1-flash-image, gemini-3-pro-image, gemini-2.5-flash-image), a list of prompt + filename pairs, the required absolute_output_directory, and optional response_format settings: aspect_ratio, image_size, mime_type.

Notes:

  • aspect_ratio: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, 1:8, 8:1, 1:4, 4:1.

  • image_size: 512, 1K, 2K, or 4K (uppercase K required).

  • mime_type: currently only image/jpeg is supported.

Images are written only to absolute_output_directory. It must be an absolute path; relative paths are rejected. Each file is named: {filename}-gemini-{model}-{timestamp}.{ext}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesGemini image model id, e.g. gemini-3.1-flash-image, gemini-3-pro-image, gemini-2.5-flash-image, nano-banana-pro-preview.
imagesYesList of images to generate (prompt + filename)
mime_typeNoOutput MIME type. Currently only "image/jpeg" is supported.
image_sizeNoImage resolution. One of "512", "1K", "2K", "4K" (uppercase K required).
aspect_ratioNoAspect ratio of the generated image. One of 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, 1:8, 8:1, 1:4, 4:1.
absolute_output_directoryYesRequired absolute directory path where generated images will be saved. Relative paths are rejected.
Behavior4/5

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

No annotations are provided, so the description carries the behavioral disclosure burden. It effectively discloses key behaviors: images are written only to the specified absolute_output_directory, relative paths are rejected, the file naming convention ({filename}-gemini-{model}-{timestamp}.{ext}) is documented, and the mime_type constraint (only image/jpeg) is surfaced. It does not disclose potential side effects like file overwrites or API cost implications, but the core behavioral contract is well-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?

The description is well-organized with a clear opening sentence followed by a requirements list and a notes section for format options. It front-loads the purpose and requirements. The notes on aspect_ratio, image_size, and mime_type are useful but partly redundant with the schema enums, though they add the uppercase-K requirement which the schema also mentions. This is a compact, scannable structure, though the inline enumeration is slightly repetitive with the schema.

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 6 parameters (3 optional with enums), no output schema, and no annotations, the description does substantial work. It documents the file naming convention, the absolute-path requirement, the model variants, and all format constraints. The main gap is that it doesn't describe the return value/behavior after generation (e.g., does it return paths, a count, errors?), which could matter for an agent chaining subsequent steps. Overall this is quite complete for the tool's complexity.

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%, so the baseline is 3. The description adds value beyond the schema by enumerating all allowed aspect ratios inline, clarifying the uppercase-K requirement for image_size (which is a common failure point), and explicitly stating that only image/jpeg is supported. It also documents the filename suffix convention which maps to the 'filename' parameter semantics, adding meaning beyond the schema's 'Base filename without extension.'

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 verb+resource ('Generate one or more images with Google Gemini (Nano Banana) via the Interactions API and save them to disk'). It explicitly distinguishes from the sibling tool by naming the provider (Google Gemini vs OpenAI) and the model family (Nano Banana), which separates it from generate_image_openai. The mention of 'Interactions API' and 'Nano Banana' adds specific identifying context.

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 first sentence provides a clear use case: 'when the user (or your plan) needs Gemini-generated assets for a website or app.' This establishes when to use it. It doesn't explicitly exclude OpenAI/alternatives, though the image model id examples and 'Gemini' naming imply the sibling tool handles other providers. It clearly states requirements (model id, prompt+filename pairs, required absolute_output_directory) which helps the agent assemble correct calls.

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/s4shibam/image-gen-mcp'

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