Skip to main content
Glama

edit_image

Edit images by combining one to three reference images with a text prompt. Generate a new image that reflects the instructed style, content, or composition changes.

Instructions

图生图 / 图像编辑:基于 1-3 张参考图与编辑指令生成新图。

Args: image: 参考图(必填)。支持本地绝对/相对路径、http(s) URL 或 data: URL。 prompt: 编辑指令,描述期望的输出内容、风格与构图。 model: 模型名。默认 qwen-image-3.0;或 OpenAI 兼容的编辑模型(如 qwen-image-3-edit)。 image2, image3: 第 2、3 张参考图(DashScope 原生接口最多 3 张)。 mask: 蒙版图(仅 OpenAI 兼容 /images/edits 后端支持;DashScope 原生接口不支持)。 size: 输出分辨率,OpenAI 风格 "宽x高";不填由模型自动推荐。 n: 生成张数。 response_format: "url" 或 "b64_json"。 seed: 随机种子。 negative_prompt: 反向提示词(qwen-image-3.0 支持)。 prompt_extend: 是否开启提示词智能改写。 watermark: 是否添加水印(仅 qwen-image-3.0 支持)。 strength: 编辑强度/与原图相似度(仅 OpenAI 兼容后端,可选)。 output_dir: 本地保存目录(相对路径相对于全局输出目录)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNo
maskNo
seedNo
sizeNo
imageYes
modelNo
image2No
image3No
promptYes
strengthNo
watermarkNo
output_dirNo
prompt_extendNo
negative_promptNo
response_formatNourl

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description carries the full burden and performs admirably. It discloses backend-specific limitations (mask, strength, watermark support differences), supported input formats (local path/URL/data URL), model defaults, and the output_dir saving behavior. This is rich behavioral context beyond simple tool purpose.

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?

The description is organized as a concise bullet list with each parameter on one line, packed with essential information. The front-loading of the purpose sentence and the elimination of redundant wording make it efficient for the tool's complexity.

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?

Given 15 parameters, two backend modes, and an output schema, the description is comprehensive: it covers parameter semantics, backend limitations, defaults, and input formats. The output schema exists, so return-value details are not needed. This description is highly complete for a tool of this complexity.

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%, but the description compensates by explaining every parameter (all 15) and adding constraints and defaults not present in the schema, such as mask not being supported by DashScope native API, watermark only for qwen-image-3.0, and strength only for the OpenAI-compatible backend. This fully compensates for the lack of schema descriptions.

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 it is an image-to-image / editing tool that generates new images from 1-3 reference images and edit instructions. It distinguishes itself from sibling tools like generate_image (likely text-to-image) and video tools by emphasizing the reference-image-based editing workflow.

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 provides clear context by specifying that it uses 1-3 reference images plus an edit prompt, which implies when to use it (when editing/reference images are available). However, it does not explicitly name alternatives or state when not to use it, such as when starting from text-only, which could be done with generate_image.

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/smjda0719/dsh-image-generate'

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