Skip to main content
Glama

Remove or replace background

luw_background

Remove backgrounds from product or object photos to create transparent PNGs, or use a prompt to place the cutout in a generated marketing scene.

Instructions

Luw.ai Change Background: cut out a product/object from its background (transparent PNG) — or, with a prompt, place it in a new generated scene for marketing shots ("on a marble kitchen counter, morning light"). Omit prompt to just remove the background. Costs 1 credit.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "image": "<image>"
    },
    "name": "luw_background"
  }
}

Input Schema

NameRequiredDescriptionDefault
imageYesProduct or object photo (public https:// link or data: URI; the local npx server also accepts a file path).
engineNoLuw.ai model: aria (default) or symphony (Symphony-3).
promptNoNew background to generate. Leave empty to remove the background.
enhance_promptNoLet Luw.ai's prompt enhancer expand a short prompt.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.18
    • removedInput schema / properties / format
      Removed value: -{
      -  "description": "Output image format.",
      -  "enum": [
      -    "jpg",
      -    "png",
      -    "webp"
      -  ],
      -  "type": "string"
      -}
    • changedInput schema / properties / image / description
      Previous value: -"Product or object photo (https:// URL, local file path, or data: URI)."New value: +"Product or object photo (public https:// link or data: URI; the local npx server also accepts a file path)."
  2. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare safety/mutation flags; the description adds material context beyond them: the output is a transparent PNG, the cost is 1 credit, and prompt presence switches between removal and generation. It does not cover auth requirements, latency, or whether results are polled via luw_get_result, so it stops short of full transparency.

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?

The core capability is front-loaded in one sentence, with the cost note trailing. The inline example prompt is helpful but makes the sentence dense; overall it is efficient with no filler.

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 generation tool with no output schema, the description adequately covers inputs, the two output modes, and cost. The only notable omission is what the caller receives back (URL vs. job handle) and whether polling is required.

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 documents image, engine, prompt, and enhance_prompt, including the 'leave empty to remove the background' rule. The description reinforces the prompt semantics and gives an example prompt style, but adds little that the schema does not already say.

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 concrete verb plus resource ('cut out a product/object from its background') and explicitly covers the two operating modes (transparent PNG cutout vs. generated scene). The behavior is distinct from siblings like luw_edit_image or luw_remove_furniture without needing to name them.

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 gives a clear mode-selection rule ('Omit prompt to just remove the background' vs. supply a prompt to generate a scene), which is genuinely useful. However, there is no guidance on when to pick this over adjacent tools such as luw_edit_image or luw_remove_furniture, so alternative selection is left to inference.

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