get-collection-by-id
Retrieve a single Shopify collection by ID with products, smart collection rules, SEO, and image; use field selection to limit response size and reduce token usage.
Instructions
Get a single collection with full details including products (paginated), rules for smart collections, SEO, and image. Supports field selection via 'fields' to reduce response size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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 collection GID and title. Products are controlled separately via 'productsFirst'. Available: id, title, handle, descriptionHtml, sortOrder, templateSuffix, updatedAt, productsCount, ruleSet, image, seo | |
| collectionId | Yes | The collection ID (e.g. gid://shopify/Collection/123 or just 123) | |
| productsFirst | No | Number of products to include (default 25, max 100, 0 to skip products) |