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.

  • Automatically resolves search queries if a descriptive name is passed instead of an exact handle.

  • Enriches returned document with verified purchase URLs.

PARAMETERS & CONSTRAINTS:

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

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "handle": "<handle>"
    },
    "name": "products.items.get_by_handle"
  }
}

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, and the description restates read-only/idempotent but then adds genuinely new behavior: automatic resolution when a descriptive name is passed instead of an exact handle, and enrichment of the returned document with verified purchase URLs. It does not cover error behavior for an unknown handle, which is the only notable gap.

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?

Sectioned headings make it scannable and the core purpose is front-loaded in the first sentence. Some material is redundant with structured fields (the read-only/idempotent restatement and the verbatim handle definition), but the length is proportionate to the disambiguation value it delivers.

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 payload (catalog metadata, variants, in-stock sizes, price details, purchase link). The omission is the 'country' parameter, which affects what region-priced data comes back and is left entirely to the schema.

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 coverage is 100%, so both parameters are already documented, and the description's PARAMETERS section repeats the handle definition nearly verbatim from the schema. The second parameter, 'country', is never mentioned in the description, so no meaning is added beyond the schema baseline.

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 identifier') and immediately enumerates what comes back. The PURPOSES & DISAMBIGUATION section names both sibling alternatives (products.items.check_stock, products.search.text) and the exact condition that separates them, so an agent can route without opening another 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 blocks, each tied to a named alternative, plus a disambiguation note for the exact-handle case versus keyword search. This is the full when/when-not/alternative triad with no inference required.

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.