Skip to main content
Glama

remove_background

Cuts the subject out of a layer using color-based flooding or AI segmentation, creating a transparency mask, erasing the background, or selecting the subject.

Instructions

Cut the subject out of a layer. mode: mask (non-destructive transparency mask, default), erase, or select (just select the subject). method: color (local, no AI: floods the plain background in from the image border, within tolerance of the border colour or of color), ai (a segmentation model via stability / replicate / fal / a1111 with the rembg extension), auto (ai if a capable backend answers, else color).

Input Schema

NameRequiredDescriptionDefault
modeNomask
colorNo
layerNo
modelNo
methodNoauto
backendNo
featherNo
toleranceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does substantial work: it distinguishes non-destructive output (mask is a 'non-destructive transparency mask') from erase and select, and discloses the external-service dependency of the ai method plus the auto fallback. It stops short of stating that erase is irreversible or what happens when no capable backend is configured and method is forced to ai.

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?

Front-loaded with the core action, then the two option dimensions in a compact labeled form ('mode: ... method: ...'). It is a single dense block with no wasted words, though the parenthetical nesting makes it slower to scan than a short bulleted enumeration would be.

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?

For an 8-parameter tool with zero annotations and no output schema, the description covers the interesting dimensions (mode, method, backend) well but leaves layer targeting, feathering, and model selection entirely implicit, and says nothing about what the tool returns or how failures surface. Adequate to call correctly in the common case, incomplete for the parameter surface it exposes.

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 0% across 8 parameters, so the description must compensate and only partly does: it defines `mode` values, `method` values, `tolerance` (as proximity to border colour or `color`), `color`, and implies `backend`. It never mentions `layer` (which layer is targeted), `feather`, or `model`, leaving three parameters undefined in both schema and description.

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 opening clause 'Cut the subject out of a layer' gives a specific verb and resource that no sibling tool (crop_image, flatten_image, modify_selection) duplicates. The rest of the sentence then enumerates the three concrete modes, so the agent knows exactly what operation family this is without opening the schema.

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 gives real selection guidance between the three methods, including a decision rule: 'auto (ai if a capable backend answers, else color)', and flags that color is 'local, no AI'. It also documents which backends satisfy the ai path (stability / replicate / fal / a1111 with rembg). It lacks explicit when-not-to-use guidance relative to sibling operations like crop_image or set_selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.