Skip to main content
Glama
Nano-Banana MCP Server

Nano-Banana MCP Server

by fjacquet

edit_image

Modify an existing image using a prompt and exact file path, with optional reference images for style transfer or added elements. Apply edits like object changes, style adjustments, or retouching.

Instructions

Edit a SPECIFIC existing image file, optionally using additional reference images. Use this when you have the exact file path of an image to modify.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "imagePath": "<imagePath>",
      "prompt": "<prompt>"
    },
    "name": "edit_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoModel to use. "gemini-nano-banana-2.1" (default, Nano Banana 2.1 — pro quality at Flash speed), "gemini-3.1-flash-image" (Nano Banana 2, previous default), "gemini-3.1-flash-lite-image" (Nano Banana 2 Lite — fastest and cheapest, 1K output only), "gemini-2.5-flash-image" (legacy fast), or "gemini-3-pro-image" (Nano Banana Pro, highest quality)
presetNoShape by use: "web" (16:9 landscape), "phone" (9:16 portrait), "webconf" (16:9 video-call background for Zoom/Teams), "banner" (4:1 wide strip, e.g. LinkedIn banner), "square" (1:1). Overridden by aspectRatio when both are given. Size is set with imageSize.
promptYesText describing the modifications to make to the existing image
imagePathYesFull file path to the main image file to edit
imageSizeNoResolution of the output image. Default: "1K". Use "2K" or "4K" for high-resolution output. "512px" works only on "gemini-3.1-flash-image".
aspectRatioNoAspect ratio of the output image. Omit to let the model choose: new images usually come out landscape (about 16:9) and edits keep the source image's shape. Pass "1:1" for a square image.
thinkingLevelNoHow much the model reasons before drawing. "minimal" is fastest and cheapest; "high" is best for complex prompts (infographics, text in images, several consistent characters). Default: the model's own ("medium" on "gemini-nano-banana-2.1"). "gemini-3.1-flash-image" and "gemini-3.1-flash-lite-image" accept only "minimal" or "high"; "gemini-2.5-flash-image" does not support thinking levels.
referenceImagesNoOptional array of file paths to additional reference images to use during editing (e.g., for style transfer, adding elements, etc.)
useGoogleSearchNoEnable Google Search grounding for fact-aware image generation. Not supported on "gemini-3.1-flash-lite-image".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.3.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it discloses almost nothing. For an editing operation it never says whether the source file is overwritten or a new file/asset is produced, where the result is written, whether the operation costs money, or whether it can be undone. 'Optionally using additional reference images' is the only added detail.

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?

Two tight sentences with the scoping condition front-loaded and no filler. It is efficient, though the efficiency comes at the cost of the behavioral detail the tool actually needs.

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?

This is a complex 9-parameter mutation tool with five enums and no output schema, and the description omits the things an agent most needs: where the edited image lands, whether the original is preserved, and how it relates to continue_editing. Given the tool's complexity, two sentences are not enough.

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% across all 9 parameters, with enums documenting model, preset, imageSize, aspectRatio, and thinkingLevel in detail. The description adds only the existence of reference images, so the baseline 3 applies — the schema is doing the parameter work.

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?

Specific verb+resource: 'Edit a SPECIFIC existing image file' with the capitalization emphasizing the exact-file targeting. 'Existing' implicitly sets it apart from generate_image, but no sibling is named, so the distinction with continue_editing must be inferred.

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?

Provides a clear selection condition: 'Use this when you have the exact file path of an image to modify.' That tells an agent when to reach for this rather than a from-scratch generator. No explicit exclusions or named alternatives, so it stops short of a 5.

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