Image Gen
v0.2.1Generate and edit images from your coding agent with Gemini and OpenAI, using your own API keys.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
generate_image Generate image
Generate one or more images from a text prompt using Gemini or OpenAI image models and save them to disk. Returns the absolute saved file path(s) plus provider/model metadata. Strongly prefer passing an absolute output_path inside the current project so the file lands where you can use it. Each image costs real API credits.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | What to generate. Be specific: subject, style, composition, colors, any text to render. |
aspect_ratio | string | Gemini and OpenAI gpt-image-2 honor the ratio exactly. Older OpenAI models approximate: landscape -> 1536x1024, portrait -> 1024x1536, 1:1 -> 1024x1024. |
background | string | OpenAI only, ignored by Gemini. transparent yields alpha PNG/WebP, ideal for logos and icons. Requires gpt-image-1.5 or older: gpt-image-2 does not support it, so transparent calls on gpt-image-2 auto… |
image_size | string | Gemini 3.x models only (ignored by OpenAI; gemini-2.5-flash-image is fixed at 1024px). Default 1K. |
model | string | Override the model. Gemini: gemini-3.1-flash-image (default), gemini-3.1-flash-lite-image, gemini-3-pro-image, gemini-2.5-flash-image. OpenAI: gpt-image-2 (default, best quality), gpt-image-1.5, gpt-i… |
n | integer | Number of images, 1-4 (default 1). Gemini generates sequentially, so n>1 is slower there. |
output_path | string | Absolute path strongly recommended. Either a full file path (.png/.jpg/.webp) or a directory (a slugified filename is derived from the prompt). If omitted: $IMAGE_GEN_MCP_OUTPUT_DIR, then $CLAUDE_PROJ… |
provider | string | Override the default provider. Call list_capabilities to see what is configured. |
quality | string | OpenAI only, ignored by Gemini. Use low for cheap drafts. |
return_image | boolean | Default false. When true, also returns the FIRST image as an inline MCP image block so you can see it without a Read. Large images can exceed the MCP output token limit; for 2K/4K prefer Read on the s… |
edit_image Edit image
Edit or combine existing image file(s) using a text instruction: modify elements, restyle, add or remove content, or merge references. Reads the source image(s) from disk, saves the result as a NEW file (never overwrites sources), and returns the absolute saved path(s).
| Parameter | Type | Description |
|---|---|---|
prompt * | string | The edit instruction, e.g. "make the background transparent" or "restyle as a flat vector logo". |
source_paths * | array | Absolute paths to existing input images (.png/.jpg/.jpeg/.webp). The first is the primary edit target; extras act as references. OpenAI accepts up to 16; Gemini works best with 1-3. |
aspect_ratio | string | Gemini and OpenAI gpt-image-2 honor the ratio exactly. Older OpenAI models approximate: landscape -> 1536x1024, portrait -> 1024x1536, 1:1 -> 1024x1024. |
background | string | OpenAI only, ignored by Gemini. transparent yields alpha PNG/WebP, ideal for logos and icons. Requires gpt-image-1.5 or older: gpt-image-2 does not support it, so transparent calls on gpt-image-2 auto… |
image_size | string | Gemini 3.x models only (ignored by OpenAI; gemini-2.5-flash-image is fixed at 1024px). Default 1K. |
input_fidelity | string | OpenAI only. high preserves faces, logos, and fine details from the input more faithfully. Ignored on gpt-image-2, which always processes inputs at high fidelity. |
model | string | Override the model. Gemini: gemini-3.1-flash-image (default), gemini-3.1-flash-lite-image, gemini-3-pro-image, gemini-2.5-flash-image. OpenAI: gpt-image-2 (default, best quality), gpt-image-1.5, gpt-i… |
n | integer | Number of images, 1-4 (default 1). Gemini generates sequentially, so n>1 is slower there. |
output_path | string | Absolute path strongly recommended. Either a full file path (.png/.jpg/.webp) or a directory (a slugified filename is derived from the prompt). If omitted: $IMAGE_GEN_MCP_OUTPUT_DIR, then $CLAUDE_PROJ… |
provider | string | Override the default provider. Call list_capabilities to see what is configured. |
quality | string | OpenAI only, ignored by Gemini. Use low for cheap drafts. |
return_image | boolean | Default false. When true, also returns the FIRST image as an inline MCP image block so you can see it without a Read. Large images can exceed the MCP output token limit; for 2K/4K prefer Read on the s… |
list_capabilities List image provider capabilities
Report which image providers (gemini, openai) are configured in this server, the default provider and models, known model options, the output directory fallback, and any directory restriction in force. Call this first if unsure what is available or why a call failed.