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

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. Changed17 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"
    • 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
  2. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds genuine context beyond that: the image is copied to secure temporary storage that expires after expiry_hours (default 24h), MIME types are auto-resolved, and results are enriched with verified purchase links and stock metadata. It doesn't cover failure modes (e.g. unsupported format, oversized upload), so not a 5.

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?

Front-loaded and organized under clear headers, with the disambiguation placed early. However, the 'PARAMETERS & CONSTRAINTS' block largely duplicates the schema descriptions (country, expiry_hours, content_type, mode repeated near-verbatim), adding length without new information.

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 16-parameter, zero-required tool with no output schema, the description is complete: it names the return shape (matching products with in-stock sizes, pricing, verified purchase URLs), explains localization to the active country/240+ regions, and documents every parameter group. An agent has everything needed to call it correctly.

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 coverage is 100%, so baseline would be 3, but the description adds real meaning the schema does not enforce: it states that one of image_path or image_base64 is required (the schema marks zero required params, so this constraint lives only here). It also clarifies country accepts currency/city aliases and the upload-expiry semantics of expiry_hours. The remaining params largely restate the schema.

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 ('search PoloPan catalog products using visual image similarity' from an uploaded file/base64) and explicitly disambiguates from the two closest siblings: products.search.image_url (URL vs local/base64) and vision.outfit.detect_pieces (single garment vs full outfit). An agent can pick the correct tool 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 Guidelines5/5

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

Has explicit WHEN TO USE and WHEN NOT TO USE sections that name the alternative tool for each excluded case (image_url for public URLs, products.search.text for text-only). The condition selecting this tool (local file or base64 data) is stated unambiguously.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources