Repository navigation
feat(sdks-catalogs): add the shopper catalog operations, with MCP tools - #765
Merged
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 6 Skipped Deployments
|
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 detectedLatest commit: 7874447 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #756. Part of #735. Replaces the shopper
./mcpexport 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 atdeveloper.elasticpath.com/assets/openapispecs/catalog/catalog_view.yaml.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 removingx-internalitems), andoas:buildstill passes--remove-unused-components. The added operations are:getByContextReleasegetByContext+AllHierarchies,Hierarchy,HierarchyNodes,HierarchyChildNodes,AllNodes,Node,ChildNodes,AllProducts,Product,AllRelatedProducts,ComponentProductIDs,ChildProducts,ProductsForHierarchy,ProductsForNodeconfigureByContextProductRemoving the filter left every generated file byte-identical, and all 137 tests pass.
types.gen.tsgains 84 declarations,zod.gen.ts62 andsdk.gen.ts16.configureByContextProduct→read. It's aPOSTthat returns the configured bundle payload, as you confirmed on feat(sdks-shopper): MCP tools for the shopper SDK #760.validate_catalog_rulesat 4.0%, so none is over a quarter.Evidence
configureByContextProductis read-only.McpServer, and these returned data through a realClient:catalogs_get_by_context_releaseget_by_context_all_products(2), thenget_by_context_productget_by_context_all_hierarchiesget_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.