Skip to main content
Glama
stabgan

OpenRouter MCP Multimodal Server

generate_image

Generate images from text prompts. Optionally use reference images for character or style consistency.

Instructions

Generate an image from a text prompt. Optionally conditioned on one or more reference images (file paths, http(s) URLs, or data URLs) for character / style consistency. Sends modalities: ["image","text"] by default; override via the modalities field if needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
modelNo
aspect_ratioNoOutput aspect ratio (e.g. 1:1, 16:9, 9:16, 4:3, 3:4, 21:9). Model-dependent.
image_sizeNoOutput resolution bucket. 1K is the default; 0.5K / 2K / 4K are model-dependent.
max_tokensNoCap on completion tokens. Defaults to the model context window, which can trip free-tier quotas; set e.g. 4096 on low-credit accounts.
save_pathNoOptional path to save the image. Routed through the OPENROUTER_OUTPUT_DIR sandbox.
input_imagesNoOptional reference images for visual consistency. Each entry may be a local file path (sandboxed to OPENROUTER_INPUT_DIR / OPENROUTER_OUTPUT_DIR / cwd), an http(s) URL, or a `data:image/...;base64,...` URL. Inlined as multimodal user content in the order given.
modalitiesNoOverride the default `modalities: ["image","text"]` sent to OpenRouter. Most callers should leave this unset. Provide e.g. ["text"] to suppress image output for inspection / captioning.
Behavior4/5

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

Discloses default modalities and ability to override, plus reference image formats. Adds context beyond annotations (which are neutral). Could mention non-destructive nature, but not necessary.

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?

Three well-front-loaded sentences with zero waste. Every sentence adds value.

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?

Covers main functionality, conditioning, and modality override. Lacks explicit return format, but 'generate an image' implies output. Adequate for tool complexity.

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

Parameters4/5

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

Adds meaning beyond schema by explaining input_images purpose (character/style consistency) and modalities override. Schema coverage is high, but description provides useful context.

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?

Clearly states it generates an image from a text prompt, with optional conditioning on reference images. Distinct from sibling tools like analyze_audio or chat_completion.

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?

Implies when to use reference images for consistency hints, and mentions modality override. Lacks explicit when-not or alternatives, but sibling tools are clearly different in modality.

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/stabgan/openrouter-mcp-multimodal'

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