Skip to main content
Glama

generate_image

Create or edit images through OpenRouter or self-hosted OpenAI-compatible endpoints, saving each output with a JSON sidecar and returning file paths plus a preview.

Instructions

Generate image(s) via OpenRouter or a self-hosted OpenAI-compatible server. Saves files plus a JSON sidecar (full request, seed, cost) and returns paths and a preview.

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
nNo
maskNoPNG mask/overlay for edits (requires references). Same dimensions as the first reference. Path rules as for references.
seedNoFor reproducibility where the model supports it.
sizeNoe.g. 1024x1024
extraNoRaw fields deep-merged into the request (e.g. num_inference_steps for vLLM-Omni).
modelNoModel id. Omit for the profile's default.
presetNoNamed preset from the config (see list_presets).
promptYesImage prompt. Phrase what you want positively; image models often ignore or invert negations.
subdirNoSubfolder name under the output dir.
profileNoEndpoint profile (see list_profiles). Omit for the default.
qualityNo
providerNoOpenRouter provider routing (only, order, allow_fallbacks, zdr, data_collection, options). OpenRouter profiles only.
backgroundNo
referencesNoReference images for image-to-image: https URLs or absolute local paths inside the output folder or [mcp].reference_dirs (a file attached in the chat is not on disk).
resolutionNo512, 1K, 2K or 4K (OpenRouter, model dependent)
aspect_ratioNoe.g. 16:9 (OpenRouter; extra field elsewhere)
output_formatNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden, and it does disclose the key side effect: files are written to disk along with a JSON sidecar capturing the full request, seed, and cost, and a preview is returned. That is meaningful beyond structured fields, but it omits whether operations are billed, whether files are overwritten on re-run, what happens on backend failure, and any auth/config requirements despite referencing profiles and a self-hosted server.

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?

Two dense sentences with zero filler: the first covers what it generates and against which backends, the second covers disk side effects and return shape. Front-loaded with the action and free of restated field names.

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?

The description covers the return contract (paths plus preview) so the absence of an output schema is acceptable, but a 17-parameter tool with nested objects (provider, extra), reference-image and mask path rules, and two backend modes needs more: cost/billing implications, profile-vs-model-vs-preset resolution order, and pointer to prompt_guide are all missing.

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?

The description contributes no parameter-level meaning at all; every bit of guidance (seed, references, mask, profile, preset, extra deep-merge, aspect_ratio OpenRouter-only caveat) lives in the schema, which covers roughly 76% of the 17 parameters. Since coverage is near the high band and several of the undocumented fields (quality, background) are unenumerated strings, the schema does most of the lifting, making a baseline 3 correct.

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(s)") plus both supported backends (OpenRouter or self-hosted OpenAI-compatible server), and names the concrete artifacts produced (image files, JSON sidecar, returned paths and preview). None of the siblings (list_image_models, list_presets, list_profiles, check_prompt, prompt_guide) generate images, so the agent can route on this alone.

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?

The description gives no when-to-use or when-not-to-use guidance and never routes to the sibling helpers that clearly exist for this workflow (prompt_guide for prompt phrasing, list_profiles/list_presets for defaults, list_image_models for model choice). An agent must infer that this is 'the' generation tool and discover the prerequisite helpers on its own; only the input schema's parentheticals ("see list_presets", "see list_profiles") hint at routing.

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