Skip to main content
Glama
Nanobanana MCP Server
by Porkbutts

Edit Image

nanobanana_edit_image

Edit existing images with natural-language prompts to change colors, add or remove objects, transform styles, or apply effects using Gemini image editing.

Instructions

Edit an existing image using a text prompt with Gemini's image editing capabilities.

This tool modifies images based on natural language instructions. You can:

  • Change colors, objects, or elements

  • Add or remove items from the scene

  • Transform the style or mood

  • Apply effects or filters

Args:

  • prompt (string): Description of the edit to apply

  • image_path (string): File path to the image to edit (PNG, JPEG, WebP, or GIF)

  • model (string): Gemini model to use

  • output_path (string): File path to save the edited image

Returns: JSON with success, saved_to, mime_type, model, text

Examples:

  • "Change the car color from blue to red"

  • "Add a rainbow in the sky"

  • "Remove the person in the background"

  • "Make this photo look like an oil painting"

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": {
      "prompt": "<prompt>",
      "image_path": "<image_path>",
      "output_path": "<output_path>"
    },
    "name": "nanobanana_edit_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoGemini model to use. 'gemini-2.0-flash-exp-image-generation' is optimized for image generation.gemini-2.0-flash-exp-image-generation
promptYesText description of the edit to apply. Be specific about what to change, e.g., 'change the blue car to red' or 'add a sunset in the background'.
image_pathYesFile path to the image to edit. Supports PNG, JPEG, WebP, and GIF formats.
output_pathYesFile path to save the edited image.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=true), so the description's main added value is the return shape (success, saved_to, mime_type, model, text) — useful since there is no output schema — and the accepted input formats. It omits behaviorally relevant facts for a file-writing tool: whether output_path overwrites an existing file, whether the directory must exist, and any auth/API-key or cost considerations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose sentence and examples earn their place and the piece is front-loaded, but the Args section duplicates a schema that is already fully described, and the Returns line overlaps conceptually with what a caller could infer. Roughly a third of the text is redundant given 100% schema coverage.

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

Completeness3/5

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

For a non-idempotent mutation that writes a file, the definition covers what the tool does, formats accepted, and the return payload, which is adequate for a call. It stops short of the details an agent most needs to act safely — overwrite semantics on output_path, path/permission requirements, and what failure looks like — leaving the description adequate but incomplete for a write tool.

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 description coverage is 100%, so the schema already documents all four parameters, including the model enum and its default. The description's Args block largely restates the same information, adding only the parenthetical format list, which the schema also states. The prompt examples do add some practical flavor but not new parameter semantics.

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?

The first sentence states a specific verb (edit) and resource (an existing image) plus the underlying engine, and the bullet list enumerates the classes of edits supported (color/object changes, add/remove, style, effects). It implicitly separates itself from nanobanana_generate_image by scoping to 'an existing image', but never names or contrasts with that sibling explicitly.

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

Usage Guidelines3/5

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

Usage is conveyed only by implication through the 'You can:' bullet list and four illustrative prompts, which show what kinds of requests fit. There is no explicit statement of when to pick this over nanobanana_generate_image (no existing image), no prerequisites, and no exclusions or failure conditions.

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