Skip to main content
Glama

photo_bg_remover

Background Remover — Cut out the subject and remove the background from an existing photo, producing a transparent PNG (or a solid fill color). Edits a user-supplied image; does not generate new imagery. [category: photo]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesJPG, PNG, WebP, BMP (max 20MB)
modelNoSegmentation model; u2net_human_seg is tuned for people. Invalid values fall back to u2net.u2net
bg_colorNoOptional solid background fill color. Default: transparent.
alpha_mattingNoRe-solves hair, fur and glass edges as a soft fade instead of a hard cut. Slower and uses more memory.
alpha_matting_erode_sizeNoWidth of the band around the subject that gets re-solved. Only used when edge softening is on. Values outside 0-64 are pulled back into range.
alpha_matting_background_thresholdNoHow certain a pixel must be to count as definitely background. Only used when edge softening is on. Values outside 0-255 are pulled back into range.
alpha_matting_foreground_thresholdNoHow certain a pixel must be to count as definitely the subject. Only used when edge softening is on. Values outside 0-255 are pulled back into range.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / alpha_matting
      Added value: +{
      +  "default": false,
      +  "description": "Re-solves hair, fur and glass edges as a soft fade instead of a hard cut. Slower and uses more memory.",
      +  "title": "Soften the edges",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / alpha_matting_background_threshold
      Added value: +{
      +  "default": 10,
      +  "description": "How certain a pixel must be to count as definitely background. Only used when edge softening is on. Values outside 0-255 are pulled back into range.",
      +  "maximum": 255,
      +  "minimum": 0,
      +  "type": "integer",
      +  "x-show-when": {
      +    "alpha_matting": [
      +      "true"
      +    ]
      +  }
      +}
    • addedInput schema / properties / alpha_matting_erode_size
      Added value: +{
      +  "default": 10,
      +  "description": "Width of the band around the subject that gets re-solved. Only used when edge softening is on. Values outside 0-64 are pulled back into range.",
      +  "maximum": 64,
      +  "minimum": 0,
      +  "type": "integer",
      +  "x-show-when": {
      +    "alpha_matting": [
      +      "true"
      +    ]
      +  }
      +}
    • addedInput schema / properties / alpha_matting_foreground_threshold
      Added value: +{
      +  "default": 240,
      +  "description": "How certain a pixel must be to count as definitely the subject. Only used when edge softening is on. Values outside 0-255 are pulled back into range.",
      +  "maximum": 255,
      +  "minimum": 0,
      +  "type": "integer",
      +  "x-show-when": {
      +    "alpha_matting": [
      +      "true"
      +    ]
      +  }
      +}
    • addedInput schema / properties / model / x-ui
      Added value: +{
      +  "labels": {
      +    "isnet-general-use": "Fine detail (slower)",
      +    "u2net": "Standard",
      +    "u2net_human_seg": "People and portraits"
      +  }
      +}
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=false, so the safety profile is covered, and the description correctly reinforces a non-destructive editing operation. It adds useful context beyond the annotations by specifying the output artifact (transparent PNG or solid fill), which the agent needs since no output schema exists.

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?

Two tight sentences that front-load the core action and output before the disambiguation clause. There is no filler and 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?

For a 7-parameter editing tool with no output schema, the description covers the essential output format and the fact that input is user-supplied. The individual parameters are fully documented in the schema, so the only minor gap is the absence of any mention of processing time or resource intensity for the slower matting modes.

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 seven parameters are already documented, including the model enum, thresholds, and erode size. The description's mention of 'solid fill color' loosely maps to bg_color but adds no syntax or semantic detail beyond the schema, so the baseline of 3 applies.

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 states a specific verb and resource ('Cut out the subject and remove the background from an existing photo') and names the concrete output ('transparent PNG or a solid fill color'). It also explicitly distinguishes itself from generation tools ('does not generate new imagery'), which separates it from siblings like generate_placeholder_image and photo_collage.

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?

It clarifies the key usage boundary by stating it 'Edits a user-supplied image; does not generate new imagery,' which rules out generator siblings. However, it gives no guidance on when to prefer this over adjacent editing tools such as photo_crop, photo_face_blur, or photo_editor, so the when-to-use routing is only implied.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources