Skip to main content
Glama

List collections

list_collections
Read-only

List the merchant's product collections/categories. Resolves a collection the merchant names ("products from the Spring collection") to the id search_products takes. Only some platforms report a parent collection, so parentId is often null and a flat list is not evidence the store has no hierarchy.

Input Schema

NameRequiredDescriptionDefault
limitNoMax collections to return (default 200).
searchNoCase-insensitive substring match on the collection name.
sourceNoSame meaning as in search_products.
parentIdNoOnly the direct children of this collection. Useful for walking a deep hierarchy one level at a time.
topLevelOnlyNoOnly collections with no parent. Ignored when parentId is given.

Output Schema

NameRequiredDescriptionDefault
totalYes
sourceYes
truncatedYes
accountNoteNo
collectionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, so safety is covered. The description adds genuine non-obvious behavior: parentId is often null because only some platforms report hierarchy, and a flat list is not evidence of no hierarchy. That is real context an agent would otherwise misread as a data quality signal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each earning its place: purpose, intended workflow, and a caveat about parentId. Front-loaded with the core purpose and no filler.

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?

Output schema exists so return values need not be explained, and annotations cover safety. Remaining gap is minor routing detail versus sibling list tools (list_catalogs, list_product_facets) and how the resolved id should be handed to search_products, but nothing blocks correct invocation.

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 each parameter (limit, search, source, parentId, topLevelOnly) is fully documented in the schema, including the parentId/topLevelOnly interaction. The description adds only the conceptual note about parentId nullness, not new syntax or defaults. Baseline 3 is appropriate.

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+resource ('List the merchant's product collections/categories') and goes further to explain its role: resolving a merchant-named collection to the id that search_products takes. Distinguishes it from list_catalogs and get_catalog by naming its downstream consumer explicitly.

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

Usage Guidelines4/5

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

The 'resolves a collection the merchant names ... to the id search_products takes' clause is a clear use case that routes an agent from a natural-language request to this tool then to search_products. It does not, however, contrast against list_product_facets, get_catalog, or list_catalogs, so alternative routing is partly inferred.

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.

Resources