Skip to main content
Glama

編集結果のマスク領域だけを土台へ貼る

compose_region

Composite an edited mask region onto a stable base image to swap facial features without moving the face, preserving the base exactly.

Instructions

edit_image の結果からマスク領域だけを切り出し、土台画像へ合成する。土台はビット単位で保たれるので、口の形や目の開閉を差し替えても顔が動かない。アバターの差分絵を作るなら必ずこれを通す。境界のぼかしは内側にだけ入る(単純にぼかすとマスクの外へ滲んで土台を汚すため)。numpy があれば土台の汚れを自動検証する。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
featherNo境界のぼかし。既定5
out_pathYes保存先のパス(.png)
src_pathYesedit_image の出力
base_pathYes土台(顔を固定する1枚)
mask_pathYes編集領域マスク(透明=貼る所)
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 discloses notable behaviors: base is preserved bit-wise ('土台はビット単位で保たれる'), blur is applied only inside the mask ('境界のぼかしは内側にだけ入る'), and it auto-verifies base contamination if numpy is available ('numpy があれば土台の汚れを自動検証する'). It does not detail failure modes, but the disclosed behaviors go well beyond the name.

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?

Four sentences, no wasted words. The first sentence states the core function, followed by use-case, a caveat about blur, and a note about validation. Every sentence earns its place.

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

Completeness4/5

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

Given no annotations and no output schema, the description covers the main aspects: purpose, use case, key behaviors, and edge-case handling (blur direction). It does not mention return values or error behavior, but for a compositing utility the provided context is sufficient for an agent to select and invoke it.

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 100%, so each parameter already has a description. The description adds relationships between parameters (e.g., src_path is 'edit_image の出力', base_path is the fixed face) and explains the feather behavior (blur only inside), which enhances the meaning of the feather parameter. It scores above baseline 3 due to this cross-referencing.

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 a specific verb+resource: 'edit_image の結果からマスク領域だけを切り出し、土台画像へ合成する' (cut out only the masked area from edit_image result and composite onto base). It distinguishes from siblings by explaining the compositing role and even gives a concrete use case: 'アバターの差分絵を作るなら必ずこれを通す' (if making avatar diff images, be sure to use this).

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 explicitly tells when to use the tool ('アバターの差分絵を作るなら必ずこれを通す'), and implies that it is the step after edit_image. It does not explicitly list alternatives or when-not-to-use, but the context is clear enough that it is the compositing step among the sibling tools.

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