Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GOOGLE_API_KEYYesYour Google API key for Gemini and Imagen APIs.
GOOGLE_CLOUD_PROJECTNoYour Google Cloud project ID for Vertex AI features (optional).

Instructions

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

PixelForge generates, edits, analyzes and transforms images with Google Gemini image models. Tools write files to the output directory and return their paths; work with the saved paths rather than inline image data.

Tool selection:

  • New image from text: generate_image. quality="fast" for drafts (gemini-3.1-flash-lite-image, 1K only), "balanced" for most work (gemini-nano-banana-2.1, the default), "quality" for text-heavy or brand assets (gemini-3-pro-image at 2K). Set model only when no preset fits; quality and model are mutually exclusive.

  • Change an existing image: transform_image for exact geometry (crop, resize, rotate, flip, blur, sharpen, grayscale, watermark); edit_image for prompt-driven changes; advanced_edit for inpaint_removal, inpaint_insertion, outpaint, background_swap, style_transfer and product_image (optional mask, white = region to change, interpreted semantically); remove_background returns a flat background, never transparency; upscale_image re-renders at the next 1K/2K/4K tier (generative, not pixel-exact; use transform_image resize for exact scaling).

  • Understand an image: analyze_image (custom prompt, optional grounding), extract_text (OCR with confidence), detect_objects (bounding boxes), compare_images (2-10 images). Analysis defaults to gemini-3.5-flash-lite; pass model="gemini-3.8-flash" for hard OCR or reasoning.

  • Plan: optimize_prompt before generating, list_templates and apply_template for curated prompts, estimate_cost before batches, list_available_models for live capabilities and prices, get_server_info for the active backend and setup hints.

Rules that avoid wasted calls:

  • Aspect ratios: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9; the panoramic 1:4, 4:1, 1:8, 8:1 need gemini-nano-banana-2.1 or gemini-3.1-flash-image. image_size: 1K (default), 2K, 4K; 0.5K only on gemini-3.1-flash-image; gemini-3.1-flash-lite-image is 1K only. Unsupported combinations are rejected before any API call.

  • Exact pixel sizes (1200x630 cards, 512 px icons): generate at the nearest ratio, then transform_image crop and resize.

  • Text inside images: write the exact copy first, quote it in the prompt, prefer gemini-3-pro-image, verify with extract_text.

  • Consistent characters: pass the same reference_images on every call and generate sequentially; batch_generate shares one model and ratio and does not preserve identity.

  • Edits: one change per pass, state what must stay the same, verify with compare_images.

  • Cost: every call is billed, including discarded results. Check estimate_cost (1K prices) or list_available_models (per-tier prices) before generating more than a few images.

Credentials: an API key (GOOGLE_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY or GEMINI_API_KEY) selects the Gemini API; GOOGLE_CLOUD_PROJECT with Application Default Credentials selects Vertex AI; the key wins when both are set unless GOOGLE_GENAI_USE_VERTEXAI=true. On "No credentials found", a 403 saying the API is disabled, a 429 with "limit: 0", or a 404 "Publisher model ... not found", call get_server_info and report its setup hint instead of retrying.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

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

Tools

Functions exposed to the LLM to take actions

NameDescription
generate_imageC

Generate an image from a text prompt using Google Gemini.

edit_imageC

Edit an existing image using a text prompt.

remove_backgroundA

Remove the background from an image.

Uses AI to isolate the main subject and remove the background. Best results with clear subjects against distinct backgrounds.

transform_imageC

Transform an image using Pillow operations.

upscale_imageA

Upscale an image to a higher 1K/2K/4K size tier with a Gemini image model.

The source is re-rendered at a higher size tier with an instruction to reproduce it exactly. Fine details can differ from the source; for exact pixel scaling use transform_image(operation="resize").

advanced_editA

Edit an image with a specialized mode using a Gemini image model.

Each mode wraps the prompt in an instruction tuned for that edit. An optional mask (white = region to change) is passed to the model as guidance; the boundary is interpreted semantically, not pixel-exactly.

analyze_imageC

Analyze an image and get a detailed description.

extract_textB

Extract text from an image using OCR.

Uses Gemini's vision capabilities for high-quality text extraction. Works with screenshots, documents, signs, handwriting, etc.

detect_objectsA

Detect objects in an image with bounding boxes.

Uses Gemini's zero-shot object detection. Returns bounding box coordinates normalized to 0-1000 scale as [y_min, x_min, y_max, x_max].

compare_imagesB

Compare two or more images and analyze differences.

Useful for A/B testing, design review, before/after comparison, and change detection.

optimize_promptA

Enhance a basic prompt for dramatically better image results.

Uses AI to add details about lighting, composition, colors, textures, and artistic techniques. The #1 way to improve generation quality.

list_templatesB

List available prompt templates for image generation.

apply_templateC

Apply a prompt template with a subject to generate a ready-to-use prompt.

estimate_costA

Estimate the cost of an image operation.

Shows pricing per model per operation to help with budgeting.

list_historyC

List recent generation history.

get_generation_detailsC

Get details of a specific generation by ID.

batch_generateA

Generate multiple images in parallel from a list of prompts.

list_available_modelsA

List all available image generation models with capabilities.

Returns model details including speed, quality, resolution support, and best use cases. Use this to pick the right model for your task.

get_server_infoA

Get MCP server configuration, capabilities, and available tools.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.2/5.0

Scored across 19 tools

Disambiguation4/5

Most tools have clearly distinct purposes: generate_image vs batch_generate, analyze_image vs detect_objects vs extract_text, and transform_image vs upscale_image are well differentiated. Some mild overlap remains between edit_image and advanced_edit, and between list_available_models and get_server_info, though descriptions provide enough guidance.

Naming Consistency4/5

All tool names use snake_case, which is consistent throughout. Most follow a verb_noun pattern, but a few are adjective/noun-first or otherwise nonstandard, such as advanced_edit and batch_generate, keeping it from being perfectly predictable.

Tool Count4/5

Nineteen tools is slightly above the ideal range, but the server covers a broad image platform spanning generation, editing, analysis, utilities, prompt assistance, cost estimation, and history. The count is defensible overall, though the surface is on the heavy side.

Completeness4/5

The server covers the core image lifecycle well: generation, batching, editing, upscaling, Pillow transforms, background removal, analysis, OCR, object detection, comparison, prompt templates, cost estimation, and history. Minor gaps exist around template/history management, such as no create/delete template or delete history operations.

Maintenance

ActivityMaintained
ResponsivenessLimited data