Skip to main content
Glama

Check Live Variant Stock, Product Details & Sizing

products.items.check_stock
Read-only

Check real-time stock, available sizes, pricing, and shipping/return policies for a specific fashion product by handle, and verify if a desired size is in-stock.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
handleYesUnique product handle identifier (e.g. 'solid-linen-shirt', 'shopify_11206')
size_indexNoZero-based index of the specific size variant to inspect
desired_sizeNoOptional size query to verify against variant inventory (e.g. 'M', 'L', 'XL', '32', '40')

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?

Beyond annotations (readOnlyHint=true, destructiveHint=false), the description adds significant behavioral context: it mentions automatic size mapping (e.g., '6' -> EU 39), formatting of negative return days as 'Exchange only |X| days', and the structured JSON response fields (e.g., 'is_in_stock', 'available_sizes'). This goes far beyond the annotations by detailing the tool's internal logic and output format.

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-structured with clear section headers, making it easy to scan. However, it is quite lengthy; the 'MANDATORY AGENT INSTRUCTIONS' section could be seen as duplicative of other sections, but it does provide actionable directives that might be considered essential. Overall, it is organized and front-loaded with the core purpose, but could be trimmed slightly for conciseness.

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 a relatively complex tool with three parameters, no output schema, and annotations that only cover read-only behavior, the description is comprehensive. It covers the tool's purpose, usage, behavioral nuances, parameter semantics, and even provides mandatory instructions for the agent. There is no significant missing information that would hinder an agent from selecting and using the tool 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?

Although the schema already documents all three parameters with 100% coverage, the description adds semantic clarity by explaining the purpose of each parameter in the context of the tool's operation. For example, it clarifies that 'handle' is a unique product identifier, 'desired_size' is to verify against inventory, and 'size_index' is a zero-based index. It also hints at the relationship between 'size_index' and the checkout link structure, enriching understanding beyond 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?

The description clearly states the tool's purpose: verify real-time stock, pricing, specifications, policies, and size variants for a single product handle. It explicitly distinguishes itself from 'products.items.get_by_handle' (raw catalog retrieval) and 'checkout.links.get_direct_url' (final permalink generation), 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?

It provides explicit 'WHEN TO USE' and 'WHEN NOT TO USE' sections, detailing specific scenarios like verifying stock before presenting a product, generating the specifications table, and checking return policies. It also names alternative tools for searching across multiple products, giving clear exclusion criteria.

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