Skip to main content
Glama

openai_image_generate

Generate still images, animated GIFs, or SVGs from text prompts, save them to a specified output directory, and return file paths for use in your workflow.

Instructions

Generate images (OpenAI images.generate): still images, animated GIF (output_format=gif) or SVG. Saves files to output_dir and returns their paths.

Input Schema

NameRequiredDescriptionDefault
nNoNumber of images, 1-10
svgNoSVG only (output_format=svg, n=1): author model and reasoning, e.g. {"model":"...","reasoning":{"effort":"high"}}. Needs SVG model-selection access; omit otherwise
sizeNoauto, 1024x1024, 1536x1024, 1024x1536, or WIDTHxHEIGHT (both multiples of 16, aspect 1:3 to 3:1, max 3840x2160). For GIF this is the size of each frame; keep it small (e.g. 512x512) to fit the pixel budget
extraNoExtra API params shallow-merged into the request last, e.g. {"complexity":"high"}
modelNoImage model (default gpt-image-2.6-flare). e.g. gpt-image-2.6-flare (fast), gpt-image-2.6-sunburst (detail/precise edits), gpt-image-2.5-flare, gpt-image-2.5-sunburst
promptYesText prompt (max 32000 chars)
qualityNoauto (default), low, medium, high, xhigh, max
backgroundNoauto (default), opaque, transparent (transparent needs png, webp or svg)
complexityNoPlanning effort, separate from quality: low, medium, high (2.6 default high)
moderationNoauto (default), low
output_dirYesAbsolute directory to save images in. Follow your workspace conventions: the current project folder if any, else your own tmp dir.
frame_countNoGIF only: number of frames (default 9; SDK says 2-16, guide says 2-64). Describe the motion and a return to the starting pose in the prompt for a smooth loop
output_formatNopng (default), jpeg, webp; generate also supports gif (animated) and svg
frame_duration_msNoGIF only: ms per frame, 20-2000, rounded to 10 (default 200)
safety_identifierNoOptional stable hashed end-user id for OpenAI abuse monitoring
output_compressionNo0-100, jpeg/webp only

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description does disclose the key behavioral fact that this writes files to output_dir and returns their paths, which tells the agent this is a mutating, persistent operation. It omits other relevant traits: cost/latency of image generation, whether existing files are overwritten, and what happens on partial failure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the action and followed by the persistence/return behavior; nothing is padded. The parenthetical API name is slightly redundant but harmless.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter tool with nested objects, no annotations, and no output schema, the description covers the essentials (what it produces, where files go, what comes back) but leaves the agent without guidance on format/size tradeoffs, cost, or the edit-vs-generate decision. The schema carries most of the remaining detail, so it is adequate rather than complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema already explains formats, sizes, frame counts, model names, and the SVG sub-object in detail. The description adds only the cross-parameter link between GIF output and output_format=gif, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Generate images (OpenAI images.generate)") and enumerates the three output kinds (still, animated GIF, SVG), plus the side effect of saving files. It distinguishes itself naturally from the sibling openai_image_edit by being the generation path, though it never names that sibling explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent can infer this is for creating new images rather than editing existing ones, but the description never says "use openai_image_edit to modify an existing image" or states any exclusion or precondition beyond the SVG-access note carried in the schema. No guidance on when to prefer one model or format.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools