Skip to main content
Glama
mikeroussell

Nano Banana MCP Server

by mikeroussell

Edit Image with Nano Banana

nanobanana_edit_image
Read-only

Edit images by describing changes with text prompts. Add, remove, or modify elements, adjust styles, lighting, colors, composition, and apply effects while maintaining the original image's context.

Instructions

Edit an existing image using text prompts with Google's Nano Banana models.

Provide an image and describe your desired changes. The model will:

  • Add, remove, or modify elements

  • Change style, lighting, or colors

  • Adjust composition

  • Apply filters or effects

The model maintains the original image's style and context while applying changes.

Args:

  • prompt (string, required): Description of the edit to make

  • image_base64 (string, required): Base64-encoded image data (no data URI prefix)

  • image_mime_type (string, required): MIME type of the image (e.g., 'image/png', 'image/jpeg')

  • model (string): Model to use. Default: Nano Banana Pro

  • aspect_ratio (string): Output aspect ratio. Options: 1:1, 2:3, 3:2, etc.

  • resolution (string): Output resolution (Pro only). Options: 1K, 2K, 4K

Returns:

  • success (boolean): Whether editing succeeded

  • imageData (string): Base64-encoded edited image

  • mimeType (string): Image MIME type

  • text (string): Any accompanying text from the model

  • error (string): Error message if editing failed

Examples:

  • "Add a small wizard hat on the cat's head"

  • "Change the background to a sunset beach"

  • "Make this image look like a Van Gogh painting"

  • "Remove the person in the background"

Error Handling:

  • Returns error if image data is invalid

  • Returns error if MIME type is unsupported

  • Returns error if content policy violated

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesText description of the edit to make. Describe what to add, remove, or modify. Be specific about the desired changes.
image_base64YesBase64-encoded image data to edit. Do not include data URI prefix.
image_mime_typeYesMIME type of the image. Supported: image/png, image/jpeg, image/jpg, image/gif, image/webp
modelNoModel to use. 'gemini-3-pro-image-preview' (Nano Banana Pro) for best quality and features, 'gemini-2.5-flash-image' (Nano Banana) for faster generation. Default: Nano Banana Progemini-3-pro-image-preview
aspect_ratioNoAspect ratio of the generated image. Options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9. Default: varies by prompt
resolutionNoResolution of the generated image (Nano Banana Pro only). Options: 1K, 2K, 4K. Note: Must use uppercase 'K'. Default: 1K
Behavior4/5

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

The description adds valuable behavioral context beyond what annotations provide. While annotations indicate read-only and non-destructive operations, the description elaborates on what the model actually does (add/remove/modify elements, change style/lighting/colors, adjust composition, apply filters), maintains original style/context, and includes error handling details. This provides practical behavioral insight that annotations alone don't convey.

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-structured with clear sections (purpose, capabilities, args, returns, examples, error handling) and front-loads the core functionality. While comprehensive, some sections like the detailed parameter documentation could be more concise given the schema already covers them thoroughly. Most sentences earn their place by adding value.

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 editing with AI models), the description provides excellent contextual completeness. It covers purpose, capabilities, parameters, return values, examples, and error handling. While there's no output schema, the 'Returns' section thoroughly documents the response structure. The combination of rich description and comprehensive annotations makes this highly complete.

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?

With 100% schema description coverage, the schema already thoroughly documents all parameters. The description's 'Args' section essentially repeats what's in the schema without adding significant additional semantic context. The baseline score of 3 is appropriate since the schema does the heavy lifting, though the description provides some clarification about default values and model capabilities.

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 tool's purpose with specific verb ('Edit') and resource ('an existing image'), and distinguishes it from siblings by specifying it's for editing existing images (vs. generating new ones with nanobanana_generate_image or composing multiple images with nanobanana_compose_images). The opening sentence establishes this distinction immediately.

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 clear context for when to use this tool ('Edit an existing image using text prompts') and includes examples that illustrate appropriate use cases. However, it doesn't explicitly state when NOT to use it or mention specific alternatives among the sibling tools, which prevents a perfect score.

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/mikeroussell/nano-banana-mcp'

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