Skip to main content
Glama

edit_image

Edit or iterate on images using follow-up prompts or reference images for virtual try-on, product placement, style transfer, and compositing.

Instructions

Edit or iterate on an image with a follow-up prompt. Pass previous_interaction_id from a prior generate_image/edit_image call for conversational multi-turn editing (recommended way to iterate). Or pass reference_images from disk (up to 14) for: virtual try-on, product placement in scenes, combining/compositing images, style transfer, photo restoration, attribute replacement (colors/materials), 2D-to-3D mockups. Returns a new interaction_id for further iteration. Prompt tip: describe subject + setting + lighting + camera/lens + mood in full sentences; narrative beats keyword soup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNo1K
modelNonano=1K fast, flash=default/4K, pro=professional/4K/thinkingflash
ratioNoAspect ratio for the output1:1
outputYesOutput file path; extension picks the format (.png or .jpg; jpg needs flash/pro)
promptYesEdit instruction, e.g. 'Change the background to sunset, keep everything else identical'
previewNoReturn a small preview image
use_searchNoGround the edit with Google Search
show_thinkingNoInclude thought summaries (pro)
reference_imagesNoPaths to reference images on disk (max 14; flash: 10 object + 4 character, pro: 6 + 5)
previous_interaction_idNoID from a previous generate_image/edit_image call to continue from
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 behavioral traits: returns a new interaction_id for iteration, limits for reference_images (up to 14, with model-specific constraints), and that the output format is determined by file extension. It does not mention destructive behavior but editing images typically implies modification.

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 moderately concise and well-structured. It front-loads the core purpose, then explains two distinct usage modes, and ends with a prompt tip. Every sentence adds value, though it could be slightly tighter.

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?

Given 10 parameters and no output schema, the description covers key behaviors: iteration flow, reference image limits, and prompt style. It could mention that output size defaults to 1K and model defaults to flash, but these are in the schema. Overall, it provides sufficient context for an agent to use the tool effectively.

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 90%, so baseline is 3. The description adds meaning beyond schema by explaining the recommended workflow (previous_interaction_id) and specific use cases for reference_images. It also provides a prompt tip that enhances understanding of how to craft effective prompts.

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 starts with 'Edit or iterate on an image with a follow-up prompt,' clearly stating the core function. It distinguishes from siblings like generate_image (which likely generates from scratch) by emphasizing iterative editing and providing specific use cases like virtual try-on and product placement.

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 explicit guidance on when to use each mode: use previous_interaction_id for multi-turn editing (recommended) or reference_images for specific tasks. It also includes a prompt tip. However, it does not explicitly state when not to use this tool versus 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