Skip to main content
Glama

Search Products By Uploaded Image

products.search.image_upload
Read-only

Upload a local image or base64 string to visually search the fashion catalog. Get matching products with in-stock sizes, pricing, and verified purchase links.

Instructions

Upload a local image file (or base64 string) and search PoloPan catalog products using visual image similarity. Returns matching products with available in-stock sizes, pricing, and verified purchase URLs (https://s.polopan.com/p/{handle}).

PURPOSE & DISAMBIGUATION:

  • Performs reverse visual search by uploading a local or base64-encoded image to secure temporary storage, then querying visual embeddings.

  • Distinct from 'products.search.image_url': Use this tool when the image file is local on the user's machine or in base64 format, NOT already on a public URL.

  • Distinct from 'vision.outfit.detect_pieces': Use this tool to search for products matching a single garment, NOT for decomposing full multi-piece outfits into bounding boxes.

WHEN TO USE:

  • When a user uploads a local photo/screenshot or supplies base64 image data to find matching fashion products in the catalog.

WHEN NOT TO USE:

  • Do NOT use when the image is already accessible via a public web URL (use 'products.search.image_url').

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

BEHAVIOR & SAFETY:

  • Read-only catalog query with temporary image upload artifact (automatically expires after 'expiry_hours', default 24h).

  • Resolves MIME types automatically if not explicitly provided.

  • Enriches all returned items with verified PoloPan purchase links and stock metadata.

PARAMETERS & CONSTRAINTS:

  • 'image_path' (string, optional): Local file system path to the image file (one of image_path or image_base64 is required).

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

  • 'content_type' (string, default 'image/jpeg'): MIME type of the uploaded image (e.g. 'image/jpeg', 'image/png', 'image/webp').

  • 'expiry_hours' (integer 1-168, default 24): Temporary upload lifetime in hours before expiration.

  • 'page' (integer >= 1, default 1): Pagination page number.

  • 'page_size' (integer 1-100, default 20): Number of items per page.

  • 'sort_by' (enum, default 'relevance'): Sorting attribute ('relevance', 'price', 'title').

  • 'sort_order' (enum, default 'desc'): Sort direction ('asc' or 'desc').

  • 'gender' (string, optional): Target gender filter ('men', 'women', or 'unisex').

  • 'size' (array of strings, optional): Size filter array.

  • 'price_min' (number, optional): Minimum price threshold.

  • 'price_max' (number, optional): Maximum price threshold.

  • 'vendor' (array of strings, optional): Brand filter array.

  • 'personalize' (boolean, default false): Whether to personalize search ranking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPagination page number (1-indexed)
sizeNoArray of sizes to filter by
genderNoTarget gender filter: 'men', 'women', or 'unisex'
vendorNoList of brand names to filter by
sort_byNoSorting criteria: 'relevance', 'price', or 'title'relevance
page_sizeNoNumber of items to return per page (1 to 100, default 20)
price_maxNoMaximum price in local currency
price_minNoMinimum price in local currency
image_pathNoLocal file system path to the image file (e.g. '/path/to/dress.jpg')
sort_orderNoSort order: 'asc' or 'desc'desc
personalizeNoWhether to apply personalized ranking weights
content_typeNoMIME type of the image, e.g. 'image/jpeg', 'image/png', 'image/webp'image/jpeg
expiry_hoursNoTemporary upload URL lifetime in hours before expiration (1 to 168, default 24)
image_base64NoBase64-encoded image data string (alternative to image_path)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.5

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false, and the description adds valuable context beyond that: temporary image upload with automatic expiry, automatic MIME type resolution, and enrichment of results with verified purchase links and stock metadata. It also explains the internal mechanism of querying visual embeddings.

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 longer than average, but it is well-structured with clear headings and front-loaded with the core purpose. The parameter section partially repeats the schema, but the repetition is useful for agents because it provides a single consolidated reference for all 14 parameters.

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?

For a tool with 14 parameters, no output schema, and a non-trivial upload mechanism, this description is remarkably complete. It covers purpose, disambiguation, when to use, when not to use, behavioral side effects, return content, and every parameter. The mention of returned fields ('in-stock sizes, pricing, and verified purchase URLs') compensates for the lack of an output schema.

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?

Schema description coverage is 100%, so the schema already documents all parameters. However, the description adds a critical constraint not present in the schema: at least one of 'image_path' or 'image_base64' is required, despite both being marked optional. It also consolidates defaults and enum values in a scannable format.

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 opens with a specific verb-resource pair: 'Upload a local image file (or base64 string) and search PoloPan catalog products using visual image similarity.' It also explicitly distinguishes this tool from 'products.search.image_url' and 'vision.outfit.detect_pieces', making the tool's unique role immediately clear.

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 dedicated 'WHEN TO USE' and 'WHEN NOT TO USE' sections with explicit alternative tools: use 'products.search.image_url' for public URLs, 'products.search.text' for text-only searches, and 'vision.outfit.detect_pieces' for multi-piece outfit decomposition. This leaves no ambiguity about selection.

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