Skip to main content
Glama

Detect Fashion Pieces & Bounding Boxes

vision.outfit.detect_pieces
Read-only

Deconstruct an outfit photo into individual fashion pieces with bounding boxes and confidence scores. Use this tool to segment a full look into garments before searching for matching products.

Instructions

Deconstruct an outfit image or influencer photo into individual fashion pieces (e.g. Upper-body garment, Lower-body garment, Dress, Footwear, Bag, Headwear) with normalized bounding box coordinates and detection confidence scores.

PURPOSE & DISAMBIGUATION:

  • Computer-vision object detection tool designed to analyze multi-item outfit photographs and isolate individual garments with their spatial coordinates.

  • Distinct from 'products.search.image_url' / 'products.search.image_upload': Use this tool to segment a full outfit into pieces before querying, NOT to directly retrieve catalog search results.

  • Distinct from 'looks.curation.recommend': Use this tool for image-based piece decomposition, NOT text-based styling suggestions.

WHEN TO USE:

  • When the user provides a full-body model photo, street style snapshot, or celebrity outfit and wants to identify each individual clothing piece (jacket, top, pants, shoes, bag) to find matching products for each piece.

WHEN NOT TO USE:

  • Do NOT use when the image contains only a single standalone garment (use 'products.search.image_url' or 'products.search.image_upload' directly).

  • Do NOT use for text-only searches (use 'products.search.text').

BEHAVIOR & SAFETY:

  • Read-only and idempotent with no persistent state modifications.

  • Supports input via local file path ('image_path'), base64 string ('image_base64'), or public URL ('image_url'). Exactly one source must be provided.

  • Returns an array of detected piece objects with 'label', 'confidence' (0.0 to 1.0), and normalized 'box' coordinates [ymin, xmin, ymax, xmax].

PARAMETERS & CONSTRAINTS:

  • 'image_path' (string, optional): Local file system path to the outfit image (e.g. '/tmp/outfit.jpg').

  • 'image_base64' (string, optional): Base64-encoded image data string.

  • 'image_url' (string, optional): Public HTTP(S) URL of the image.

  • 'threshold' (number 0.05-0.95, default 0.22): Detection confidence threshold for bounding box filtering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
image_urlNoPublic HTTP(S) URL of the fashion image to deconstruct
thresholdNoConfidence threshold for object detection bounding boxes (0.05 to 0.95, default 0.22)
image_pathNoLocal file system path to the outfit image file to deconstruct
image_base64NoBase64-encoded image data string for outfit piece detection

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.5

TDQS

A4.8/5.0
Behavior5/5

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

While annotations already declare readOnlyHint and destructiveHint, the description goes further by stating the tool is 'read-only and idempotent' and specifies the input methods (image_path, image_base64, image_url) with the constraint that exactly one must be provided. It also discloses the output structure (label, confidence, box) and the threshold's range, adding valuable context beyond the annotations.

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

Conciseness4/5

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

The description is well-organized with clear sections (PURPOSE, WHEN, BEHAVIOR, PARAMETERS) and avoids redundancy. It is longer than minimal but each sentence serves a purpose, such as disambiguation and usage rules. Slight redundancy exists in the parameter explanations (schema already contains similar), but it remains focused.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (4 params, no output schema), the description is exceptionally complete. It covers purpose, disambiguation, usage rules, behavioral details, input constraints, and return format. An agent has everything needed to correctly invoke the tool without additional research.

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?

The schema already covers all parameters (100% coverage), but the description adds practical context for each, such as example paths, the meaning of threshold, and the exact-one-source constraint. It also clarifies the output format, which is not in the schema, providing extra value for parameter usage.

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 clearly states the tool's purpose: deconstructing outfit images into individual fashion pieces with bounding boxes and confidence scores. It lists the piece types (e.g., Upper-body garment, Dress, Footwear) and explicitly distinguishes it from sibling tools like products.search.image_url, making its unique role unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description provides explicit WHEN TO USE and WHEN NOT TO USE sections, detailing scenarios for multi-piece outfit images versus single garments, and contrasts it with text-based search. This directly guides the agent on when to select this tool over alternatives like products.search.image_url or looks.curation.recommend.

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