Skip to main content
Glama

Segment objects into masks (Segment AI)

luw_segment

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.

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.

Input Schema

NameRequiredDescriptionDefault
imageYesPhoto to segment (https:// URL, local file path, or data: URI).
labelsNoKeep only masks whose label contains one of these words (e.g. ["floor", "wall"]).
promptNoWhat to segment, e.g. "walls", "the sofa", "lawn". Omit to segment everything.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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 cover the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=true), so the bar is lower, and the description still adds real value: the return format (black-and-white mask image URLs) and the cost ('Costs 1 credit'). It does not say whether the call is synchronous or requires polling via luw_get_result, which is a notable gap for a generation 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?

Three compact clauses with zero waste: what it does, the two segmentation modes, the downstream handoff, and the credit cost. The key capability and the routing hint are 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?

With no output schema, the description correctly explains the return value (mask image URLs) and adds cost. However, for an openWorld, non-idempotent generation tool it omits execution semantics such as latency/async result retrieval and how labels interacts with prompt.

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 image, labels, and prompt, including the 'omit to segment everything' behavior. The description only restates the prompt's effect and never mentions the labels filter, adding little beyond the schema — baseline 3 is correct.

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+resource+output: 'detect objects in a photo and return black-and-white masks as image URLs', and clarifies the two modes (all objects vs. prompt-described objects). This clearly distinguishes it from sibling edit/render tools 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 Guidelines4/5

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

Explicitly routes the agent forward: 'Feed a mask URL into luw_magic_wand or luw_landscape_design to edit exactly that area', naming concrete downstream alternatives. It lacks an explicit 'when not to use this' clause (e.g. vs. luw_background or luw_remove_furniture), 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.