Skip to main content
Glama

Masked edit: replace, remove, change material (Magic Wand AI)

luw_magic_wand

Edit only a masked area of an image by adding, replacing, or removing content, or applying a material texture. Use a black-and-white mask where white marks the area to change.

Instructions

Change only a masked area of an image. Give a prompt to add/replace what's there, remove=true to erase it, or material_image to re-surface it (e.g. new flooring or wall tiles). The mask is a black-and-white image the same size as the input; white marks the area to change. Get masks from luw_segment. Costs 1 credit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoFix for reproducible results.
imageYesImage to edit (https:// URL, local file path, or data: URI).
engineNoLuw.ai model: aria (default) or symphony (Symphony-3).
formatNoOutput image format.
promptNoWhat to put in the masked area.
removeNoRemove whatever is in the masked area.
mask_imageYesBlack/white mask, white = area to change (https:// URL, local file path, or data: URI).
enhance_promptNoLet Luw.ai's prompt enhancer expand a short prompt.
keep_structureNoPreserve the masked area's geometry/lines while changing its look (structure-guided fill).
material_imageNoMaterial/texture to apply to the masked area (https:// URL, local file path, or data: URI); luw_list_options kind="materials" has a ready-made catalog.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare destructiveHint=false and readOnlyHint=false, so the description correctly presents this as a non-destructive mutation. It adds valuable behavioral context: credit cost, mask semantics (white = area to change), and that masks come from luw_segment. Not quite a 5 because it doesn't disclose failure modes or output behavior.

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

Conciseness5/5

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

Three tight sentences with zero waste, lead with the core purpose, then the three modes, then mask semantics and credit cost. Every sentence earns its place and the most important information is front-loaded.

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 10-parameter mutation tool with no output schema, the description does well: it covers the three main modes, mask sourcing, and cost. It could say more about the interaction between modes (e.g. can prompt and material_image be combined?) and the role of keep_structure, but overall it's sufficiently complete for an agent to invoke correctly.

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 coverage is 100%, so the baseline is 3, but the description adds real value by explaining the semantics of key parameters in context: prompt for adding/replacing, remove for erasing, material_image for re-surfacing with examples. It does not cover seed, engine, format, or enhance_prompt, but those are self-documenting in the schema.

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 uses a specific verb+resource ('Change only a masked area of an image') and enumerates its three operating modes (prompt to add/replace, remove=true to erase, material_image to re-surface). This distinguishes it clearly from siblings like luw_edit_image and luw_segment.

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 provides clear when-to-use context via the three modes and directs users to luw_segment for mask sourcing, which is a useful pointer. However, it doesn't explicitly state when NOT to use it versus luw_edit_image or other edit tools, so it falls short of a 5.

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