Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OPENAI_API_KEYYesOpenAI API key with access to GPT Image models. Required.
OPENAI_BASE_URLNoRoute calls through an OpenAI-compatible gateway. Defaults to OpenAI default.
IMAGE_OUTPUT_DIRNoWhere images are written, relative to the server's working directory. Defaults to ./assets/generated.
OPENAI_IMAGE_MODELNoModel for both generation and edits. Defaults to gpt-image-2.
IMAGE_TIMEOUT_SECONDSNoPer-request timeout in seconds. Defaults to 180.

Instructions

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

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

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

Tools

Functions exposed to the LLM to take actions

NameDescription
generate_imageA

Generate one or more brand-new images from a text prompt using OpenAI's image model, save them as files in the project's generated-assets directory, and return a small preview of each. Use this when no existing image needs to guide the result. If you need the new image to match the look of images you already have (a brand board, an earlier asset, a photo to modify), use edit_image instead and pass those files as references. Write prompts as a full description: subject, style, composition, lighting, colour palette, and any text that must appear. SIZE: pass a preset name or explicit WIDTHxHEIGHT. Presets: 'square' (1024x1024), 'landscape' (1536x1024), 'portrait' (1024x1536), 'hero' (1920x1088), 'banner' (1536x512), 'auto' (model picks). Explicit sizes are rounded to the nearest multiple of 16 (minimum 256); the aspect ratio must be between 1:3 and 3:1 and neither side may exceed 3840. The result text reports the size actually produced, so check it if the exact pixel size matters. BACKGROUND: 'transparent' produces an alpha channel and requires output_format 'png' or 'webp' (never 'jpeg'); use it for logos, icons and cut-out illustrations. QUALITY: 'low' is fast and cheap (good for drafts and iteration), 'high' is slow (can take over a minute) and detailed; 'auto' lets the model choose. RETURNS: for each image, a text block with the absolute file path, final width x height, model, quality and the path of a .json sidecar holding the prompt and settings, followed by a small JPEG preview (longest side 512px) so you can inspect the result. The full-resolution file is already on disk; reference it by the returned path (for example as a site asset).

edit_imageA

Create a new image that is guided by one or more existing images (1-8 reference files) plus a text prompt, save it to the project's generated-assets directory, and return a preview. The model sees every reference image and the prompt together, so use this tool whenever the result must stay consistent with images you already have: to keep one visual style across a whole set of assets, pass the same brand-board or style-reference image in reference_paths for every asset and describe the new subject in the prompt (for example 'In the style of the reference: a hero illustration of a lighthouse at dawn'). Also use it to modify an image (change colours, add or remove elements, restyle it) or to combine several images into one. For a brand-new image with no reference, use generate_image. MASKING: mask_path is an optional PNG the same size as the first reference whose transparent pixels mark the region to change. Masking is prompt-guided rather than pixel-exact: the model treats the mask as strong guidance and may adjust areas near the edge, so always describe the desired change in the prompt too. Paths may be absolute or relative to the server's working directory. SIZE: pass a preset name or explicit WIDTHxHEIGHT. Presets: 'square' (1024x1024), 'landscape' (1536x1024), 'portrait' (1024x1536), 'hero' (1920x1088), 'banner' (1536x512), 'auto' (model picks). Explicit sizes are rounded to the nearest multiple of 16 (minimum 256); the aspect ratio must be between 1:3 and 3:1 and neither side may exceed 3840. The result text reports the size actually produced, so check it if the exact pixel size matters. BACKGROUND: 'transparent' produces an alpha channel and requires output_format 'png' or 'webp' (never 'jpeg'); use it for logos, icons and cut-out illustrations. QUALITY: 'low' is fast and cheap (good for drafts and iteration), 'high' is slow (can take over a minute) and detailed; 'auto' lets the model choose. RETURNS: for each image, a text block with the absolute file path, final width x height, model, quality and the path of a .json sidecar holding the prompt and settings, followed by a small JPEG preview (longest side 512px) so you can inspect the result. The full-resolution file is already on disk; reference it by the returned path (for example as a site asset).

list_generated_imagesA

List the images this server has written to the project's generated-assets directory (IMAGE_OUTPUT_DIR, default ./assets/generated): absolute path, pixel dimensions, file size in KB, and the prompt that produced each one when its .json sidecar exists. Use it at the start of a session to discover assets (such as a brand board) created earlier, so you can reuse them or pass them to edit_image as references.

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/mostmark/openai-image-mcp'

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