Repository navigation
feat(sdks): MCP tools for catalog-search, commerce-extensions, flows, payments and pricebooks - #759
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
🦋 Changeset detectedLatest commit: d4a9cd4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
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
force-pushed
the
feat/mcp-tools-commerce-config
branch
from
October 19, 2026 11:32
bde02fa to
73b606c
Compare
…s, flows, payments and pricebooks Each package ships a ./mcp export, set up as catalogs and rule-promotions are: catalog-search (40 tools), commerce-extensions (21), flows (19), payments (12) and pricebooks (18). Every operation has a written description in a spec override; types.gen.ts, sdk.gen.ts and zod.gen.ts are unchanged. - flows, payments and pricebooks generate from new <package>-standalone@v1 bundles; catalog-search adds its overrides to its existing bundle. - commerce-extensions now bundles in two steps. Its slug operations are added by path-add when the root is left, after the per-operation overrides run, so commerce-extensions-paths@v1 adds them and commerce-extensions-standalone@v1 applies the overrides to the result. - Risk: catalog-search postMultiSearch and multiSearchByCatalogRelease are read; moveSearchRule and setDefaultSearchProfile are update, because they change existing search behaviour rather than add a record; pricebooks importPricebook is update, because it overwrites existing prices.
field123
force-pushed
the
feat/mcp-tools-commerce-config
branch
from
October 19, 2026 13:05
73b606c to
d4a9cd4
Compare
5 tasks done
This branch was successfully deployed
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 #753. Part of #735.
Summary
Five SDKs ship a
./mcpexport, set up the way catalogs and rule-promotions were.create_a_custom_field26.3%create_a_custom_fieldis partly the rule-promotions problem. Its input repeats one 603-character property block 6 times, once for each field type in the union, which is about 3.6K of its 15.7K.create_search_profileandupdate_search_profileare about 17K each, but they have no repeated block: the search profile schema is simply large.types.gen.ts,sdk.gen.tsandzod.gen.tscome out byte-identical for all five.Why commerce-extensions bundles twice:
path-addadds the five slug operations (/v2/extensions/{slug}) when the root is left, which is afteroperation-property-overridehas visited each operation. Their descriptions never reached the bundle. Runningpath-addon enter fails, because refs are resolved before the walk. Two bundles keep both decorators unchanged. The package'soas:buildand generation test run both.Risk choices
postMultiSearch,multiSearchByCatalogRelease→read. These arePOSTs that only run searches.moveSearchRule,setDefaultSearchProfile→update(confirmed in review). MCP defines a non-destructive tool as one that "performs only additive updates". These two replace live state across the store (rule order, the default search profile) and add nothing, so they get the same tier as aPUTorPATCH.importPricebook→update. It creates and updates prices in bulk, overwriting existing ones.create:ReindexTenantReleases: it rebuilds indexes but erases no source data.createPricebook,replicatePricebook,createProductPrice(fails if the SKU already has prices), andcreatePriceModifier.PUT, so they default toupdate.Titles
postMultiSearch: "Run Multiple Shopper Catalog Searches" (was "Multi-search")multiSearchByCatalogRelease: "Run Multiple Searches on a Catalog Release" (was "Admin Multi-search")searchByContext: "Search the Shopper Catalog" (was "Search")searchByCatalogRelease: "Search a Catalog Release" (was "Admin Search")importPricebook: "Import Price Books and Prices" (was "Import a Price")getProductPrices: "Get a Price Book's Prices"getPrices: "Get Prices Across All Price Books"Credentials in responses (leave these out of an MCP server)
getAllGatewaysandgetAGateway: the gateway schema carrieslogin,passwordandsignature.update*Gateway:private_keyandpublic_key.login, the secret key.login,passwordandsignature.Spec problems found (not fixed here)
importPricebookhas norequestBody, so the tool can't send the JSONL file the description talks about.getAllFieldssays "in a flow" but takes no flow parameter.deleteAnEntryRelationshipdefines no body.StringCustomField.max_lengthis described as the minimum.Response.Erroris typed as an array but has object properties.Evidence
Suites: catalog-search 82, commerce-extensions 59, flows 56, payments 48, pricebooks 52, all passing with no type errors. Each includes the generation test that regenerates twice and compares with the committed files.
A second reviewer checked all 110 descriptions against the bundled specs. 14 were rewritten where a claim was unsupported or said "the spec says".
Live, read-only (approved store): every tool registered on a real
McpServer, and these returned data through a realClient:list_indexable_fields,list_indexed_fields(49)list_custom_apis(5),get_a_custom_api,get_open_api_specificationget_all_flows(18),get_a_flow,get_all_fields(37)get_all_gateways(11)get_pricebooks(13),get_pricebook_by_id,get_product_prices(25)Live writes, run by Robert (approved store, through a real
Client):/v2/extensions/{slug}tools: created an entry, found it in the list, read it, updated it with aPUT(noIf-Match), and deleted it, after which a read returned 404.Not run live: payments (it rewrites the store's gateway config), flows and catalog-search. Unit tests cover their request wiring.
Merge Danger
Door: two-way
Blast Radius: small
New
./mcpsubpaths and an optional peer; the main entries don't change. Merge order with #757: whichever lands second needsmcp-support.gen.tsre-copied and the generation tests rerun. I'll do that here if #757 lands first.