Skip to main content
Glama

Get Product By Handle

products.items.get_by_handle
Read-only

Fetch the raw product document and metadata for a single item by unique product handle identifier. Returns catalog metadata, variant details, available in-stock sizes, price details, and verified purchase link (https://s.polopan.com/p/{handle}).

PURPOSE & DISAMBIGUATION:

  • Retrieves the full catalog record for a specific product handle.

  • Distinct from 'products.items.check_stock': Use 'products.items.get_by_handle' to fetch general catalog metadata; use 'products.items.check_stock' to get live variant inventory availability, computed sizing, specifications table, and 1-click checkout permalinks.

  • Distinct from 'products.search.text': Use this tool when you already have an exact product handle.

WHEN TO USE:

  • When you need the raw product metadata, image list, description, or variant array for a known product handle.

WHEN NOT TO USE:

  • Do NOT use to check real-time variant stock or obtain 1-click checkout URLs (use 'products.items.check_stock').

  • Do NOT use for general keyword product searches (use 'products.search.text').

BEHAVIOR & SAFETY:

  • Read-only and idempotent with no persistent state modifications.

  • Returns HTTP 404 error if handle does not exist.

  • Enriches returned document with verified purchase URLs.

PARAMETERS & CONSTRAINTS:

  • 'handle' (string, required): Unique product handle identifier (e.g. 'solid-linen-shirt', 'shopify_11206').

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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 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 / handle / description
      Previous value: -"Unique product handle identifier (e.g. 'solid-linen-shirt')"New value: +"Unique product handle identifier (e.g. 'solid-linen-shirt', 'shopify_11206')"
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "handle": {
      -      "description": "Product handle identifier",
      -      "type": "string"
      -    },
      -    "price": {
      -      "description": "Price",
      -      "type": "number"
      -    },
      -    "title": {
      -      "description": "Product title",
      -      "type": "string"
      -    },
      -    "url": {
      -      "description": "Verified purchase link",
      -      "type": "string"
      -    },
      -    "variants": {
      -      "description": "Variant size list",
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "in_stock": {
      -            "description": "Stock availability",
      -            "type": "boolean"
      -          },
      -          "size": {
      -            "description": "Size label",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "size",
      -          "in_stock"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    }
      -  },
      -  "required": [
      -    "handle",
      -    "title",
      -    "price",
      -    "url"
      -  ],
      -  "type": "object"
      -}New value: +null
  3. First observed

TDQS

A4.3/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 non-obvious behavior beyond that: a 404 on unknown handles and enrichment of the document with verified purchase URLs, which is meaningful context for interpreting results.

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 labeled sections that make scanning easy, but the DISAMBIGUATION bullets and the WHEN NOT TO USE bullets restate the same routing guidance twice, costing some efficiency.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description usefully enumerates the return shape (metadata, variants, in-stock sizes, price, purchase link) and error behavior. The only gap is that the optional 'country' parameter's effect on results is never explained.

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 baseline is 3. The description restates the 'handle' examples that already exist in the schema and never mentions the optional 'country' parameter at all, so it adds essentially nothing beyond the structured fields.

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 and resource ('Fetch the raw product document and metadata for a single item by unique product handle') and explicitly names the two siblings it is not (check_stock, search.text). An agent can distinguish it from every other catalog tool without opening a 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?

Provides explicit WHEN TO USE and WHEN NOT TO USE sections plus a disambiguation block routing to alternatives by condition (known handle vs. keyword search vs. live stock). Nothing is left to inference.

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.