Skip to main content
Glama

Search Products By Uploaded Image

products.search.image_upload
Read-only

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}). Automatically localized to active country / 240+ destination regions.

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.

  • 'country' (string, optional): Target country name, city, currency, or ISO-2 code (e.g. 'US', 'United States', 'UK', 'Dubai', 'CA', 'IN'). Defaults to active saved region.

  • 'mode' (enum, optional): Catalog mode: 'global' (ships to country) or 'local' (domestic only).

  • '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
modeNoCatalog mode: 'global' (ships to country) or 'local' (domestic only). Defaults to active saved region.
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
countryNoCountry name, city, currency, or 2-letter ISO code (e.g. 'US', 'United States', 'UK', 'Dubai', 'CA', 'IN'). Defaults to active saved region.
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. Changed16 schema fields changed
    • changedInput schema / properties / content_type / description
      Previous value: -"MIME type of the image, e.g. 'image/jpeg', 'image/png'"New value: +"MIME type of the image, e.g. 'image/jpeg', 'image/png', 'image/webp'"
    • addedInput schema / properties / country
      Added value: +{
      +  "description": "Country name, city, currency, or 2-letter ISO code (e.g. 'US', 'United States', 'UK', 'Dubai', 'CA', 'IN'). Defaults to active saved region.",
      +  "type": "string"
      +}
    • changedInput schema / properties / expiry_hours / description
      Previous value: -"Temporary upload URL lifetime in hours"New value: +"Temporary upload URL lifetime in hours before expiration (1 to 168, default 24)"
    • changedInput schema / properties / gender / description
      Previous value: -"Target gender filter"New value: +"Target gender filter: 'men', 'women', or 'unisex'"
    • changedInput schema / properties / image_base64 / description
      Previous value: -"Base64-encoded image data string"New value: +"Base64-encoded image data string (alternative to image_path)"
    • changedInput schema / properties / image_path / description
      Previous value: -"Local file system path to the image file"New value: +"Local file system path to the image file (e.g. '/path/to/dress.jpg')"
    • addedInput schema / properties / mode
      Added value: +{
      +  "description": "Catalog mode: 'global' (ships to country) or 'local' (domestic only). Defaults to active saved region.",
      +  "enum": [
      +    "global",
      +    "local"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / page / description
      Previous value: -"Page number for pagination"New value: +"Pagination page number (1-indexed)"
    • changedInput schema / properties / page_size / description
      Previous value: -"Number of items to return per page"New value: +"Number of items to return per page (1 to 100, default 20)"
    • changedInput schema / properties / personalize / description
      Previous value: -"Whether to personalize search ranking"New value: +"Whether to apply personalized ranking weights"
    • changedInput schema / properties / price_max / description
      Previous value: -"Maximum price"New value: +"Maximum price in local currency"
    • addedInput schema / properties / price_max / minimum
      Added value: +0
    • changedInput schema / properties / price_min / description
      Previous value: -"Minimum price"New value: +"Minimum price in local currency"
    • addedInput schema / properties / price_min / minimum
      Added value: +0
    • changedInput schema / properties / sort_by / description
      Previous value: -"Sorting criteria"New value: +"Sorting criteria: 'relevance', 'price', or 'title'"
    • changedInput schema / properties / vendor / description
      Previous value: -"List of brand names"New value: +"List of brand names to filter by"
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "products": {
      -      "description": "Matching products",
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "handle": {
      -            "description": "Product handle",
      -            "type": "string"
      -          },
      -          "price": {
      -            "description": "Price",
      -            "type": "number"
      -          },
      -          "title": {
      -            "description": "Product title",
      -            "type": "string"
      -          },
      -          "url": {
      -            "description": "Purchase link",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "handle",
      -          "title",
      -          "price",
      -          "url"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "uploaded_image_url": {
      -      "description": "Temporary URL of the uploaded image",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "uploaded_image_url",
      -    "products"
      -  ],
      -  "type": "object"
      -}New value: +null
  3. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.