Skip to main content
Glama

Remove an image's background

remove_background

Cut the subject out of a photo. The background becomes transparent (PNG or WebP), a solid colour if background is a hex colour like #ffffff, or the original scene blurred if it is blur. Set refine for hair, fur and other fine edges, or graphic for a logo or text on a surface. Returns a download URL valid for one hour.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "remove_background"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoDefault png. jpeg needs a background.
refineNoSharpen the cut-out's edges against the photo. Default false.
shadowNoAdd a soft drop shadow under the subject (product photos). Default false.
graphicNoThe picture is a logo or text on a surface: also cuts out the gaps inside and between letters. Not for photos. Default false.
image_urlNoPublic http(s) address of the image. Use this or image_base64.
backgroundNo"transparent" (default), "blur", or a colour such as "#ffffff".
image_base64NoThe image file's bytes, base64-encoded. Use for a local file, e.g. one in the repository.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare a non-read-only, non-destructive, non-idempotent, closed-world call, and the description adds real context beyond that: what is produced (a transparent, solid or blurred-background image), the output formats, and that the returned download URL expires after one hour. It does not cover failure modes such as invalid URLs or unsupported images, which keeps it from a 5.

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?

Three sentences with no waste. The core action is front-loaded, the background-mode behaviour follows, and the return/expiry detail is placed last where it belongs.

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 tool with no output schema, the description helpfully states the return artefact and its one-hour validity, and it explains the more consequential option flags. It omits the dual image_url/image_base64 input paths and the jpeg-plus-background constraint, but those are fully covered in the schema.

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 the schema already documents all seven parameters, including defaults and the jpeg-needs-a-background rule. The description largely restates rather than extends that, though it does usefully tie 'refine' and 'graphic' to their intended image content, which the schema also mentions. 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 opens with a concrete verb and resource, 'Cut the subject out of a photo', which is unambiguous and clearly distinct from siblings such as compress_image, convert_image and upscale_image. An agent can identify the operation 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?

It gives clear conditional guidance for choosing options: hex colour versus 'blur' for the background, 'refine' for hair and fur, and 'graphic' for a logo or text with the explicit exclusion 'Not for photos'. It stops short of routing the agent against sibling tools (for example when to choose this over inspect_image or upscale_image), so it is strong but not complete.

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