Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GEMINI_API_KEYYesYour Google Gemini API key from Google AI Studio

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
gemini_generate_imageB

Generate an image from a text prompt using the Google Gemini Nano Banana image generation model.

Args:

  • prompt (string, required): A detailed description of the image to generate.

  • aspect_ratio (string, optional): Aspect ratio for the output image. Supported: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9

  • model (string, optional): Gemini model ID to use. Defaults to "gemini-3.1-flash-image-preview".

  • output_path (string, optional): File path to save the generated image.

Returns:

  • The generated image as an embedded image block (and optionally saved to disk).

  • Any text the model returns alongside the image.

Examples:

  • "A photorealistic golden retriever surfing a wave at sunset"

  • "An isometric pixel-art castle on a floating island"

gemini_edit_imageA

Edit or transform one or more images using a text instruction, powered by the Google Gemini Nano Banana image model.

Supports single or multiple input images. Provide file paths and/or base64-encoded image data along with a text instruction.

Args:

  • prompt (string, required): A text instruction describing the edit (e.g. "Remove the background", "Combine these two images").

  • image_paths (string, optional): Comma-separated list of file paths to input images on disk. Example: "/path/to/img1.png,/path/to/img2.jpg"

  • image_base64_list (string, optional): JSON array of objects with "data" and "mimeType" fields for base64-encoded images. Example: [{"data":"base64...","mimeType":"image/png"}]

  • aspect_ratio (string, optional): Aspect ratio for the output image. Supported: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9

  • model (string, optional): Gemini model ID. Defaults to "gemini-3.1-flash-image-preview".

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

Returns:

  • The edited image as an embedded image block (and optionally saved to disk).

  • Any text the model returns alongside the image.

Examples:

  • prompt: "Change the car color to red" with one image

  • prompt: "Combine these two photos into a collage" with two images

  • prompt: "Apply the style of the first image to the second image" with two images

gemini_upload_imageA

Upload one or more images to the Gemini Files API and return their file URIs.

Use this to pre-upload reference images before calling gemini_batch_submit. Uploaded files persist for 48 hours on Google's servers. Pass the returned URIs to batch_submit via the file_uris field to avoid slow base64 encoding.

Args:

  • image_paths (string, required): Comma-separated list of local file paths to upload. Example: "/path/to/ref1.jpg,/path/to/ref2.png"

Returns:

  • A list of file URIs (e.g. "files/abc123") mapped to each input path.

gemini_batch_submitA

Submit a batch of image generation requests to the Gemini API at 50% reduced cost.

Builds a JSONL file, uploads it to the Gemini Files API, and submits a batch job. The job processes asynchronously (usually completes within minutes). Returns the batch ID — the caller is responsible for tracking it (e.g. in Supabase).

Args:

  • requests (string, required): JSON array of request objects. Each object must have:

    • key (string): Unique identifier for this request (used as output filename)

    • prompt (string): The image generation prompt

    • aspect_ratio (string, optional): Aspect ratio for this image

    • image_paths (string, optional): Comma-separated input image paths for editing (slow — base64 encodes each) Example: [{"key":"sunset-cat","prompt":"A cat watching a sunset","aspect_ratio":"16:9"}]

  • file_uris (string, optional): Comma-separated Gemini Files API URIs of pre-uploaded reference images (e.g. "files/abc123,files/def456"). These are shared across ALL requests in the batch. Use gemini_upload_image first to get URIs. Much faster than image_paths for large batches.

  • model (string, optional): Gemini model ID. Defaults to "gemini-3.1-flash-image-preview".

  • image_size (string, optional): Output image resolution. Values: "1K" (1024px), "2K" (2048px), "4K" (4096px). Defaults to "2K".

  • display_name (string, optional): Human-readable name for the batch job.

Returns:

  • The batch name/ID, request count, and model used.

gemini_batch_statusA

Check the status of a batch image generation job.

Args:

  • batch_name (string, required): The batch ID to check (e.g. "batches/abc123").

Returns:

  • state: BATCH_STATE_PENDING, BATCH_STATE_RUNNING, BATCH_STATE_SUCCEEDED, BATCH_STATE_FAILED, etc.

  • output_file: The Gemini Files API reference for downloading results (when succeeded).

  • stats: Request count and success count.

  • Timing: create time, end time.

gemini_batch_resultsA

Download and save images from a completed batch job.

Checks the batch status, retrieves the output JSONL from Gemini, decodes each image, and saves them to the specified output directory using the key as the filename.

Args:

  • batch_name (string, required): The batch ID (e.g. "batches/abc123").

  • output_dir (string, required): Directory where images will be saved.

Returns:

  • List of saved image paths (key → file path) and any errors.

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/slackermafia/NanoBanana-MCP-Server'

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