Segment objects into masks (Segment AI)
luw_segmentDetect objects in a photo and return black-and-white mask image URLs for all objects or only those named in a prompt, so you can edit exact areas in Luw design tools.
Instructions
Luw.ai Segment AI: detect objects in a photo and return black-and-white masks as image URLs — every object (wall, floor, sofa, …) or only what you describe in prompt. Feed a mask URL into luw_magic_wand or luw_landscape_design to edit exactly that area. 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_segment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | Photo to segment (public https:// link or data: URI; the local npx server also accepts a file path). | |
| labels | No | Keep only masks whose label contains one of these words (e.g. ["floor", "wall"]). | |
| prompt | No | What to segment, e.g. "walls", "the sofa", "lawn". Omit to segment everything. |