Skip to main content
Glama

remove_background

Remove the background from an image and return a transparent RGBA cutout. Upload the source image first, then provide the filename to process.

Instructions

Remove an image's background, returning a transparent (RGBA) cutout — the high-level entry point. Builds a LoadImage → BiRefNetRMBG → SaveImage workflow using the ComfyUI-RMBG (BiRefNet) matting node and enqueues it on your LOCAL GPU. Upload the source first with upload_image (or stage a prior output with stage_output_as_input), then pass its filename. Requires the ComfyUI-RMBG custom node (pack: wan-transparent, or install_custom_node 'comfyui-rmbg'); the BiRefNet model auto-downloads on first run. If the node isn't installed, returns an actionable error telling you how to install it. Returns prompt_id immediately; the cutout asset_id arrives in the completion notification.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesFilename of the source image in ComfyUI's input dir (upload it first with upload_image)
modelNoBiRefNet matting model (default 'BiRefNet_toonout'; auto-downloaded by ComfyUI-RMBG)
filename_prefixNoOutput filename prefix (default 'ComfyUI_cutout')
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool builds a workflow, enqueues on local GPU, returns prompt_id immediately, and delivers the cutout asset_id in a completion notification. It also notes auto-downloading of the BiRefNet model and actionable error messages if dependencies are missing.

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 a single paragraph of five sentences, well-structured with purpose, workflow, prerequisites, dependencies, error handling, and return information. Every sentence adds value without redundancy.

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?

Despite lacking an output schema, the description fully explains return values (immediate prompt_id, later asset_id), prerequisites, dependencies, and error behavior. For a specific image processing tool with moderate complexity, the description is complete and self-contained.

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 adds minor context beyond the schema, such as clarifying that the image filename must be uploaded first, but otherwise the schema already describes the parameters sufficiently (e.g., default values, auto-download behavior).

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 'Remove an image's background, returning a transparent (RGBA) cutout' with a specific verb and resource. It distinguishes itself from siblings by calling itself the 'high-level entry point' and referencing prerequisites like upload_image and stage_output_as_input, which are separate sibling tools.

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 on when to use the tool (background removal) and prerequisites (upload source first or use stage_output_as_input). It also explains dependencies (ComfyUI-RMBG node) and error handling. However, it does not explicitly state when not to use this tool or mention direct alternatives, though no direct alternatives exist in 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/artokun/comfyui-mcp'

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