Skip to main content
Glama

Edit image (ChatGPT)

edit_image

Edit existing images with ChatGPT's image generator to change backgrounds, colors, or objects; preserve the original file and save each result as a new file.

Instructions

Edit an existing image with ChatGPT's image generator (e.g. change background or colors, remove or add objects), through the ChatGPT/Codex app installed on this machine. The original file is never modified: the result is saved as a new file.

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>",
      "image_path": "<image_path>"
    },
    "name": "edit_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNoNumber of variants to generate.
promptYesWhat to change. Also state what must stay the same.
filenameNoBase file name without extension (e.g. 'hero-banner'). Default: timestamp.
image_pathYesAbsolute path of the image to edit (png, jpg, webp).
output_dirNoAbsolute directory to save files in. Default: /root/Pictures/chatgpt-images
orientationNoImage orientation.auto
transparentNoTransparent background (PNG with alpha).
extra_imagesNoAdditional supporting images, e.g. an object or logo to insert (optional).
include_previewNoIf true, also return the image so the assistant can see it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose the critical trait: the source file is never modified and output goes to a new file. It also names the runtime dependency on a locally installed app. Missing are error/failure behavior and whether the call is slow or costly.

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 sentences, no waste, and the non-destructive guarantee is front-loaded where an agent will read it. The parenthetical examples are compact and earn their space.

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?

For a nine-parameter, no-annotation tool with no output schema, the description covers safety and prerequisites but never says what comes back (file paths, number of variants, whether the image is visible to the assistant). The include_preview and n behaviors are left entirely to the schema.

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?

Schema description coverage is 100%, so every one of the nine parameters is already documented in the schema, including prompt guidance and the output_dir default. The description adds no parameter-level meaning beyond that, which is the baseline 3 case.

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 description names a specific verb and resource ("Edit an existing image") plus concrete operation examples (background, colors, add/remove objects), which implicitly separates it from the generate_image sibling. It stops short of naming that sibling explicitly, so an agent must infer the create-vs-edit boundary.

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

Usage Guidelines3/5

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

It states a prerequisite ("through the ChatGPT/Codex app installed on this machine") and gives example edit types, so usage context is implied. There is no explicit when-not guidance and no mention of the generate_image alternative for creating from scratch.

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