Skip to main content
Glama

gemini_generate_image

Generate or edit images using natural language prompts. Provide optional images for editing and conversation IDs for iterative refinement.

Instructions

Generate or edit images with Gemini.

Without files: generates a new image from the text prompt. With files: edits/transforms the provided image(s) based on the prompt.

Pass conversation_id from a previous call to continue refining images in the same conversation thread (e.g. "make it more dramatic", "add rain"). You can also use a cid from the Gemini web URL (gemini.google.com/app/{cid}).

Images are saved to ~/Pictures/gemini/ and full file paths are returned.

Args: prompt: Description of the image to generate, or editing instruction (e.g. 'change the background to blue', 'make it a cartoon'). model: Model name. Defaults to gemini-3.0-flash-thinking (Nano Banana 2, supports non-square aspect ratios). files: Optional list of file paths to images to edit/transform. conversation_id: Optional list of [cid, rid, rcid] from a previous gemini_generate_image response to continue the conversation. Passing just [cid] (from browser URL) also works.

Returns: JSON with generated image paths, conversation_id for continuation, or an error message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
modelNo
filesNo
conversation_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Discloses that images are saved to ~/Pictures/gemini/ and full paths are returned. Explains conversation continuation behavior. Annotations (readOnlyHint=false, destructiveHint=false) are not contradicted; description adds meaningful context beyond annotations.

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?

Well-structured with clear sections for modes, args, and returns. Every sentence adds value; no redundancy. Concise yet comprehensive.

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

Completeness5/5

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

Given the tool's complexity (image generation, editing, conversation history) and the presence of an output schema, the description covers all necessary aspects: mode selection, parameter usage, file saving, and return format. An agent can effectively invoke the tool based on this description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description provides detailed explanations for all parameters: prompt (generation vs editing), model (name, default, aspect ratio hint), files (optional paths), and conversation_id (continuation method). Adds significant meaning beyond the 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 or edit images with Gemini' and distinguishes between two modes (without files for new images, with files for editing). It uniquely identifies the tool's purpose among siblings, which are chat/analyze/upload/reset tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly guides when to use without files (new image) and with files (edit/transform). Also provides instructions for using conversation_id to continue refinement, and mentions model defaults. No direct alternatives exist among siblings, so this is sufficient.

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/AndyShaman/gemini-webapi-mcp'

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