Skip to main content
Glama

Generate or edit an image with ChatGPT

generate_image

Create or edit images through your logged-in ChatGPT account in Chrome, with no API key or extra cost, while keeping your active browser tab and input untouched.

Instructions

Generate or edit an image with ChatGPT through the user's own logged-in ChatGPT account in Google Chrome (no OpenAI API key, no extra cost). A new chat is started inside the user's selected ChatGPT Project, in a background tab: the user's active tab, window focus, mouse and keyboard are never touched. Waits up to wait_seconds (default 45) and returns: SUCCESS with the saved file path(s) (always kept in the images folder), a preview and the conversation link; NEEDS REFERENCE IMAGE / CHATGPT REPLIED WITHOUT AN IMAGE together with ChatGPT's own reply text; or, while ChatGPT is still working, STILL RUNNING / QUEUED with a job id: then keep calling job_status with that job_id. Use it whenever the user asks for an image, visual, illustration or concept art with ChatGPT, in any language. Write a detailed, self-contained prompt (subject, style, composition, colors, mood); give the shape in aspect_ratio rather than in the prompt. To edit an image or keep a character consistent, pass the image file(s) in reference_images: a fresh chat with reference_images is the most reliable way to edit. To use one of the user's saved reference collections (see list_collections), pass reference_collection.

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
motionNoPreset GIF movement: idle, walk, run, jump, wave, dance, bounce, wiggle, spin. Also enables animated when omitted or false; frame count is only a hint.
promptYesFull image description or edit instructions, in any language.
animatedNoAsk for a short animation (animated GIF). For best results use one subject, one clear motion, a still camera and no small text in the scene. aspect_ratio is not applied to the GIF. The result reports the frame count and duration. Pass motion for a preset movement.
output_dirNoOptional folder to also copy the image(s) into, e.g. the current project's assets folder (absolute path preferred). The central images folder always keeps a copy.
send_as_isNoSend the prompt verbatim, without the short instruction the bridge adds (useful to answer a question ChatGPT asked).
aspect_ratioNoOptional shape as W:H, e.g. 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, 4:5, 5:2 (Discord banner) or 3:1 (header). Any W:H with whole numbers between 1:4 and 4:1 works (not 1.5:1: use 3:2). ChatGPT draws 1:3 to 3:1 itself; wider or taller shapes are drawn at 3:1 / 1:3 and cropped. An image more than 1% off is cropped from the centre to this ratio (to the nearest pixel), and the full image is kept too.
wait_secondsNoReturn within this many seconds. The default 45 keeps each call under the 60-second tool limit some clients have. If the job has not finished by then, the result says STILL RUNNING or QUEUED: call job_status with its job_id again.
auto_reattachNoIf ChatGPT answers that it can't access the image and asks for it to be uploaded, attach the chat's latest image (or reference_images) automatically and ask once more.
filename_hintNoOptional few words naming the subject (e.g. 'red fox mascot'), used for the saved file name instead of the start of the prompt. Pass it when the prompt opens with something else, such as instructions about the reference images.
include_previewNoAttach a downscaled preview of the result so you can check it.
reference_filesNoOptional file names from list_collections to attach only those images of reference_collection, instead of the newest.
conversation_urlNoOptional ChatGPT conversation link from an earlier result: the prompt is sent in that chat instead of a new one. Fine for quick follow-ups; for exact edits prefer reference_images in a fresh chat.
reference_imagesNoOptional local image files (png/jpg/webp/gif, up to 16) attached to the message, e.g. the image to edit or a character sheet. Paths saved by earlier calls work directly.
reference_collectionNoOptional name of one of the user's Backdraw reference collections (see list_collections; matched loosely). Its images are attached after any reference_images, up to 16 references in total: over the limit the newest are used, unless reference_files picks others.
transparent_backgroundNoAsk for a transparent background (stickers, logos, icons, sprites). A PNG is checked for transparent pixels; a GIF's first frame too (GIF requests do not ask ChatGPT for transparency).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.3.0
    • addedInput schema / properties / animated
      Added value: +{
      +  "default": false,
      +  "description": "Ask for a short animation (animated GIF). For best results use one subject, one clear motion, a still camera and no small text in the scene. aspect_ratio is not applied to the GIF. The result reports the frame count and duration. Pass motion for a preset movement.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / filename_hint
      Added value: +{
      +  "description": "Optional few words naming the subject (e.g. 'red fox mascot'), used for the saved file name instead of the start of the prompt. Pass it when the prompt opens with something else, such as instructions about the reference images.",
      +  "type": "string"
      +}
    • addedInput schema / properties / motion
      Added value: +{
      +  "description": "Preset GIF movement: idle, walk, run, jump, wave, dance, bounce, wiggle, spin. Also enables animated when omitted or false; frame count is only a hint.",
      +  "enum": [
      +    "idle",
      +    "walk",
      +    "run",
      +    "jump",
      +    "wave",
      +    "dance",
      +    "bounce",
      +    "wiggle",
      +    "spin"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / transparent_background / description
      Previous value: -"Ask for a PNG with a transparent background (stickers, logos, icons, sprites). The result says whether the saved image really has transparent pixels."New value: +"Ask for a transparent background (stickers, logos, icons, sprites). A PNG is checked for transparent pixels; a GIF's first frame too (GIF requests do not ask ChatGPT for transparency)."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important behavior: no API key or extra cost, a background tab that never touches the user's active tab, waiting up to wait_seconds, and the exact return states including SUCCESS, NEEDS REFERENCE IMAGE, CHATGPT REPLIED WITHOUT AN IMAGE, STILL RUNNING, and QUEUED with a job id. It also notes that files are always kept in the images folder. None of this contradicts the provided annotations.

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 description is information-dense but front-loads the core purpose and mechanism before moving to return states and usage guidance. It is long for a single paragraph, but nearly every sentence carries operational value. A little tightening around the return-state list would improve it further.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 15-parameter, side-effecting browser automation tool with no output schema, the description is complete enough to call correctly. It covers the execution model, return states, polling with job_status, prompt-writing guidance, reference handling, and output location. The agent has what it needs without inspecting sibling tools.

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 100%, so the schema already documents all 15 parameters. The description adds some practical meaning beyond that, especially by advising that the shape should be given in aspect_ratio rather than in the prompt, and by explaining that a fresh chat with reference_images is the most reliable way to edit. These are useful semantic hints, though most parameter detail still comes from the 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 opens with a specific verb+resource: 'Generate or edit an image with ChatGPT'. It clearly scopes the tool to image generation/editing through the user's logged-in Chrome session and distinguishes it from other job tools by pointing to job_status for polling and list_collections for references.

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?

It gives strong when-to-use guidance: 'Use it whenever the user asks for an image, visual, illustration or concept art with ChatGPT, in any language.' It also explains when to use reference_images for edits and when to pass reference_collection. It stops short of explicitly distinguishing this tool from siblings like animate_image or generate_sprite, so a 4 rather than 5.

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