Skip to main content
Glama

list_product_sets

Retrieve product sets from a specified product catalog. Use catalog ID to filter results, with optional fields and pagination.

Instructions

List product sets within a catalog.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
catalog_idYesProduct catalog ID
fieldsNoComma-separated fields to return
limitNoNumber of results to return
afterNoPagination cursor for next page

Implementation Reference

  • The handler function for the list_product_sets tool. It accepts catalog_id, fields, limit, and after parameters, makes a GET request to /{catalog_id}/product_sets, and returns the JSON response with rate limit info.
      async ({ catalog_id, ...params }) => {
        try {
          const { data, rateLimit } = await client.get(`/${catalog_id}/product_sets`, { ...params });
          return { content: [{ type: "text" as const, text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text" as const, text: `Failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );
  • Zod schema definitions for the list_product_sets tool's input parameters: catalog_id (required string), fields (optional string), limit (optional number, default 25), after (optional string for pagination).
    {
      catalog_id: z.string().describe("Product catalog ID"),
      fields: z.string().optional().describe("Comma-separated fields to return"),
      limit: z.number().optional().default(25).describe("Number of results to return"),
      after: z.string().optional().describe("Pagination cursor for next page"),
    },
  • Registration of the 'list_product_sets' tool via server.tool() within the registerCatalogTools function, which is exported and called from src/index.ts line 71.
    server.tool(
      "list_product_sets",
      "List product sets within a catalog.",
      {
        catalog_id: z.string().describe("Product catalog ID"),
        fields: z.string().optional().describe("Comma-separated fields to return"),
        limit: z.number().optional().default(25).describe("Number of results to return"),
        after: z.string().optional().describe("Pagination cursor for next page"),
      },
      async ({ catalog_id, ...params }) => {
        try {
          const { data, rateLimit } = await client.get(`/${catalog_id}/product_sets`, { ...params });
          return { content: [{ type: "text" as const, text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text" as const, text: `Failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

B3.1/5.0
Behavior2/5

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

Annotations are absent, so the description carries the full burden. It only states the basic action and does not disclose pagination behavior (despite 'after' and 'limit' parameters), authentication needs, or whether the operation is read-only. This lack of context is a gap for a tool with pagination parameters.

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?

The description is a single concise sentence that efficiently states the tool's purpose. It is not verbose, and while it could include more detail, it earns its place without wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the moderate complexity (4 parameters, pagination, no output schema, no annotations), the description is incomplete. It does not explain what the response looks like, how pagination works, or how to use the 'fields' parameter effectively. More context is needed.

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 description coverage is 100%, with meaningful descriptions for all four parameters. The tool description adds no extra parameter semantics, so the baseline of 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?

The description uses a specific verb 'List' and resource 'product sets' with the scope 'within a catalog'. This clearly distinguishes it from sibling tools like list_products or get_product_set.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like get_product_set or list_products. There is no mention of use cases, prerequisites, or exclusions.

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

Deploy Server

Other Tools