Skip to main content
Glama

Segment objects into masks (Segment AI)

luw_segment

Detect objects in a photo and return black-and-white masks as image URLs to edit exactly those areas with other tools.

Instructions

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

TableJSON 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 already declare the safety profile (destructiveHint=false, openWorld=true, idempotentHint=false), so the bar is lower. The description adds genuinely useful context annotations cannot carry: the cost ('Costs 1 credit') and the output artifact shape ('black-and-white masks as image URLs'). It does not say whether repeated calls return identical masks, which matters given idempotentHint=false.

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, front-loaded with what the tool produces, followed by the downstream chaining instruction and the cost. No filler or repetition of the title.

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 takes on the burden of describing the return value (image URLs of B&W masks), plus cost and chaining behavior. It is nearly complete for a 3-parameter generative tool; only edge behavior (e.g. what happens when no object matches prompt) is unstated.

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 coverage is 100%, so all three parameters are already documented in the schema, including prompt's 'Omit to segment everything' semantics. The description paraphrases the prompt parameter but adds no syntax, format, or interaction detail beyond what the schema provides, so baseline 3 applies.

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 ('Detect objects in a photo and return black-and-white masks as image URLs') and distinguishes itself from siblings by naming the downstream tools that consume its output. An agent can tell this apart from luw_edit_image or luw_generate_image without opening any 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 onward ('Feed a mask URL into luw_magic_wand or luw_landscape_design to edit exactly that area') and clarifies the two modes (segment everything vs. only what prompt describes). It stops short of stating when NOT to use this tool or what alternatives exist for non-mask segmentation needs.

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