Skip to main content
Glama

remove_image_background

Remove the background from an image

Cut the subject (person, product, animal, object) out of a photo and return it on a transparent background as png (default), webp or avif. Optional q (1-100) for webp/avif. Runs a segmentation model (U2Net) on CPU: expect a few seconds per image, not milliseconds. Not available in pipeline.

Responses:

200: Processed image binary (Success Response) Content-Type: application/json Content-Type: image/jpeg

Example Response:

"string"

Content-Type: image/png

Example Response:

"string"

Content-Type: image/webp

Example Response:

"string"

Input Schema

NameRequiredDescriptionDefault
qNoQuality (1-100) for webp and avif. Ignored for png, which is lossless. Omit to use the encoder default.
formatNoOutput format: png (default), webp or avif. All three keep the transparency; jpeg is not offered because it has none.png
sourceYesImage source: a public URL (https://...) or a base64-encoded string (optionally as a data URI like data:image/png;base64,...).
deliveryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it names the model (U2Net), the execution environment (CPU), the expected latency ('a few seconds per image, not milliseconds'), and the transparency-preserving output formats. It omits the asynchronous delivery modes (put_url / callback_url) and any auth or cost context, keeping it below 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening two sentences are tight and front-loaded with the key facts. But the appended OpenAPI-style '### Responses' block with repeated 'Example Response: "string"' entries for three content types is pure boilerplate noise that dilutes the useful content.

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 a 4-parameter tool with no annotations and no output schema, the description covers output type, formats and performance well. The significant gap is the delivery parameter's three modes (inline, put_url presigned upload, callback_url with HMAC signing) – a complex behavior surface left entirely to the schema, which matters for async/large jobs.

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 75%, so the schema already documents source, format, q and the delivery union in detail. The description only restates 'png (default), webp or avif' and 'optional q (1-100)', adding essentially no meaning beyond the schema, and never mentions the delivery parameter. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('remove the background from an image') and clarifies the output (subject cut out on a transparent background), which clearly separates it from siblings like crop_image or convert_image. It does not name an alternative sibling directly, so it stops short of a 5.

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?

Usage is implied by the description of what segmentation does (people, products, animals, objects) and by the exclusion 'Not available in pipeline', which routes the agent away from image_pipeline. However, there is no explicit when-to-use / when-not-to-use against the other image siblings or any stated prerequisites.

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