Skip to main content
Glama

generate_image

Create or edit images via OpenAI, Gemini, fal.ai, or Cloudflare. Saves full-resolution files to disk and returns file paths plus a JPEG preview.

Instructions

Generate or edit an image. Saves full-resolution files to disk and returns paths plus a JPEG preview.

provider (default: first configured of openai, gemini, fal, cloudflare):

  • openai: default model gpt-image-2. aspect_ratio maps to size (1:1 -> 1024x1024; 16:9/3:2/4:3 -> 1536x1024; 9:16/2:3/3:4 -> 1024x1536). options merged into the request body (e.g. quality, background, n, output_format); options["size"] wins. input_images switches to /images/edits.

  • gemini: default gemini-3-pro-image (Nano Banana Pro). aspect_ratio -> imageConfig.aspectRatio (e.g. 16:9). options shallow-update generationConfig (e.g. imageConfig with imageSize).

  • fal: default fal-ai/nano-banana-pro. Input {prompt, aspect_ratio, image_urls} updated with options (model-specific params such as num_images, resolution, image_size). Any model id works.

  • cloudflare: default @cf/black-forest-labs/flux-1-schnell. Body {prompt} updated with options (e.g. steps, seed). No input_images.

input_images: local file paths, http(s) URLs or data URIs, used as edit targets or references.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
promptYes
optionsNo
providerNo
aspect_ratioNo
input_imagesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the key side effect: files are written to disk and a preview plus paths are returned, so the agent knows this is not a read-only call. It also discloses the non-obvious branch where input_images switches openai to /images/edits. It omits auth requirements, cost, and failure modes for a paid generation endpoint.

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?

Front-loaded with purpose and return behavior, then a scannable per-provider bullet list. The density is justified by the zero schema coverage, though the provider bullets are heavy enough that an agent must read the whole block rather than skim.

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?

For a 6-parameter tool with no annotations, no output schema, and 0% schema description coverage, the description covers the provider/model/aspect_ratio/options/input_images surface and states what is returned. Gaps remain around error behavior, cost, and what happens when multiple providers are configured beyond the 'first configured' rule.

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?

Schema coverage is 0%, so the description must compensate, and it largely does: aspect_ratio is given explicit per-provider mappings (1:1 -> 1024x1024, 16:9/3:2/4:3 -> 1536x1024), options merge semantics are spelled out including precedence ('options["size"] wins'), model defaults are named per provider, and input_images formats (paths, URLs, data URIs) and roles (edit target vs reference) are defined.

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?

Opens with a specific verb+resource ('Generate or edit an image') and immediately states the observable side effect and return shape ('Saves full-resolution files to disk and returns paths plus a JPEG preview'). This clearly separates it from siblings generate_audio, start_video, and check_video without needing their schemas.

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?

Provides clear selection context by documenting the provider default ('first configured of openai, gemini, fal, cloudflare') and the per-provider defaults (gpt-image-2, gemini-3-pro-image, fal-ai/nano-banana-pro, flux-1-schnell), plus when input_images switches to an edit path for openai. There is no explicit when-not guidance or cost/limit exclusion, but the provider routing context is unusually strong.

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