get-products
Retrieve Shopify products or search by title, with field selection, pagination, filters, sorting, and count-only results to reduce token usage.
Instructions
Get all products or search by title. Supports field selection via 'fields' and 'countOnly' to get just the count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Cursor for forward pagination | |
| limit | No | Number of products to return (default 10, max 250) | |
| query | No | Raw query string for advanced filtering (e.g. 'status:active vendor:Nike tag:sale') | |
| before | No | Cursor for backward pagination | |
| fields | No | IMPORTANT: Always specify this to minimize token usage and avoid flooding context with unnecessary data. Only the listed fields will be fetched from the API and returned. 'id' is always included. If you are unsure which fields are needed, ask the user before fetching all fields. Example: ["id", "title"] returns only product GID and title. Available: id, title, description, handle, status, createdAt, updatedAt, totalInventory, vendor, productType, tags, mediaCount, priceRange, media, variants | |
| reverse | No | Reverse the sort order | |
| sortKey | No | Sort key for products | |
| countOnly | No | IMPORTANT: Use this to check result set size before fetching data. Returns only { count: N } without any resource data, saving significant context. Recommended before paginating large result sets. | |
| searchTitle | No | Search by title (convenience filter, wraps in title:*...*). Use 'query' for advanced filtering. |