products.items.check_stock
Verify real-time live stock availability, discounted pricing, product specifications table (Fabric, Pattern, Collar, Sleeves, Fit, Care Instructions), shipping/return policies, and available size variants for a specific fashion product handle.
PURPOSE & DISAMBIGUATION:
- Real-time inventory and metadata inspection tool for a single product.
- Computes the full size-availability matrix, active pricing, discount percentage, specifications dictionary, and resolves the 1-click checkout permalink for a chosen size.
- Distinct from 'products.items.get_by_handle': Use this tool to check live stock, available sizes, formatted policies, and get size-specific checkout links; use 'products.items.get_by_handle' for raw catalog document retrieval.
- Distinct from 'checkout.links.get_direct_url': Use this tool to verify stock and sizing options; use 'checkout.links.get_direct_url' to generate a final permalink once a size is confirmed.
WHEN TO USE:
- Before presenting or confirming a product to the user, to verify whether their desired size is in-stock.
- When generating the mandatory product specifications table (Fabric, Pattern, Collar, Sleeves, Fit, Care).
- When checking return/exchange eligibility and shipping dispatch timelines.
WHEN NOT TO USE:
- Do NOT use to search across multiple catalog products (use 'products.search.text' or 'products.search.image_url').
BEHAVIOR & SAFETY:
- Read-only and idempotent with no persistent state modifications.
- Automatically maps numeric and Indian/UK/EU shoe and apparel sizes (e.g. '6' -> EU 39, 'M' -> Medium).
- Formats negative return days cleanly as 'Exchange only |X| days' (e.g. -7 -> 'Exchange only 7 days').
- Returns structured JSON with 'is_in_stock', 'available_sizes', 'out_of_stock_sizes', 'product_details', 'shipping_policy_text', and 'return_policy_text'.
PARAMETERS & CONSTRAINTS:
- 'handle' (string, required): Unique product handle identifier (e.g. 'solid-linen-shirt', 'shopify_11206').
- 'desired_size' (string, optional): Size label to verify against the variant inventory (e.g. 'M', 'L', 'XL', '32', '40').
- 'size_index' (integer >= 0, optional): Zero-based index of the size variant.
MANDATORY AGENT INSTRUCTIONS:
1. Always inform the user of available in-stock sizes, fast dispatch SLA, and return policy (Negative return days = 'Exchange only |X| days').
2. Display the product specifications table (Fabric, Pattern, Collar, Sleeves, Fit, Care).
3. Return the base link (https://s.polopan.com/p/{handle}) during browsing. Provide direct checkout link (https://s.polopan.com/p/{handle}/{size_index}) ONLY after the user's size is finalized.
products.search.text
Search PoloPan catalog products using a text keyword query with optional multi-attribute filters. Returns matching fashion items with available in-stock sizes, product specifications, shipping/return policies, discounted pricing, and verified purchase URLs (https://s.polopan.com/p/{handle}). Automatically localized to active country / 240+ destination regions.
PURPOSE & DISAMBIGUATION:
- Primary text-based catalog search tool for fashion discovery across apparel, footwear, and accessories.
- Distinct from 'products.search.image_url' / 'products.search.image_upload': Use this tool for textual queries and keyword filters, NOT for visual image search.
- Distinct from 'products.search.alternatives': Use this tool for open discovery queries, NOT for finding direct visual substitutes of a known product handle.
- Distinct from 'looks.curation.by_occasion': Use this tool to search individual products, NOT complete multi-piece outfit looks.
WHEN TO USE:
- When a user searches for clothing or fashion styles using keywords, brand names, colors, or categories (e.g. 'black leather jacket', 'floral summer midi dress', 'men linen shirts').
- When refining catalog searches with structured filters like price ranges, gender, sizes, country regions, or vendor brands.
WHEN NOT TO USE:
- Do NOT use when the user provides an image URL or image file (use 'products.search.image_url' or 'products.search.image_upload').
- Do NOT use when searching for cheaper/higher-end substitutes of a specific known product (use 'products.search.alternatives').
- Do NOT use to find curated complete occasion outfits (use 'looks.curation.by_occasion').
BEHAVIOR & SAFETY:
- Read-only and idempotent with no persistent state modifications.
- Automatically sanitizes and enriches product records with verified PoloPan short permalinks (https://s.polopan.com/p/{handle}), computed in-stock size lists, and human-readable shipping and return policy strings.
- Handles pagination and multi-attribute filtering deterministically.
PARAMETERS & CONSTRAINTS:
- 'query' (string, required): Free-text search query or style keyword (e.g. 'black linen shirt', 'oversized hoodie').
- '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).
- 'page' (integer >= 1, default 1): Pagination page number.
- 'page_size' (integer 1-100, default 20): Number of products returned per page.
- 'sort_by' (enum, default 'relevance'): Ranking criterion ('relevance', 'price', 'title').
- 'sort_order' (enum, default 'desc'): Sort direction ('asc' for ascending, 'desc' for descending).
- 'gender' (string, optional): Target demographic filter ('men', 'women', or 'unisex').
- 'size' (array of strings, optional): Size filter array (e.g. ['S', 'M', 'L', 'XL', '32', '40']).
- 'price_min' (number, optional): Minimum price threshold in local currency.
- 'price_max' (number, optional): Maximum price threshold in local currency.
- 'vendor' (array of strings, optional): List of brand or vendor names to filter by.
MANDATORY AGENT INSTRUCTIONS:
1. Always communicate available in-stock sizes, fast dispatch SLA, and return policy for each product (Negative return days = 'Exchange only |X| days').
2. When presenting or shortlisting products, display the product specifications table (Fabric, Pattern, Collar, Sleeves, Fit, Care).
3. Return the clean base link (https://s.polopan.com/p/{handle}) during browsing. Provide direct checkout link (https://s.polopan.com/p/{handle}/{size_index}) ONLY after the user's size is finalized.