Skip to main content
Glama

upload_mask

Upload a mask image to ComfyUI's input directory for inpainting. Extracts the alpha channel, using white areas as regions to inpaint.

Instructions

Upload a mask image to ComfyUI's input directory.

The mask is processed to extract the alpha channel for use with inpainting workflows. White areas in the mask will be inpainted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
overwriteNoOverwrite existing file. Default: false.
subfolderNoSubfolder within input directory. Default: "" (root).
image_pathYesAbsolute path to the mask image file.
original_refNoReference to the original image this mask belongs to. Default: "" (none).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description carries the full burden. It discloses meaningful behavioral details: alpha channel extraction and that white areas are inpainted. But it leaves gaps—it doesn't say whether the original file is overwritten/processed, whether overwrite flag controls file collision behavior, or what the response contains. The phrase 'processed to extract the alpha channel' is somewhat ambiguous about what exactly is stored.

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 extremely concise: two sentences that front-load the core function and then add essential context. No wasted words or repetition of schema contents.

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 the tool's moderate complexity, the presence of an output schema, and the clear purpose/behavior description, it is fairly complete for an agent to decide when to invoke it. It slightly lacks explicit guidance on when to choose `upload_image` instead, but the mask-specific processing makes the use case clear enough.

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 all parameter meanings are already in the schema. The description does not add per-parameter semantics beyond the schema; it merely provides high-level purpose. This meets the baseline but does not exceed it.

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 uses a specific verb ('Upload') and resource ('mask image to ComfyUI's input directory'), and immediately differentiates itself from the sibling `upload_image` by noting mask-specific processing for inpainting workflows. This makes the tool's 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 clearly states the intended use case ('for use with inpainting workflows') and explains the mask semantics (white areas inpainted), giving the agent enough context to choose it over generic `upload_image`. However, it does not explicitly mention alternatives or exclusion scenarios when this tool should not be used.

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/halbert04/comfyui-mcp'

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