Skip to main content
Glama

nanobanana-mcp-server

by zhongweili

generate_image

Create new images or modify existing ones using natural language instructions. Supports generating from prompts, editing local images, or combining multiple images with AI-powered image generation.

Instructions

Generate new images or edit existing images using natural language instructions.

Supports multiple input modes:

  1. Pure generation: Just provide a prompt to create new images

  2. Multi-image conditioning: Provide up to 3 input images using input_image_path_1/2/3 parameters

  3. File ID editing: Edit previously uploaded images using Files API ID

  4. File path editing: Edit local images by providing single input image path

Automatically detects mode based on parameters or can be explicitly controlled. Input images are read from the local filesystem to avoid massive token usage. Returns both MCP image content blocks and structured JSON with metadata.

Input Schema

NameRequiredDescriptionDefault
file_idNoFiles API file ID to use as input/edit source (e.g., 'files/abc123'). If provided, this takes precedence over input_image_path_* parameters for the primary input.
input_image_path_1NoPath to first input image for composition/conditioning
input_image_path_2NoPath to second input image for composition/conditioning
input_image_path_3NoPath to third input image for composition/conditioning
modeNoOperation mode: 'generate' for new image creation, 'edit' for modifying existing images. Auto-detected based on input parameters if not specified.auto
nNoRequested image count (model may return fewer).
negative_promptNoThings to avoid (style, objects, text).
promptYesClear, detailed image prompt. Include subject, composition, action, location, style, and any text to render. Add 'Square image' or '16:9' in the text to influence aspect ratio.
system_instructionNoOptional system tone/style guidance.

Input Schema (JSON Schema)

{ "properties": { "file_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Files API file ID to use as input/edit source (e.g., 'files/abc123'). If provided, this takes precedence over input_image_path_* parameters for the primary input.", "title": "File Id" }, "input_image_path_1": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to first input image for composition/conditioning", "title": "Input Image Path 1" }, "input_image_path_2": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to second input image for composition/conditioning", "title": "Input Image Path 2" }, "input_image_path_3": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to third input image for composition/conditioning", "title": "Input Image Path 3" }, "mode": { "default": "auto", "description": "Operation mode: 'generate' for new image creation, 'edit' for modifying existing images. Auto-detected based on input parameters if not specified.", "title": "Mode", "type": "string" }, "n": { "default": 1, "description": "Requested image count (model may return fewer).", "maximum": 4, "minimum": 1, "title": "N", "type": "integer" }, "negative_prompt": { "anyOf": [ { "maxLength": 1024, "type": "string" }, { "type": "null" } ], "default": null, "description": "Things to avoid (style, objects, text).", "title": "Negative Prompt" }, "prompt": { "description": "Clear, detailed image prompt. Include subject, composition, action, location, style, and any text to render. Add 'Square image' or '16:9' in the text to influence aspect ratio.", "maxLength": 8192, "minLength": 1, "title": "Prompt", "type": "string" }, "system_instruction": { "anyOf": [ { "maxLength": 512, "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional system tone/style guidance.", "title": "System Instruction" } }, "required": [ "prompt" ], "type": "object" }

Other Tools from nanobanana-mcp-server

Related Tools

    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/zhongweili/nanobanana-mcp-server'

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