Skip to main content
Glama

erase

cli_erase

Erase logos, watermarks, or objects from images and videos by inpainting specified box regions, including tracked moving marks across frames.

Instructions

Erase arbitrary region(s) from an image or video via inpainting.

Universal and position-agnostic: removes any logo / watermark / object inside
the boxes you pass, regardless of color or location. Runs on CPU. Use this
for marks the dedicated ``visible`` registry does not cover.

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": {
      "source": "<source>",
      "regions": "<regions>"
    },
    "name": "cli_erase"
  }
}

Input Schema

NameRequiredDescriptionDefault
trackNoTrack moving watermark/object box(es) across video frames from the starting frame.
dilateNoGrow the box by this many px before inpainting.
framesNoInclusive 0-based START:END frame range when erasing a video clip.
outputNoOutput path (default: <source>_clean.<ext>).
sourceYessource
as_jsonNoEmit JSON output when erasing video.
backendNoInpaint backend. cv2: instant, no model download. migan: light ONNX MI-GAN, ~1 GB RAM, near-LaMa quality (extra 'migan'). lama: big-LaMa, best quality but ~4.7 GB RAM (extra 'lama').cv2
regionsYesx,y,w,h box to erase (repeatable).
inpaint_methodNocv2 inpaint method.telea
strip_metadataNoStrip AI metadata from output.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.64.0
    • addedInput schema / properties / as_json
      Added value: +{
      +  "description": "Emit JSON output when erasing video.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / backend / enum
      Previous value: -[
      -  "cv2",
      -  "migan",
      -  "lama"
      -]New value: +[
      +  "auto",
      +  "cv2",
      +  "migan",
      +  "lama"
      +]
    • addedInput schema / properties / frames
      Added value: +{
      +  "description": "Inclusive 0-based START:END frame range when erasing a video clip.",
      +  "type": "string"
      +}
    • addedInput schema / properties / track
      Added value: +{
      +  "description": "Track moving watermark/object box(es) across video frames from the starting frame.",
      +  "type": "boolean"
      +}
  2. Addedv0.58.1

TDQS

A3.6/5.0
Behavior3/5

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

The only annotation is openWorldHint=false, so the description carries most of the burden; it does add useful behavior like CPU execution and a universal/position-agnostic scope. However, it never states whether the source file is modified or only a new file is written, what happens on failure, or any cost/latency beyond the backend notes that live in the schema.

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?

Three short sentences with the core action front-loaded and the routing hint second; no filler. The line break in the middle of the second sentence is cosmetic, not a structural problem.

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 10-parameter, image/video mutation tool with no output schema, the description covers what it does and when, and the schema covers the parameters in depth. It is still thin on the write/overwrite consequences and on what the produced output looks like, which matters for an inpainting tool that emits a new file.

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% and the enum/backend tradeoffs, dilate, frames, track and output defaults are all documented in the schema itself. The description adds only loose phrasing ('the boxes you pass'), which implies the regions parameter but contributes no new semantics; baseline 3 applies when the schema does the heavy lifting.

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?

The description gives a specific verb and resource ('Erase arbitrary region(s) from an image or video via inpainting') and states the mechanism, so the operation is unambiguous. It partially differentiates itself by pointing at the dedicated 'visible' registry as the path for covered marks, but never mentions the sibling cli_video_erase, leaving one obvious overlap unresolved.

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 a positive routing rule: use this when the mark is not handled by the dedicated 'visible' registry, and stresses that it is position-agnostic and color-independent, which frames the use case well. It stops short of an explicit exclusion (e.g., when to prefer cli_video_erase or cli_invisible), so the agent must still infer the boundary for video-specific work.

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