Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GEMINI_API_KEYYesYour Google Gemini API key
GEMINI_INPUT_DIRNoDirectory to resolve bare input-image filenames against
GEMINI_OUTPUT_DIRNoDefault directory for generated imagescurrent working directory
GEMINI_TIMEOUT_MSNoUpstream request timeout in ms60000
GEMINI_IMAGE_MODELNoOverride the default image modelgemini-3.1-flash-image
GEMINI_HEARTBEAT_MSNoProgress-notification cadence in ms10000
GEMINI_CHAIN_RETRY_MSNoHow long to wait out interactions-store lag when a chained call 404s120000

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
gemini_list_modelsA

List the Gemini image-generation models available to your API key (Nano Banana / Nano Banana Pro family), and the current default model.

gemini_image_generateA

Generate image(s) from a text prompt with a Gemini image model (Nano Banana / Nano Banana Pro). If the result will likely be refined iteratively, prefer gemini_interact (multi-turn) as the entry point.

gemini_image_editA

Edit or compose images: provide one or more input images (paths or base64), plus a text instruction. For a SERIES of successive edits to the same image, prefer gemini_interact (multi-turn) — it keeps edit context and avoids re-processing the full image each round; use gemini_image_edit for one-off edits or composing multiple distinct inputs. Gemini over-preserves the input; there is no edit-strength control — for large structural changes, reroll with a different seed or more forceful wording.

gemini_image_setA

Generate a consistent SET of images: a master image from master_prompt, then one image per scene that references the master so the subject/style stays consistent. Provide scenes (explicit per-image prompts) OR count (variations of the master).

gemini_interactA

Preferred tool for iterative or multi-step refinement of a single image — multi-turn generation/editing via Gemini's Interactions API. To refine, capture the returned interaction id and pass it as previous_interaction_id on the next call — do NOT start a new interaction or re-upload the image for each tweak. continue_last: true chains from this session's most recent interaction without threading the id. If a call times out on the client side, the generation usually still completes: the image plus a <image>.json sidecar recording its interaction id land in the output dir, and continue_last: true still resumes that interaction — check the output dir before re-issuing (a re-issue is a second billable generation). If a chained call 404s, this tool re-anchors itself on the prior output image and re-issues un-chained: success is reported as chain_recovered (the chain was the problem, and you get your image anyway); a second 404 is reported as the interaction id NOT being the cause (check the model id / files uri instead). Output is JPEG.

gemini_video_generateA

Generate a short video via the Gemini omni model (preview): text→video, image→video / reference→video (supply reference image[s]), or edit a prior video (task: "edit" + previous_interaction_id / continue_last). Output is written to disk as MP4 (video has no inline MCP block). Video runs long — use async: true to get a job_id immediately and poll gemini_get_result, or raise timeout_ms. Preview model: needs a funded account.

gemini_music_generateA

Generate music from a text prompt (mood, genre, instruments, structure, or lyrics inline) via a Lyria model (preview): lyria-3-clip-preview (~30s clips, default) or lyria-3-pro-preview (longer, WAV-capable). Written to disk as MP3/WAV (or returned inline). Runs long — use async: true + gemini_get_result, or raise timeout_ms. Preview model: needs a funded account.

gemini_get_resultA

Retrieve an async generation started with async: true. Pass the returned job_id: while running it reports status "running"; on completion it returns the normal result (image paths / inline images + meta); on failure it raises the recorded error. Jobs belong to your session and expire ~10 min after completion — if a job id is unknown, check the output dir / .json sidecar.

gemini_upload_fileA

Upload an image (or video/audio) to the Gemini Files API ONCE and get back a reusable files/<id> reference. Use this instead of pasting base64 into a tool call: the reference is a short string, so no image bytes ever enter the conversation, and it can be reused across many generations until it expires (~48h). Provide exactly one of url (the server downloads it), data_base64, or path (a local file).

gemini_list_filesA

List the files currently uploaded to the Gemini Files API under this API key, with their files/<id> references, MIME types and expiry times. Retention is ~48h, so an entry that has vanished has expired rather than failed.

gemini_delete_fileA

Delete an uploaded file from the Gemini Files API before its ~48h expiry. Any tool call still referencing it will then fail with a generic 404, so delete only references you are finished with.

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/chrischall/gemini-mcp'

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