Repository navigation
Conversation
🦋 Changeset detectedLatest commit: ef0114a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
4 Skipped Deployments
|
6a6c876 to
c261193
Compare
c261193 to
4a1f218
Compare
4a1f218 to
f4f4c1e
Compare
The shopper package ships a ./mcp export with 149 tools, one for every operation but createAnAccessToken, whose body is form-encoded. They generate from a new shopper-standalone@v1 bundle of specs/shopper.yaml, built by a new oas:mcp step after oas:build, with a written description for every operation. The catalog and cart descriptions reuse the reviewed ones from the catalogs and cart-checkout-order packages where the operations match. - putV2AuthenticationRealmsRealmIdUserAuthenticationInfoUserAuthInfoId would give a 79-character tool name, so x-mcp-name calls it shopper_update_user_authentication_info. - Risk: anonymizeOrders is update; configureByContextProduct, postMultiSearch and validateCatalogRules are read. - getAllFiles page[limit] and page[offset] were typed string in the spec while the zod schemas parse numbers, so the handler did not type-check. A spec correction types them as integers, which changes those fields in types.gen.ts from string to number. sdk.gen.ts and zod.gen.ts are unchanged.
f4f4c1e to
ef0114a
Compare
|
Closing without merging. The shopper SDK is the storefront SDK, joined from 11 service specs; 87 of these 149 tools copy tools that catalogs and cart-checkout-order already ship, and most of the rest copy other service packages. The operations only shopper has, the 16 by-context catalog reads (getByContext* and configureByContextProduct), will get MCP tools in the catalogs package instead, as #756 now describes. The descriptions written here for them carry over. |
Closes #756. Part of #735. Builds on #757 (merged), whose
x-mcp-nameshopper needs.Summary
Shopper ships a
./mcpexport with 149 tools, one for every operation exceptcreateAnAccessToken, whose body is form-encoded.shopper build oas:build # regenerates specs/shopper.yaml from the service bundles (unchanged) + oas:mcp # redocly bundle shopper-standalone@v1: shopper.yaml + per-operation overrides oas:openapi-ts # input: ../specs/bundled/shopper_standalone.yaml, + mcpTools($, { api: "shopper" })getACartincludes,getAnOrderincludes, andbulkAddTaxItemsToCarthas no component meta.x-mcp-name:putV2AuthenticationRealmsRealmIdUserAuthenticationInfoUserAuthInfoId(added in Shopper SDK: add user authentication info update #743) would give a 79-character name, so it becomesshopper_update_user_authentication_info.types.gen.ts: the same deliberate change as files in feat(sdks): MCP tools for uploads, an x-mcp-name override, and files #757.getAllFilespage[limit]andpage[offset]go from string to number viashopper_service_corrections.yaml(4 lines).sdk.gen.tsandzod.gen.tsare byte-identical.createShopperClient(config, { clientId, tokenProvider }).client, since that factory returns{ client, auth }.Tool list size
354,137 characters for 149 tools. That's the largest package by far, but no tool is over a quarter of it: the largest is
shopper_manage_cartsat 4.4%, thenpayment_setupat 3.5% andcheckout_apiat 3.3%. An MCP server will want to register a subset.Risk choices
anonymizeOrders→update, copied from cart-checkout-order: it irreversibly rewrites orders.validateCatalogRules→read, copied from catalogs.postMultiSearch→read: it only runs searches.configureByContextProduct→read. It's a read-only action that returns the configured bundle payload (confirmed in review).create:CreateSubscriptionState: it records a lifecycle change.post-v2-account-members-tokens,createOneTimePasswordTokenRequest,post-v2-accountsandpost-v2-account-address.Credentials in responses (leave these out of an MCP server)
post-v2-account-members-tokens:data[].token, an account management JWT.createOneTimePasswordTokenRequest:data.token, the one-time password, in the 201 response.paymentSetup,confirmPayment,captureATransaction,refundATransaction,cancelATransaction,getATransaction,getOrderTransactionsandconfirmOrder:data.client_parameters.secretand.token.createCartPaymentIntent,updateCartPaymentIntentand the cart reads:meta.payment_intentis free-form, so a Stripeclient_secretmay come back in it.Spec problems found (not fixed here)
getByContextReleasesays it returns a list, but the schema is one release.getAnOrderandgetCustomerOrdersdeclareincludetwice. The override enum saysitemsonly, while the prose lists four.accountID"you want to retrieve" on an update.SubscriptionStateActionenum includespending, which its description leaves out.GetOffering,GetSubscription,GetInvoiceandGetFeaturehave no description.Evidence
McpServer, and these returned data through a realClient:shopper_get_by_context_all_products(2), thenget_by_context_productshopper_get_all_currencies(3)shopper_post_multi_searchMerge Danger
Door: two-way
Blast Radius: small
New
./mcpsubpath and an optional peer. The main entry is untouched apart from thegetAllFilespaging types.specs/shopper.yamland its join step are unchanged; the new bundle reads it.