Skip to main content
Glama

generate_image

Creates images from prompts via OpenAI Images API and saves them to a chosen file or folder, with options for quality, transparency, count, and cost confirmation.

Instructions

Erzeugt Bild(er) mit der OpenAI Images API und speichert sie als Datei.

- output_path: Zielordner (Standard: <Projekt>/assets/images) ODER kompletter Dateipfad.
- filename: Dateiname ohne Endung (Standard: aus dem Prompt abgeleitet).
- quality: Standard "medium". "high" NUR auf ausdrücklichen Wunsch der Person.
- transparent_background: true für Sprites/Charaktere (PNG mit Alpha).
- n: Anzahl Bilder (Obergrenze pro Anfrage siehe config).
- confirmed: erst true setzen, nachdem die Person Kosten über der Schwelle bestätigt hat.
- low_balance_ok: erst true, nachdem die Person bei kritischem Kontostand zugestimmt hat.
- project_dir: absoluter Projektpfad (für Standard-Zielordner assets/images).
Vorher der Person kurz sagen, was erzeugt wird und in welcher Qualität.

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
sizeNo1024x1024
promptYes
qualityNomedium
filenameNo
confirmedNo
output_pathNo
project_dirNo
low_balance_okNo
transparent_backgroundNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does substantial work: it discloses that files are written to disk, the default target directory, the default quality, cost-confirmation gating, and a balance-consent gate. It does not cover overwrite/name-collision behavior, failure modes, or the per-request image cap (deferred to config), leaving some behavioral gaps for a mutation-style tool.

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?

The structure is well front-loaded: a one-line statement of what happens, then a scannable per-parameter list, then a closing workflow reminder. Every bullet carries information that is not discoverable from the bare schema. Minor waste remains where the n bullet defers to config rather than stating the limit inline.

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?

An output schema exists, so return values need not be described, and the description correctly spends its budget on side effects, defaults, and consent gating instead. For a 10-parameter file-writing tool with zero annotations, it is close to sufficient; the remaining gaps are the undocumented size parameter and the absence of any statement about overwriting or naming collisions in the output directory.

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?

Schema description coverage is 0% across 10 parameters, so the description must compensate, and it documents 8 of them with genuine semantic content — defaults for output_path and filename, the meaning of confirmed and low_balance_ok as consent gates, and when transparent_background applies. Only size and prompt are left unexplained, one of which is self-evident as the required input, so the coverage is strong but not complete.

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 first sentence gives a specific verb+resource pair: generates image(s) via the OpenAI Images API and persists them to a file. That is far more precise than a restated name, and the file-saving effect distinguishes it conceptually from the text-oriented siblings. It stops short of naming an alternative tool or an explicit non-use case, so it is clear but not fully differentiated.

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?

The description supplies real conditional guidance: quality 'high' only on explicit request, confirmed only after the person approves costs above the threshold, low_balance_ok only after consent at critical balance, and a workflow step to state intent and quality beforehand. What is missing is routing logic — it never says when to prefer this over ask_chatgpt/ask_gemini or what to do instead when the request is not an image.

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