Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GEMINI_API_KEYYesYour Google AI API key from Google AI Studio (https://aistudio.google.com/apikey)

Tools

Functions exposed to the LLM to take actions

NameDescription
nanobanana_generate_image

Generate high-quality images from text descriptions using Google's Nano Banana models.

This tool creates images from natural language prompts. For best results, be descriptive about:

  • Subject and composition

  • Style (photorealistic, illustration, painting, etc.)

  • Lighting and atmosphere

  • Colors and mood

  • Camera angle and lens (for photorealistic images)

Args:

  • prompt (string, required): Text description of the image to generate

  • model (string): Model to use. Options:

    • 'gemini-3-pro-image-preview' (Nano Banana Pro) - Best quality, 4K, text rendering

    • 'gemini-2.5-flash-image' (Nano Banana) - Fast generation Default: Nano Banana Pro

  • aspect_ratio (string): Image aspect ratio. Options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9

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

  • use_google_search (boolean): Enable real-time information grounding (Pro only)

Returns:

  • success (boolean): Whether generation succeeded

  • imageData (string): Base64-encoded image data

  • mimeType (string): Image MIME type (usually image/png)

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

  • error (string): Error message if generation failed

Examples:

  • "A photorealistic portrait of an astronaut on Mars at sunset"

  • "Kawaii-style sticker of a happy corgi with a transparent background"

  • "Minimalist logo for 'TechStart' in blue and white, modern sans-serif font"

Error Handling:

  • Returns error if GEMINI_API_KEY is not set

  • Returns error if API rate limit exceeded (try again later)

  • Returns error if content policy violated

nanobanana_edit_image

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

nanobanana_compose_images

Compose new images using multiple reference images with Nano Banana Pro.

Use up to 14 reference images to:

  • Create group compositions

  • Transfer styles between images

  • Maintain character consistency across scenes

  • Combine objects from different images

Limits:

  • Up to 6 images of objects for high-fidelity inclusion

  • Up to 5 images of humans for character consistency

  • Total maximum: 14 images

Args:

  • prompt (string, required): Description of how to compose the images

  • images (array, required): Array of image objects with:

    • base64 (string): Base64-encoded image data

    • mime_type (string): Image MIME type

  • model (string): Must be Nano Banana Pro (gemini-3-pro-image-preview)

  • aspect_ratio (string): Output aspect ratio

  • resolution (string): Output resolution (1K, 2K, 4K)

Returns:

  • success (boolean): Whether composition succeeded

  • imageData (string): Base64-encoded composed image

  • mimeType (string): Image MIME type

  • text (string): Any accompanying text

  • error (string): Error message if failed

Examples:

  • "Create a group photo of these 5 people at a beach"

  • "Apply the style of the first image to the subject in the second"

  • "Combine these product images into a catalog layout"

nanobanana_list_models

List available Nano Banana image generation models and their capabilities.

Returns information about:

  • Model IDs for API calls

  • Model names and descriptions

  • Features and capabilities

  • Maximum resolution supported

Args:

  • response_format (string): Output format. Options: 'markdown' (default), 'json'

Returns:

  • models: Array of model information objects with id, name, description, features, maxResolution

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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