Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GEMINI_API_KEYNoYour Gemini API key (required for generation with the default provider)
OPENROUTER_API_KEYNoYour OpenRouter key, only read when the provider is `openrouter`
GEMINI_MEDIA_CONFIGNoPath to a TOML file that overrides or adds models and prices
GEMINI_MEDIA_PROVIDERNoProvider to use: `google` or `openrouter`google
GEMINI_MEDIA_LOG_LEVELNoLog level (logs go to stderr)WARNING
GEMINI_MEDIA_STATE_DIRNoCost log and video job list. Defaults to `<output>/.gemini-media`
GEMINI_MEDIA_OUTPUT_DIRNoWhere images, videos and sidecars are written~/gemini-media
GEMINI_MEDIA_ALLOWED_DIRSNoFolders input images may be read from, separated by `:` (`;` on Windows). Must contain the output dir. Defaults to the output dir
GEMINI_MEDIA_DAILY_BUDGETNoMax estimated USD per day (local time)2.00
GEMINI_MEDIA_MAX_INPUT_MBNoMax size per input image7
GEMINI_MEDIA_MONTHLY_BUDGETNoMax estimated USD per calendar month20.00
GEMINI_MEDIA_TIMEOUT_SECONDSNoTimeout per API request180
GEMINI_MEDIA_MAX_COST_PER_CALLNoMax estimated USD per call0.50
GEMINI_MEDIA_DEFAULT_IMAGE_MODELNoDefault for image toolsgemini-nano-banana-2.1
GEMINI_MEDIA_DEFAULT_VIDEO_MODELNoDefault for video toolsgemini-omni-1.1-flash

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Generate and edit images (Nano Banana models) and videos (Gemini Omni Flash) with the Gemini API. Every paid call is checked against cost limits first. Files are written to the configured output directory with a JSON sidecar describing prompt, model and cost. Videos take minutes: start_video returns a job_id (call it once without confirm_cost to see the price), then poll get_video_status. Input images must be inside the allowed directories.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
generate_imageA

Create an image from a text prompt. Costs money; checked against the budget first.

edit_imageB

Edit or combine one or more images according to the prompt.

start_videoA

Start a video generation job and return a job_id immediately (no waiting).

get_video_statusA

Check a video job; when it is done, download the MP4 to the output directory.

list_modelsA

List configured models with estimated prices and supported options.

cost_reportA

Show estimated spend today, this month and in total, plus remaining budgets.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 6 tools

Disambiguation5/5

Each tool targets a distinct action: image creation, image editing, model listing, video job start, video job polling, and budget reporting. The only mild overlap is that list_models shows prices while cost_report shows spend, but their purposes (catalog vs. accounting) are clearly separated.

Naming Consistency4/5

Five of six tools follow a clean verb_noun pattern (generate_image, edit_image, list_models, start_video, get_video_status). cost_report is a noun phrase and breaks the pattern slightly, but the set remains highly readable and predictable.

Tool Count5/5

Six tools is well-scoped for a media generation + budget server, with each tool earning its place. The async video flow is correctly split into start/status rather than bloating the surface.

Completeness4/5

Core lifecycle is covered: model discovery, image create/edit, video start/poll, and cost tracking. Minor gaps exist — no job cancellation, no way to list previously generated assets or inspect a single video job without downloading, and no equivalent edit_video.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues