Skip to main content
Glama
kisasa

Shopify MCP Server

by kisasa

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

NameRequiredDescriptionDefault
fieldsNoIMPORTANT: 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
collectionIdYesThe collection ID (e.g. gid://shopify/Collection/123 or just 123)
productsFirstNoNumber of products to include (default 25, max 100, 0 to skip products)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It usefully states that products are paginated and that field selection shrinks the response, but it says nothing about permissions, not-found behavior, or that the call is a safe read — gaps that matter for a tool with zero annotation coverage.

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?

Two short sentences, front-loaded with the resource and payload, then the field-selection tip. Slight redundancy with the schema's own 'fields' documentation keeps it from a 5.

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?

No output schema or annotations exist, and the description compensates by enumerating the returned sections and the pagination/field-selection controls. It falls short only on error/edge-case behavior for an unknown collectionId.

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%, and the schema's 'fields' description already covers the enum, defaults, and the token-saving rationale in more depth than the prose does. The description's mention of 'fields' only duplicates the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource ('Get a single collection') and enumerates the payload (products, ruleSet, SEO, image), which clearly distinguishes it from the sibling get-collections list tool. It never names that sibling explicitly, so the differentiation is implicit rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It hints at usage by recommending 'fields' to reduce response size, but it never says when to pick this over get-collections or what happens when the ID is unknown. The when-to-use guidance is implied by the name and payload rather than articulated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.