Skip to main content
Glama

generate_image

Create new images from a text prompt and save full-resolution files to a local image folder. For existing image changes, use edit_image instead of creating a new version.

Instructions

Generates new images from a text prompt and saves them to the user's image folder.

For changes to an image that already exists, use edit_image on its saved path instead;
generating again produces a different image rather than a revision.

Args:
    prompt: What to draw. Be specific about subject, style, composition, and any text to render.
    size: "auto", or WIDTHxHEIGHT such as 1024x1024 (square), 1536x1024 (landscape), or
        1024x1536 (portrait). Edges must be multiples of 16, at most 3840.
    quality: "low" for fast drafts up to "max". "auto" lets the model choose.
    background: "transparent" needs output_format "png" or "webp".
    output_format: File format of the saved image.
    n: Number of images, 1 to 4. Each one is billed.
    model: A model ID for this request only. Leave empty to use the user's default
        (the newest model unless they pinned one). See list_image_models.
    open_after: Open each saved image in the user's default image viewer. Set it when the
        user asks to see or open the result, which helps most in Claude Code, where the chat
        is a terminal that can't display images.

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
sizeNoauto
modelNo
promptYes
qualityNoauto
backgroundNoauto
open_afterNo
output_formatNopng

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does well: it discloses per-image billing for n, format constraints for transparent backgrounds, default model behavior, and the save/open side effects. It does not cover permissions, file naming or overwrite behavior, or returned metadata, leaving some mutation-related gaps.

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 purpose and the edit_image distinction are front-loaded before a structured Args block. Each parameter note is compact and useful, with no redundant filler.

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 an eight-parameter generation tool with no annotations and no output schema, the description covers the inputs and save behavior thoroughly. The main remaining gap is that it does not describe what the tool returns beyond saving files, such as paths or image metadata.

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

Parameters5/5

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

Schema description coverage is 0%, but the description fully compensates by explaining all eight parameters. It supplies concrete size syntax, edge constraints, quality ranges, background compatibility, n limits, and open_after use cases, adding substantial meaning beyond the bare schema.

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?

The description states a specific verb and resource: generating new images from a text prompt and saving them to the user's image folder. It explicitly distinguishes this from edit_image, making the tool's role clear without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It directly names the alternative edit_image for existing images and explains why regenerating is not a revision. It also gives conditional guidance for open_after and model selection, including when to consult list_image_models.

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

Deploy Server

Other Tools