Skip to content

feat(sdks-catalogs): add the shopper catalog operations, with MCP tools - #765

Merged
field123 merged 2 commits into
mainfrom
feat/catalogs-shopper-catalog
Oct 19, 2026
Merged

field123 merged 2 commits into
mainfrom
feat/catalogs-shopper-catalog

Conversation

@field123

@field123 field123 commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #756. Part of #735. Replaces the shopper ./mcp export from #760, which was closed.

Summary

The shopper catalog operations get SDK functions and MCP tools in the package for their own service. The source is catalog_view.yaml, which is the same file the docs publish at developer.elasticpath.com/assets/openapispecs/catalog/catalog_view.yaml.

 catalogs@v1 bundle (root: catalog_view.yaml)
-  preprocessor: keep only the 30 admin operations listed under /catalogs
+  no filter: all 46 operations, the 30 admin ones under /catalogs and the 16 shopper ones under /catalog
   decorator: x-mcp-* overrides, one file per operation

The bundle is now the published spec plus the per-operation x-mcp-* overrides. Every bundle gets the same two global decorators (the shared bearer security scheme, and removing x-internal items), and oas:build still passes --remove-unused-components. The added operations are:

  • getByContextRelease
  • getByContext + AllHierarchies, Hierarchy, HierarchyNodes, HierarchyChildNodes, AllNodes, Node, ChildNodes, AllProducts, Product, AllRelatedProducts, ComponentProductIDs, ChildProducts, ProductsForHierarchy, ProductsForNode
  • configureByContextProduct

Removing the filter left every generated file byte-identical, and all 137 tests pass.

  • catalogs now has 46 functions and 46 tools. This follows cart-checkout-order and catalog-search, which already carry their service's shopper-facing operations.
  • Additive only. Comparing every declaration with comments stripped: nothing removed or changed. types.gen.ts gains 84 declarations, zod.gen.ts 62 and sdk.gen.ts 16.
  • The 16 descriptions are the ones written and reviewed for feat(sdks-shopper): MCP tools for the shopper SDK #760. They describe the operations as reading the catalog the shopper's context selects through catalog rules, so a model can tell them from the admin reads that take a catalog ID.
  • Risk: configureByContextProduct → read. It's a POST that returns the configured bundle payload, as you confirmed on feat(sdks-shopper): MCP tools for the shopper SDK #760.
  • Tool list: 111,960 characters for 46 tools. The largest is validate_catalog_rules at 4.0%, so none is over a quarter.
  • The catalogs README now describes both sides. The shopper SDK keeps the same operations, with its browser authentication.

Evidence

  • catalogs suite: 137 passing, with no type errors in the tests or the generated code. The count tests moved from 30 to 46, and a new test checks configureByContextProduct is read-only.
  • Live, read-only (approved store): all 46 tools registered on a real McpServer, and these returned data through a real Client:
    • catalogs_get_by_context_release
    • get_by_context_all_products (2), then get_by_context_product
    • get_by_context_all_hierarchies
    • the existing get_catalogs (16)

Merge Danger

Door: two-way

Blast Radius: small

The catalogs package gains 16 functions, their types and schemas, and 16 tools. Nothing existing changes. It's a minor bump.

The catalogs package takes its operations from the catalog view spec, and
until now only the 30 admin ones under /catalogs. It now also takes the 16
shopper ones under /catalog: getByContextRelease, the getByContext*
hierarchy, node and product reads, and configureByContextProduct. Each gets
an SDK function and an MCP tool, with the descriptions reviewed for the
shopper package. Existing exports are unchanged; the generated files only
gain declarations.

configureByContextProduct is read: it returns the configured bundle and
saves nothing.
@vercel

vercel Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

6 Skipped Deployments
Project Deployment Actions Updated
commerce-essentials Ignored Ignored Preview Oct 19, 2026 1:17pm UTC
composable-frontend-algolia Ignored Ignored Oct 19, 2026 1:17pm UTC
composable-frontend-core Ignored Ignored Preview Oct 19, 2026 1:17pm UTC
composable-frontend-docs Ignored Ignored Preview Oct 19, 2026 1:17pm UTC
composable-frontend-simple Ignored Ignored Preview Oct 19, 2026 1:17pm UTC
composable-frontend-subscriptions Ignored Ignored Preview Oct 19, 2026 1:17pm UTC

Request Review

The catalogs bundle filtered catalog_view.yaml down to a list of
operationIds. That list now names all 46 operations, so the filter did
nothing. Without it the bundle is the published spec plus the MCP overrides,
and the generated output is unchanged.
@changeset-bot

changeset-bot Bot commented Oct 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7874447

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@epcc-sdk/sdks-catalogs Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@field123
field123 merged commit fc0a55b into main Oct 19, 2026
7 checks passed
@field123
field123 deleted the feat/catalogs-shopper-catalog branch October 19, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP tools: shopper catalog (by-context) operations in the catalogs package

1 participant