Skip to main content
Glama

画像を編集する(マスク指定可)

edit_image

Edit an existing image via text prompt, with optional mask. Note: full image is regenerated; use region compositing for stable character edits.

Instructions

既存画像を編集する。mask_path を渡すと、透明の画素だけが編集対象になる。 ⚠ 実測(2026-08-12):マスクを渡しても画像全体が再生成される。マスク外の画素が0.7〜0.9%変化し、最大差分は220(ほぼ別の色)だった。同じキャラクターの差分絵(口の形・目の開閉)を作る用途では、この結果をそのままコマに使わないこと——30fpsで切り替えると顔が揺れる。compose_region で土台へ貼り直すこと。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNo1024x1024
modelNogpt-image-2
promptYesどう編集するか
out_pathYes保存先のパス(.png)
mask_pathNo編集領域のマスク(透明=編集する所・元画像と同サイズのPNG)
image_pathYes編集元の画像
Behavior5/5

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

Annotations are absent, so the description carries full burden. It discloses critical measured behavior: passing a mask still regenerates the entire image, drift in non-mask pixels, and max difference. This goes far beyond the schema and is highly valuable for an agent.

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 purposeful sentences. The first states purpose and mask behavior; the second provides concrete measured data and actionable advice without padding. Every sentence earns its place.

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 6-parameter tool with no annotations and no output schema, the description covers the core purpose, the critical behavioral caveat, and recommends an alternative workflow. It is sufficiently complete for an agent to invoke the tool correctly.

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 coverage is 67%, and mask_path is already described in the schema. The description adds a crucial semantic correction: despite the mask, the whole image is regenerated. This meaningfully alters how the agent should interpret mask_path, but other parameters like size/model are not further clarified.

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 clearly states '既存画像を編集する' (edits an existing image), using a specific verb and resource. It also mentions mask_path behavior, which distinguishes it from sibling tools like generate_image (new image generation) and compose_region (compositing).

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?

The description implies use for editing existing images and explicitly warns against using the result directly for character diff frames (30fps switching causes face wobble), instead recommending compose_region. This provides clear when-to-use and when-not-to-use guidance with an alternative tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cometa-kaito/gpt-image-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server