Skip to main content
Glama

generate_image

Generate images from detailed text prompts using a chosen AI model, with options for size and a reference image to guide the result. Saves the output to a specified file path.

Instructions

Generate an image from a text prompt using the specified model.

Args: prompt: Detailed text description of the image to generate. Be specific about subject, style, lighting, colors, composition, and mood. Example: "A fluffy orange cat sitting on a windowsill, golden hour lighting, watercolor style" model_id: Model identifier from list_models(). Examples: "amazon.nova-canvas-v1:0", "gpt-image-1.5", "models/gemini-2.5-flash-image" output_path: Absolute or relative file path where the generated image will be saved. Supports PNG, JPEG formats. Parent directories are created automatically. reference_image: Optional. Path to an existing image to use as style/content reference. The model will generate a new image influenced by this reference. width: Optional. Image width in pixels. Default: 1024. Common values: 512, 768, 1024, 1280. Note: Some models only support specific sizes. Max: 4096px. height: Optional. Image height in pixels. Default: 1024. Common values: 512, 768, 1024, 1280. Note: Some models only support specific sizes. Max: 4096px.

Returns: Success message with output path, or error description.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthNo
heightNo
promptYes
model_idYes
output_pathYes
reference_imageNo

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 must carry the full burden of behavioral disclosure. It does so effectively: states that images are saved to output_path, that parent directories are created automatically, and that PNG/JPEG formats are supported. It also notes model-specific size limitations and the 4096px maximum. It does not address potential costs, rate limits, or authorization requirements, which is a minor gap.

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 front-loaded with a one-sentence summary followed by a well-organized Args section. Every sentence adds functional value: parameter explanations, examples, defaults, and caveats. There is no filler or repetition. The structure makes it easy for an agent to scan and extract key constraints. At ~8 sentences for 6 parameters, it is appropriately sized.

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 tool has 6 parameters, an output schema, and no annotations; the description covers all parameter semantics and high-level return behavior ('Success message with output path, or error description'). It references list_models() to aid model selection. Missing is an explicit disqualifier for when to use transform_image instead, but overall this is a thorough description that enables correct invocation in most cases.

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?

Despite the input schema having 0% description coverage, the description documents all 6 parameters in detail: prompt includes a concrete example and guidance; model_id references list_models() and gives examples; output_path explains save behavior and formats; reference_image clarifies its purpose; width and height include defaults, common values, and max constraints. This far exceeds the schema's minimal type/title information.

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 opens with a specific verb+resource: 'Generate an image from a text prompt using the specified model.' This clearly distinguishes the tool from siblings like transform_image (which would modify an existing image) and list_models (which lists available models). The phrase 'generate a new image' in the reference_image parameter reinforces the 'create from scratch' semantics.

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

Usage Guidelines4/5

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

The description strongly implies usage through phrases like 'using the specified model' and 'model_id: Model identifier from list_models().' It clarifies that reference images influence generation, not transform existing files. However, it does not explicitly name transform_image as an alternative for editing scenarios, and it lacks an explicit 'Use this tool when...' or 'If you need to edit, use...' statement. Nevertheless, the distinction from siblings is inferable from the action verbs.

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/manu-mishra/universal-image-mcp'

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