Skip to main content
Glama

generate_image

Creates images from detailed text prompts using Gemini 3.1 Flash via OpenRouter, saving files locally and returning the absolute path and metadata for coding workflows.

Instructions

Generates an image from a detailed text prompt using the Gemini 3.1 Flash Image model via OpenRouter. Saves the image locally and returns the absolute path and metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoOpenRouter model to use. Default: 'google/gemini-3.1-flash-image'.
promptYesDetailed description of the image to create (subject, setting, style, lighting, composition).
output_pathNoLocal path (relative or absolute) where the generated image file should be saved (e.g., './assets/hero.png'). If omitted, automatically saves to the default folder.
aspect_ratioNoAspect ratio of the generated image. Default: '1:1'.
output_formatNoFormat of the saved image file. Default: 'png'.
Behavior3/5

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

No annotations are provided, so the description carries the behavioral disclosure burden. It does disclose two key behaviors: it saves the image locally and returns the absolute path and metadata. It does not mention potential overwrite behavior, default folder location, network/API costs, authentication requirements, or rate limits, leaving some gaps for a tool with no annotation support.

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 two short, information-dense clauses with no filler. It front-loads the core action, then immediately conveys the outcome and return value, which is exactly what an agent needs to know at a glance.

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 tool with one required parameter, complete schema coverage, and no output schema, the description covers the essential operational facts: what it does, how it saves output, and what it returns. It is missing only an explicit differentiation from edit_image and finer detail about the returned metadata, but neither prevents correct selection or invocation.

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%, so the input schema already documents all five parameters, including enums for aspect_ratio and output_format. The description adds little parameter-level meaning beyond reinforcing that the prompt should be detailed and that the model is provided via OpenRouter, 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?

The description clearly states a specific action ('Generates an image from a detailed text prompt'), identifies the model and service, and explains the resulting side effect (saving locally) and return value. It is easily distinguishable from the sibling edit_image by the word 'generates,' though it does not explicitly contrast itself with that sibling.

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?

When to use the tool is implied: call it when you need to create a new image from a text prompt. However, there is no explicit mention of the sibling edit_image, no when-not-to-use guidance, and no mention of prerequisites or cases where another tool would be more appropriate.

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/fabiojbg/GenImgMCP'

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