Skip to main content
Glama

openai_generate_image

Generate images from text prompts using OpenAI's API and save them locally to assets/images. Specify size, quality, and number of images as needed.

Instructions

Generate image(s) with OpenAI's Images API and save them to assets/images.

Args: prompt: Text description of the image to generate. size: WIDTHxHEIGHT (e.g. "1024x1024", "1536x1024"). gpt-image-2 supports arbitrary sizes with width/height divisible by 16. quality: "low", "medium", or "high". n: Number of images (1-10 for gpt-image-2). model: Override the model id (default from OPENAI_IMAGE_MODEL / gpt-image-2). filename: Optional base filename (without extension) for a single image.

Returns: A human-readable summary listing the saved file path(s).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNo
sizeNo1024x1024
modelNo
promptYes
qualityNohigh
filenameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It transparently states the side effect of saving images to assets/images, the return summary format, and model-specific constraints (e.g., 'gpt-image-2 supports arbitrary sizes with width/height divisible by 16' and 'Number of images (1-10 for gpt-image-2)'). This goes beyond a basic summary, though it omits auth requirements or rate limits.

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

Conciseness5/5

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

The description is well-structured with a one-sentence summary, a bulleted Args list, and a Returns line. Every sentence provides useful information, and there is no filler. The format is front-loaded and easy to scan.

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

Completeness4/5

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

The description covers all six parameters and the return format, making it self-sufficient for invocation. Since an output schema exists, the return description is a bonus. It lacks only a note on prerequisites like API key setup, but that is not critical for the tool's core operation.

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

Parameters5/5

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

The schema description coverage is 0%, so the description must fully compensate. It does so by explaining each parameter: prompt, size with examples and constraints, quality values, n range, model default, and filename usage. This adds essential meaning beyond the bare schema.

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

Purpose5/5

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

The description begins with 'Generate image(s) with OpenAI's Images API and save them to assets/images,' which specifies the verb (generate), resource (images via OpenAI), and location (assets/images). This clearly distinguishes the tool from its Gemini siblings by naming OpenAI 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?

The description implies usage for OpenAI image generation but provides no explicit when-to-use or when-not-to-use guidance. It doesn't mention alternatives like 'use gemini_generate_image for Google's model' or exclusions for video generation. The context is implied through the OpenAI-specific details but lacks direct comparison.

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

Install Server

Other Tools

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/eracom-technologies/image-video-mcp'

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