Skip to main content
Glama

Check Live Variant Stock, Product Details & Sizing

products.items.check_stock
Read-only

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

NameRequiredDescriptionDefault
handleYesUnique product handle identifier (e.g. 'solid-linen-shirt', 'shopify_11206')
countryNoCountry name, city, currency, or 2-letter ISO code (e.g. 'US', 'United States', 'UK', 'Dubai', 'CA', 'IN'). Defaults to active saved region.
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. Changed4 schema fields changed
    • 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 / desired_size / description
      Previous value: -"Optional size query to verify (e.g. 'M', 'L', 'XL', '32', '40')"New value: +"Optional size query to verify against variant inventory (e.g. 'M', 'L', 'XL', '32', '40')"
    • changedInput schema / properties / handle / description
      Previous value: -"Unique product handle identifier"New value: +"Unique product handle identifier (e.g. 'solid-linen-shirt', 'shopify_11206')"
    • changedInput schema / properties / size_index / description
      Previous value: -"Zero-based index of the size variant"New value: +"Zero-based index of the specific size variant to inspect"
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "available_sizes": {
      -      "description": "List of currently available in-stock sizes",
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "direct_checkout_url": {
      -      "description": "Verified 1-click checkout permalink",
      -      "type": "string"
      -    },
      -    "handle": {
      -      "description": "Product handle",
      -      "type": "string"
      -    },
      -    "is_in_stock": {
      -      "description": "Overall stock status",
      -      "type": "boolean"
      -    },
      -    "out_of_stock_sizes": {
      -      "description": "List of out-of-stock sizes",
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "title": {
      -      "description": "Product title",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "handle",
      -    "title",
      -    "is_in_stock",
      -    "available_sizes",
      -    "out_of_stock_sizes",
      -    "direct_checkout_url"
      -  ],
      -  "type": "object"
      -}New value: +null
  3. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description only restates that ('read-only and idempotent with no persistent state modifications'), which earns no extra credit. It does add genuinely non-obvious behavior: automatic numeric/IN/UK/EU size normalization and the negative-return-days formatting rule ('-7' -> 'Exchange only 7 days'), plus the returned JSON keys. Useful, but largely a restatement of the safety profile plus output-field listing for a read-only tool with no destructive or auth risk to disclose.

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?

Well front-loaded with clear headers and the routing decision placed early, but there is notable redundancy: the read-only/idempotent claim, the size-mapping rule, and the negative-return-days rule are each stated twice, and the MANDATORY AGENT INSTRUCTIONS partially restate the BEHAVIOR and WHEN TO USE blocks.

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?

No output schema exists, and the description compensates by naming the returned fields ('is_in_stock', 'available_sizes', 'out_of_stock_sizes', 'product_details', 'shipping_policy_text', 'return_policy_text'). For a read-only inspection tool with annotations covering safety, everything an agent needs to call it correctly is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/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 four parameters with the same examples. The description's 'PARAMETERS & CONSTRAINTS' section repeats handle, desired_size, and size_index but omits the 'country' parameter entirely, so it adds little and is actually less complete than the schema. Baseline 3 applies.

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 (Verify) plus a precise resource (live stock, pricing, specs, sizes for a single product handle) and enumerates the concrete outputs it computes (size-availability matrix, discount percentage, checkout permalink). It explicitly distinguishes itself from 'products.items.get_by_handle' and 'checkout.links.get_direct_url', so an agent can route 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 dedicated WHEN TO USE and WHEN NOT TO USE sections naming concrete triggers (verifying a desired size before confirming a product, generating the specs table, checking return eligibility) and explicit exclusions with the correct alternatives ('products.search.text', 'products.search.image_url'). The disambiguation block also states the condition that selects the sibling over this tool.

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.