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 applying a prompt, removing existing content, or re-surfacing it with a material image; white in the mask marks the area to change.

Instructions

Luw.ai Magic Wand AI: 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.

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>",
      "mask_image": "<mask_image>"
    },
    "name": "luw_magic_wand"
  }
}

Input Schema

NameRequiredDescriptionDefault
imageYesImage to edit (public https:// link or data: URI; the local npx server also accepts a file path).
engineNoLuw.ai model: symphony (Symphony-3, the default: the higher quality) or aria (quicker, for everyday work). If the user picked a model earlier in this conversation, use that one.symphony
promptNoWhat to put in the masked area.
removeNoRemove whatever is in the masked area.
mask_imageYesBlack/white mask, white = area to change (public https:// link or data: URI; the local npx server also accepts a file path).
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 (public https:// link or data: URI; the local npx server also accepts a file path); luw_list_options kind="materials" has a ready-made catalog.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.20
    • addedInput schema / properties / engine / default
      Added value: +"symphony"
    • changedInput schema / properties / engine / description
      Previous value: -"Luw.ai model: aria (default) or symphony (Symphony-3)."New value: +"Luw.ai model: symphony (Symphony-3, the default: the higher quality) or aria (quicker, for everyday work). If the user picked a model earlier in this conversation, use that one."
  2. Changed5 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: -"Image to edit (https:// URL, local file path, or data: URI)."New value: +"Image to edit (public https:// link or data: URI; the local npx server also accepts a file path)."
    • changedInput schema / properties / mask_image / description
      Previous value: -"Black/white mask, white = area to change (https:// URL, local file path, or data: URI)."New value: +"Black/white mask, white = area to change (public https:// link or data: URI; the local npx server also accepts a file path)."
    • changedInput schema / properties / material_image / description
      Previous value: -"Material/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."New value: +"Material/texture to apply to the masked area (public https:// link or data: URI; the local npx server also accepts a file path); luw_list_options kind=\"materials\" has a ready-made catalog."
    • removedInput schema / properties / seed
      Removed value: -{
      -  "description": "Fix for reproducible results.",
      -  "maximum": 9007199254740991,
      -  "minimum": 0,
      -  "type": "integer"
      -}
  3. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=false, openWorldHint=true, and non-idempotency; the description adds context annotations cannot: a credit cost of 1 and the exact mask contract the operation depends on. It omits whether the call returns an image directly or requires polling via luw_get_result, which is a real gap for a generative tool.

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?

Four tight sentences, front-loaded with the core action, then mode mapping, then the mask contract, then cost. Nothing is redundant and no sentence could be dropped without losing information.

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?

Covers the essentials for an 8-parameter generative tool: required inputs, mask semantics, mode selection, upstream mask source, and cost. The remaining omission is result handling — no output schema exists and the description never says whether output is immediate or asynchronous.

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%, so the schema already documents every parameter including the mask convention. The description adds modest value by framing prompt/remove/material_image as mutually exclusive intents and giving concrete material examples (flooring, wall tiles), but the rest is repetition of schema text.

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 — 'change only a masked area of an image' — and immediately enumerates the three operation modes (prompt to add/replace, remove=true to erase, material_image to re-surface). Combined with the mask definition, an agent can distinguish this from generic editing or removal siblings without opening the schema.

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?

Gives clear mode-selection guidance (prompt vs remove vs material_image) and routes mask creation to luw_segment, which is the key upstream step. It does not say when to prefer this over luw_edit_image or luw_remove_furniture, so the sibling comparison is incomplete.

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