Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
IMAGE_MODELNoOptional image model to force for this app, overriding the saved default. The value 'latest' is also supported.
OPENAI_API_KEYNoOpenAI API key. Used if no key is stored in the system credential manager.
IMAGE_OUTPUT_DIRNoOptional folder where this app's generated images are saved, instead of the configured default folder.

Instructions

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

Generates and edits images with OpenAI's Image API. Every image is saved to the user's image folder at full resolution; the chat receives a smaller preview plus the saved path. Use quality 'low' for quick drafts. Each call costs the user money, so don't generate more images than asked for.

Revisions: when the user asks to change an image already made or shared in this conversation ("make the cat black", "now add sunglasses"), call edit_image with the saved path of the most recent version and a prompt that states only the change plus what must stay the same. Don't call generate_image again, which draws a new, different image. Each revision is saved as a new numbered version (-v2, -v3, ...); to undo, edit an earlier version's path. Use generate_image only for a new image or when the user asks to start over.

By default the newest image model is used; list_image_models shows what the user's key can use. To change their saved default, the user runs uv run manage.py model <id> themselves.

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

Generates new images from a text prompt and saves them to the user's image folder.

For changes to an image that already exists, use edit_image on its saved path instead;
generating again produces a different image rather than a revision.

Args:
    prompt: What to draw. Be specific about subject, style, composition, and any text to render.
    size: "auto", or WIDTHxHEIGHT such as 1024x1024 (square), 1536x1024 (landscape), or
        1024x1536 (portrait). Edges must be multiples of 16, at most 3840.
    quality: "low" for fast drafts up to "max". "auto" lets the model choose.
    background: "transparent" needs output_format "png" or "webp".
    output_format: File format of the saved image.
    n: Number of images, 1 to 4. Each one is billed.
    model: A model ID for this request only. Leave empty to use the user's default
        (the newest model unless they pinned one). See list_image_models.
    open_after: Open each saved image in the user's default image viewer. Set it when the
        user asks to see or open the result, which helps most in Claude Code, where the chat
        is a terminal that can't display images.
edit_imageA

Revises an existing image, or combines several as references, and saves the result.

This is the tool for follow-up changes ("make it black", "add sunglasses", "remove the
background"): pass the saved path of the latest version from the previous result. The
result is saved as the next numbered version, so earlier versions stay available.

Args:
    prompt: The change to make, and what must stay the same, for example "Make the cat's
        fur black. Keep the pose, background, and lighting unchanged." For several
        references, describe the new image to build from them.
    image_paths: Full paths to one or more local PNG, JPEG, or WebP files. For a revision,
        the single most recent version.
    mask_path: Optional PNG whose transparent areas mark where to edit the first image.
    size: "auto" or WIDTHxHEIGHT, with the same rules as generate_image.
    quality: "low" for fast drafts up to "max".
    background: "transparent" needs output_format "png" or "webp".
    output_format: File format of the saved image.
    n: Number of results, 1 to 4. Each one is billed.
    model: A model ID for this request only. Leave empty to use the user's default.
    open_after: Open each saved image in the user's default image viewer. Set it when the
        user asks to see or open the result, which helps most in Claude Code, where the chat
        is a terminal that can't display images.
    input_fidelity: Leave as "auto". GPT Image 2 and later always preserve input detail and
        reject this option; "high" helps only older models keep faces and fine detail.
list_image_modelsA

Lists the OpenAI image models the user's API key can use, newest first.

Shows which model is used by default and whether the user pinned one.

Args:
    query: Optional words to filter by, such as "2.5" or "flare".

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.4/5.0

Scored across 3 tools

Disambiguation5/5

Each tool targets a clearly distinct action on a distinct resource: create a new image, revise an existing one, or enumerate available models. The descriptions actively steer the agent between them (generate_image explicitly points to edit_image for revisions), removing any realistic misselection risk.

Naming Consistency5/5

All three tools follow the same verb_noun snake_case pattern (generate_image, edit_image, list_image_models) and share the 'image' resource prefix, making the set predictable and easy to scan.

Tool Count4/5

Three tools is lean but each earns its place, and the parameter surface of generate_image/edit_image carries most of the depth. It sits at the low end of the well-scoped band, with no filler but also no supporting tools such as listing previously saved images.

Completeness4/5

The core lifecycle (create, revise, and discover models) is fully covered, with versioned saves on edit and mask/reference support. Minor gaps remain around discovering or managing already-saved images (no list/delete/inspect of the output folder) and no image analysis capability.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues