Skip to main content
Glama

generate_image

Creates images from text prompts via OpenRouter and saves them to disk, with options for model, aspect ratio, format, count, and seed.

Instructions

Generate image from text prompt via OpenRouter (Gemini Flash Image, Recraft V4, GPT Image, Flux, etc). Saves to file.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>"
    },
    "name": "generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNoNumber of images (1-10, default: 1)
seedNoSeed for deterministic output
modelNoModel ID (default: google/gemini-2.5-flash-image)
promptYesText description of the image
qualityNo
output_dirNoSave directory (default: ./generated)
aspect_ratioNo1:1, 16:9, 9:16, 4:3, 3:4
output_formatNoDefault: png

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations present, the description carries the full burden. It does disclose the key behavioral trait that output is persisted to disk rather than merely returned, but it says nothing about API-key/auth requirements, cost or rate limits of the OpenRouter call, file naming, or whether existing files are overwritten.

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 action front-loaded and the side effect trailing, so every clause carries information. The model-name parenthetical partially duplicates the schema's default and ends in a vague 'etc.', which is minor waste but not harmful.

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?

For an 8-parameter generation tool with no annotations and no output schema, the description covers the core action and the disk-write behavior. It leaves the agent guessing about prerequisites (API credentials), what is returned (file paths vs. bytes), and how failures or unsupported aspect_ratio/model combinations manifest.

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 coverage is 88%, so the schema already documents nearly all parameters, and the baseline of 3 applies. The description adds marginal value by naming concrete model families (Gemini Flash Image, Recraft V4, GPT Image, Flux) beyond the schema's single default ID, but contributes nothing about seed, quality, aspect_ratio, or output_format semantics.

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?

States a specific verb and resource ('Generate image from text prompt'), names the backend (OpenRouter) and the side effect ('Saves to file'). The image resource cleanly separates it from the generate_video and text_to_speech siblings without opening any schema.

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?

Usage is only implied by the purpose statement; there is no explicit when-to-use or when-not-to-use guidance. It does not tell the agent to call list_image_models first to discover valid model IDs, even though that sibling exists and the description advertises multiple model families.

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