Skip to main content
Glama
openai-image-mcp-secure

openai-image-mcp-secure

by leiting684

generate_image

Create new images from text prompts and save them to your image folder; use image editing instead when revising an existing file.

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:
    request_id: Optional client-generated UUID. Reuse on retry to prevent a second paid request.
    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). Only the verified 2.x models allow custom dimensions.
    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, when the client cannot display inline previews.

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
request_idNo
output_formatNopng

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true), it discloses that images are persisted to the user's image folder, that regeneration yields a different image rather than a revision, that request_id reuse prevents a second paid request, and that each of n images is billed. It also flags the constraint that custom dimensions only work on verified 2.x models and that transparent background requires png/webp.

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?

Well front-loaded: purpose and the sibling alternative come before the parameter block. The Args list is dense with value, though a couple of lines are near-tautological against their titles (e.g. 'output_format: File format of the saved image').

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 a 9-parameter, high-consequence paid generation tool with no output schema, the definition covers destination, billing, retry, and model constraints thoroughly. The one omission is what the call actually returns (e.g. saved paths/URLs), which an agent may want in order to chain into edit_image.

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%, so the description carries the full burden and does so for essentially every parameter: prompt content expectations, size formats with concrete examples, quality range, background/format dependency, n billing implications, and model default resolution. This is meaningful guidance the bare schema cannot supply.

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?

Opens with a specific verb+resource ('Generates new images from a text prompt') and immediately scopes it by destination ('saves them to the user's image folder'). The second sentence explicitly contrasts with the sibling edit_image, so an agent can distinguish the two without opening either 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?

Gives an explicit alternative and the condition that selects it ('For changes to an image that already exists, use edit_image on its saved path'). It also states when to set open_after, when to reuse request_id, and where to look up model IDs via list_image_models, leaving little to inference.

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