picnic-mcp 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,9 +9,9 @@ Unofficial: not made or supported by Picnic. Built on [picnic-api](https://githu
9
9
  | Tool | What it does |
10
10
  | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
11
11
  | `search_products` | Searches products. Returns a `bestMatch` when one product fits (usually one you bought before), or 2 or 3 `choices` to ask you about. |
12
- | `add_to_cart` | Adds a product by its id. Returns the quantity in the cart and the cart total. |
12
+ | `add_to_cart` | Adds a product by its id. Returns the quantity in the cart and the cart total, and replacements when the product can't be delivered. |
13
13
  | `remove_from_cart` | Removes a product by its id. |
14
- | `get_cart` | Shows the cart: products, quantities, prices, total and delivery window. |
14
+ | `get_cart` | Shows the cart: products, quantities, prices, total and delivery window, and replacements for products that can't be delivered. |
15
15
 
16
16
  Output is compact JSON with only what a model needs. It contains products, prices and your cart, but not your name, address or other account details. Keep in mind that whatever the tools return is sent to the model your MCP client uses.
17
17
 
@@ -10,6 +10,15 @@ export type CartLineOutput = {
10
10
  labels?: string[];
11
11
  /** Why the product can't be delivered, when it can't. */
12
12
  unavailable?: string;
13
+ /** Products Picnic offers instead, when the product can't be delivered. */
14
+ replacements?: ReplacementOutput[];
15
+ };
16
+ /** A product Picnic offers instead of one that can't be delivered. */
17
+ export type ReplacementOutput = {
18
+ productId: string;
19
+ name: string;
20
+ size?: string;
21
+ price: string;
13
22
  };
14
23
  /** The totals of the cart. */
15
24
  export type CartSummaryOutput = {
@@ -30,4 +39,9 @@ export type CartOutput = CartSummaryOutput & {
30
39
  */
31
40
  export declare function formatCart(cart: Cart, countryCode: CountryCode): CartOutput;
32
41
  export declare function formatCartLine(item: CartLineItem, countryCode: CountryCode): CartLineOutput;
42
+ /**
43
+ * Says why a cart line can't be delivered and what Picnic offers instead, or nothing when the line
44
+ * can be delivered.
45
+ */
46
+ export declare function formatUnavailability(item: CartLineItem, countryCode: CountryCode): Pick<CartLineOutput, "unavailable" | "replacements">;
33
47
  export declare function formatCartSummary(cart: Cart, countryCode: CountryCode): CartSummaryOutput;
@@ -1,4 +1,6 @@
1
1
  import { formatPrice, formatWindow } from "./prices.js";
2
+ /** At most this many replacements per cart line. */
3
+ const MAX_REPLACEMENTS = 3;
2
4
  /**
3
5
  * Builds the model-facing cart from an allow-list of fields. The cart id, its timestamp, images
4
6
  * and other fields a model doesn't need stay out, as do fields picnic-api adds later.
@@ -18,7 +20,25 @@ export function formatCartLine(item, countryCode) {
18
20
  quantity: item.quantity,
19
21
  price: formatPrice(item.displayPrice, countryCode),
20
22
  ...(labels.length > 0 && { labels }),
21
- ...(item.isUnavailable && { unavailable: item.unavailableReason ?? "not available" }),
23
+ ...formatUnavailability(item, countryCode),
24
+ };
25
+ }
26
+ /**
27
+ * Says why a cart line can't be delivered and what Picnic offers instead, or nothing when the line
28
+ * can be delivered.
29
+ */
30
+ export function formatUnavailability(item, countryCode) {
31
+ if (!item.isUnavailable)
32
+ return {};
33
+ const replacements = item.replacements.slice(0, MAX_REPLACEMENTS).map((replacement) => ({
34
+ productId: replacement.id,
35
+ name: replacement.name,
36
+ ...(replacement.unitQuantity && { size: replacement.unitQuantity }),
37
+ price: formatPrice(replacement.displayPrice, countryCode),
38
+ }));
39
+ return {
40
+ unavailable: item.unavailableReason ?? "not available",
41
+ ...(replacements.length > 0 && { replacements }),
22
42
  };
23
43
  }
24
44
  export function formatCartSummary(cart, countryCode) {
@@ -1 +1 @@
1
- {"version":3,"file":"cart.js","sourceRoot":"","sources":["../../src/format/cart.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA4BxD;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,IAAU,EAAE,WAAwB;IAC7D,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EA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C,OAAO,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC,OAAO,EAAE,WAAW,CAAC,EAAE,CAAC;QAClE,GAAG,CAAC,MAAM,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC;QACzC,GAAG,CAAC,IAAI,CAAC,iBAAiB,KAAK,IAAI,IAAI;YACrC,YAAY,EAAE,WAAW,CAAC,IAAI,CAAC,iBAAiB,EAAE,WAAW,CAAC;SAC/D,CAAC;KACH,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import * as z from "zod";
2
- import { formatCart, formatCartSummary } from "../format/cart.js";
2
+ import { formatCart, formatCartSummary, formatUnavailability } from "../format/cart.js";
3
3
  import { errorResult, jsonResult, runTool } from "./result.js";
4
4
  const productId = z
5
5
  .string()
@@ -11,13 +11,16 @@ export function registerCartTools(server, context) {
11
11
  const { client, countryCode, onError } = context;
12
12
  server.registerTool("get_cart", {
13
13
  title: "Get cart",
14
- description: "Show the user's Picnic shopping cart: the products with their quantity and price, the total, and the delivery window.",
14
+ description: "Show the user's Picnic shopping cart: the products with their quantity and price, the total, and the delivery window. " +
15
+ "A product that can't be delivered in that window has `unavailable` with the reason, and `replacements` Picnic offers instead.",
15
16
  annotations: { readOnlyHint: true, openWorldHint: true },
16
17
  }, () => runTool(async () => jsonResult(formatCart(await client.cart.getCart(), countryCode)), onError));
17
18
  server.registerTool("add_to_cart", {
18
19
  title: "Add to cart",
19
20
  description: "Add a product to the user's Picnic shopping cart. Get the product id from search_products first. " +
20
- "Returns the product with the quantity now in the cart, and the cart total. This does not place an order.",
21
+ "Returns the product with the quantity now in the cart, and the cart total. " +
22
+ "If the product can't be delivered in the selected delivery window, it says so and lists `replacements`: tell the user and offer them. " +
23
+ "This does not place an order.",
21
24
  inputSchema: z.object({ productId, quantity: quantity("add") }),
22
25
  annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: true },
23
26
  }, ({ productId, quantity }) => runTool(async () => {
@@ -26,8 +29,17 @@ export function registerCartTools(server, context) {
26
29
  if (lines.length === 0) {
27
30
  return errorResult(`Picnic did not add ${productId}. Check the product id with search_products.`);
28
31
  }
32
+ const unavailableLine = lines.find((line) => line.isUnavailable);
29
33
  return jsonResult({
30
- added: { productId, name: lines[0].name, quantityInCart: quantityOf(lines) },
34
+ ...(unavailableLine && {
35
+ next: "The product is in the cart, but it can't be delivered in the selected delivery window. Tell the user, and offer the replacements if there are any.",
36
+ }),
37
+ added: {
38
+ productId,
39
+ name: lines[0].name,
40
+ quantityInCart: quantityOf(lines),
41
+ ...(unavailableLine && formatUnavailability(unavailableLine, countryCode)),
42
+ },
31
43
  cart: formatCartSummary(cart, countryCode),
32
44
  });
33
45
  }, onError));
@@ -1 +1 @@
1
- {"version":3,"file":"cart.js","sourceRoot":"","sources":["../../src/tools/cart.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGlE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,SAAS,GAAG,CAAC;KAChB,MAAM,EAAE;KACR,IAAI,EAAE;KACN,KAAK,CAAC,QAAQ,EAAE,mEAAmE,CAAC;KACpF,QAAQ,CAAC,iEAAiE,CAAC,CAAC;AAE/E,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAChC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,eAAe,IAAI,cAAc,CAAC,CAAC;AAEzF,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,OAAoB;IACvE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAEjD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kB;QACzB,WAAW,EACT,2FAA2F;YAC3F,2DAA2D;QAC7D,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClE,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;KACjF,EACD,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,CAC1B,OAAO,CAAC,KAAK,IAAI,EAAE;QACjB,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC1E,OAAO,UAAU,CAAC;YAChB,OAAO,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,EAAE;YAC5E,IAAI,EAAE,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC;SAC3C,CAAC,CAAC;IACL,CAAC,EAAE,OAAO,CAAC,CACd,CAAC;AACJ,CAAC;AAED,iFAAiF;AACjF,SAAS,OAAO,CAAC,IAAU,EAAE,SAAiB;IAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC;AACnE,CAAC;AAED,SAAS,UAAU,CAAC,KAAqB;IACvC,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;AAC7D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "picnic-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "MCP server for the online supermarket Picnic: search products and manage the cart",
5
5
  "keywords": [
6
6
  "picnic",