Skip to main content
Glama

remove_object

AI: removes an object and fills in the background (AI). Say what to remove with word (e.g. "dog", "sign"; the server finds it), box [x1,y1,x2,y2] in image pixels, or channel (an existing selection channel, e.g. from any selection tool). The server grows the object's mask a little (grow_px, default about 0.5% of the object's long side, at most 50), cuts out a square of the photo around it at full resolution, has the AI fill the hole, and adds the result as a NEW layer "Removed: ..." directly above the layer it was cut from (the top of the stack when no layer is given), covering only the filled area. Nothing else is changed: delete that layer to undo. Check the result with preview or compare. The AI is shown a square of the photo around the object (about 2x its long side, at most 4000 px), so large objects work. One is refused before anything is sent when it is longer than that square allows, or when its hole would be more than a quarter of what the AI works on (an object that fills most of the photo): select a smaller part, or remove it in pieces. Takes about 5 to 15 s (longer the first time). Do NOT use for small blemishes or dust (retouch spot_heal is faster).

Input Schema

NameRequiredDescriptionDefault
boxNoThe object's box [x1, y1, x2, y2] in image pixels.
wordNoWhat to remove, e.g. "dog" or "red car". Letters, digits, spaces.
imageYesImage id, as returned by open_photo.
layerNoWork on this layer alone (and add the fill directly above it), not the whole picture.
channelNoAn existing selection channel that holds the object; it is left untouched.
grow_pxNoPixels to grow the object's mask before filling, so its edge and shadow go too. Default: about 0.5% of the object's long side.
layer_idNoLayer id (takes priority over `layer`).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say readOnly=false, destructiveHint=false, idempotent=false, openWorld=true. The description goes well beyond: it discloses that a NEW layer is created, that deleting that layer undoes the operation (non-destructive in practice, consistent with destructiveHint=false), the 5-15s runtime, and two pre-flight refusal conditions (object larger than the AI's square, or hole exceeding a quarter of the AI's working area).

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?

Information-dense and front-loaded: purpose, target specification, mechanics, undo, verification, limits, and exclusions in that order. It is a long single block, and a couple of clauses (mask-growth arithmetic, preview/compare) could be tightened, but essentially every sentence carries decision-relevant content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter mutation tool with no output schema, the description covers everything an agent needs: how to target the object, where the result lands, how to undo, how long it takes, failure/refusal conditions, and when not to use it. Nothing material is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description adds interaction semantics the schema cannot: the three target-specification routes are alternatives, the server resolves `word` itself, and the new layer is placed directly above the cut layer 'the top of the stack when no `layer` is given'. It also clarifies grow_px's default rationale (0.5% of long side, max 50).

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 specific verb+resource ('removes an object and fills in the background') and immediately names the AI-based mechanism, distinguishing it from siblings like retouch and fill. It also names the alternative (retouch spot_heal) for the small-blemish case, so an agent can route without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states explicitly how to specify the target (word/box/channel), when to prefer each, and a clear negative case: 'Do NOT use for small blemishes or dust (retouch spot_heal is faster).' It also tells the agent how to verify the result (preview or compare), which is genuine usage guidance rather than restated mechanics.

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