Skip to main content
Glama

remove_background

Remove backgrounds from images using advanced dichotomous image segmentation and matting, preserving smoke, gradients, and soft artifacts. Adjustable thresholds and model selection for cel-shaded or photorealistic images.

Instructions

Uses Advanced SOTA Dichotomous Image Segmentation (DIS) + Laplacian Matting to natively extract backgrounds. Perfectly preserves smoke, gradients, and soft topological artifacts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageYesAbsolute file path OR pure Base64 encoded PNG/JPG string representing the input image.
modelNo'2d' for isnet-anime (cel-shaded NFTs), '3d' for isnet-general-use (photorealistic renders).2d
fg_thresholdNoForeground alpha threshold (200-255). Higher = stricter core, preserves more smoke. Default 245.
bg_thresholdNoBackground alpha threshold (1-50). Lower = protects faint atmospheric haze. Default 10.
erode_sizeNoTrimap erosion kernel size (5-25). Larger = wider gradient calculation band. Default 15.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It reveals the technique (DIS + Laplacian Matting) and the ability to preserve smoke/gradients. However, it does not discuss edge cases, such as performance on large images or potential artifacts, but overall it provides meaningful behavioral context.

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, consisting of two sentences that front-load the technique and purpose. Every word adds value, with no waste.

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 5 parameters and an output schema, the description is fairly complete. It explains the technique and expected quality (preserving smoke/gradients). However, it could briefly mention input image constraints (e.g., formats like PNG/JPG are implied but not explicit) or what the output is (e.g., image with transparent background). With output schema present, the return value may be documented, so this is not a major gap.

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 the schema already describes each parameter thoroughly. The description adds no additional meaning beyond the schema parameter descriptions; it only provides high-level context about the technique. Baseline 3 is appropriate.

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 the tool uses advanced DIS and Laplacian Matting to extract backgrounds, specifying it preserves smoke, gradients, and soft artifacts. This is a specific verb-resource combination that distinguishes it from sibling tools, none of which perform background removal.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

While the description implies usage for background removal tasks, it does not explicitly state when to use this tool versus alternatives or when not to use it. There is no mention of prerequisites or limitations, which is a gap given the lack of annotations.

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/sailorpepe/undesirables-mcp-server'

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