Skip to main content
Glama

edit_image

Edit existing images using gpt-image-2 with up to 16 reference images. Apply masks for inpainting and save results directly to a file path.

Instructions

แก้ไข/ต่อยอดรูปที่มีอยู่ด้วย gpt-image-2: ใส่รูปต้นทางได้ 1-16 ไฟล์เป็น reference (เช่น แก้รูปเดิม, รวมสไตล์จากหลายรูป, ใส่โลโก้), และใส่ mask (mask_path) เพื่อ inpaint เฉพาะบางส่วนได้. ผลลัพธ์เซฟเป็นไฟล์ที่ output_path. เหมาะกับการปรับ asset ที่เจนไว้แล้วหรือทำให้ตรงแบรนด์.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNoจำนวนรูป (default 1). ถ้า >1 จะเซฟเป็น name-1.ext, name-2.ext, ...
sizeNoauto | 1024x1024 (จตุรัส) | 1536x1024 (แนวนอน) | 1024x1536 (แนวตั้ง) | 2048x2048 | WxH (gpt-image-2 สูงสุด 3840px, ทวีคูณของ 16)1024x1024
modelNoโมเดล (default gpt-image-2). override ได้ เช่น gpt-image-1.5gpt-image-2
formatNoนามสกุลไฟล์ผลลัพธ์ (ไม่ใส่ = เดาจาก output_path, ไม่รู้ = png)
promptYesบอกว่าจะให้แก้/สร้างอะไรจากรูปต้นทาง
qualityNoคุณภาพ/ราคา: low (ร่าง, ถูกสุด) | medium (ค่าเริ่มต้น) | high (งาน final, แพงสุด) | automedium
mask_pathNo(ไม่บังคับ) path ไฟล์ mask สำหรับ inpaint — บริเวณโปร่งใสใน mask คือส่วนที่จะถูกแก้ ต้องขนาดเท่ารูปแรก
backgroundNotransparent = พื้นหลังโปร่งใส (ใช้ได้เฉพาะ png/webp) | opaque | autoauto
moderationNoระดับ moderation (default auto)auto
compressionNoระดับบีบอัด 0-100 (เฉพาะ jpeg/webp)
image_pathsYespath รูปต้นทาง 1-16 ไฟล์ (reference images)
output_pathYesที่จะเซฟไฟล์ผลลัพธ์
Behavior3/5

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

With no annotations, the description carries the burden. It explains the process (reference images, mask, output path) and model, but does not disclose potential destructive actions, auth requirements, rate limits, or side effects. Adequate but not comprehensive.

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 a single paragraph with three sentences, reasonably concise. It front-loads the purpose. Could be slightly more terse but is well-structured.

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?

The tool has 12 parameters and no output schema. The description covers the main use case and some parameter details (mask size, number of images), but does not explain return values or behavior. Adequate for an experienced agent.

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 coverage is 100%, so baseline is 3. The description paraphrases some parameters (reference images, mask) but adds little beyond the schema. No significant additional semantic value.

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 the tool edits/enhances existing images using gpt-image-2, with support for multiple reference images and mask inpainting. It distinguishes from the sibling generate_image tool, making the purpose unambiguous.

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?

The description notes it's suitable for adjusting already-generated assets or making them on-brand, providing context for when to use. However, it does not explicitly state when not to use or mention alternatives, leaving some ambiguity.

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/k12club/image-gen-mcp'

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