Skip to main content
Glama

generate_image

Create images from text prompts using AI Gateway models or image-capable LLMs. Set aspect ratio, size, batch count, or preview cost before generating.

Instructions

Generate images with an AI Gateway image model (e.g. "bfl/flux-2-pro", "openai/gpt-image-2") or an image-capable LLM (e.g. "google/gemini-3-pro-image"). Images are returned inline; if a Blob store is connected, private download links that expire are returned too.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoNumber of images (image-only models). Default 1.
modelYesImage model id from list_models with type "image"
promptYes
estimate_onlyNoOnly return the estimated price from AI Gateway's list prices. Nothing is generated or charged.
size_or_aspectNoAspect ratio like "16:9" or size like "1024x1024". Support varies by model.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses return behavior (images returned inline; expiring private download links when a Blob store is connected), but says nothing about cost/credits, latency, permissions, or failure modes for what is a charged external generation call.

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 tight sentences with the core purpose front-loaded and output behavior second; the examples earn their place by clarifying valid model ids. No wasted preamble.

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?

With no annotations and no output schema, the description must carry behavioral and return semantics. It covers return format adequately, but cost/credit implications and when-not-to-use are left to the schema's estimate_only field, leaving real gaps for a multi-sibling generation tool.

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 80%, so the baseline is 3. The description's model examples ('bfl/flux-2-pro', 'openai/gpt-image-2') add slight context for the required model param, but it adds no syntax or format detail for prompt, n, size_or_aspect, or estimate_only.

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+resource ('Generate images') and distinguishes two accepted model classes (AI Gateway image models vs image-capable LLMs) with concrete ids. It is clearly separable from edit_image/upscale_image by verb, but never names those siblings explicitly.

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

Usage Guidelines2/5

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

No when-to-use guidance: it never says when to pick this over edit_image, upscale_image, or which model class to choose for a given task. Only the schema's estimate_only param hints at a preview workflow, and that is not surfaced in the description.

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