Skip to main content
Glama

Benchline

Remove a solid image background

remove_background
Read-onlyIdempotent

Remove a solid or near-solid background by flood-filling from the border. color is an optional #rrggbb. The portrait model runs in the browser, not in this handler: MODNet is Apache-2.0, RMBG-1.4 is non-commercial, and the ONNX runtime is too large for the serverless function. Send base64 or a public URL. Private addresses are refused and the decoded file is capped at 10 MB. Returns a PNG as base64.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesThe image. Provide url or data.
colorNoBackground color as #rgb or #rrggbb. Blank samples the corners.
featherNo
toleranceNoHow far a border pixel may be from the background color, in RGB distance.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesPNG with transparency as base64.
mimeYes
noteYes
bytesYes
widthYes
heightYes
methodYes
filenameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld, so the safety profile is covered; the description adds genuinely new behavioral facts: the SSRF guard, the 10 MB decoded cap, the base64 PNG return format, and an explanation of why portrait segmentation is not available server-side. Some of this (10 MB cap, private addresses) restates the schema, which keeps it out of the top band.

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?

Purpose and mechanism are front-loaded in the first sentence, followed by parameters, constraints, and return format in a logical order. The license digression about MODNet/RMBG/ONNX is slightly verbose but earns its place by justifying the solid-background-only scope.

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 4-parameter image tool with an output schema, the description covers accepted input forms, size and address limits, algorithm scope, and return encoding. The only meaningful gap is that 'feather' is never mentioned in either the description or the schema, leaving one parameter's effect unexplained.

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?

With 75% schema description coverage, the baseline is 3. The description adds the format of 'color' (as '#rrggbb', which is actually narrower than the schema's '#rgb or #rrggbb') but says nothing about feather's behavior or tolerance's defaults, both of which the schema already documents.

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?

States a specific verb and resource ('remove a background') plus the exact mechanism ('flood-filling from the border') and the input class it targets ('solid or near-solid'). That mechanism distinguishes it cleanly from image siblings like crop_image, resize_image, or convert_image without needing to open their schemas.

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 line 'The portrait model runs in the browser, not in this handler' implicitly rules out portrait/subject segmentation and routes that case elsewhere, and 'Send base64 or a public URL' plus the private-address refusal tells the agent which input forms work. It stops short of naming an explicit alternative tool or stating the inverse condition directly, so it is strong context rather than a complete when/when-not rule.

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