@tomaspavlin/rohlik-mcp 2.0.0 → 3.1.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.
Files changed (55) hide show
  1. package/README.md +207 -3
  2. package/dist/index.js +17 -0
  3. package/dist/index.js.map +1 -1
  4. package/dist/locale.d.ts +3 -0
  5. package/dist/locale.d.ts.map +1 -0
  6. package/dist/locale.js +27 -0
  7. package/dist/locale.js.map +1 -0
  8. package/dist/rohlik-api.d.ts +10 -0
  9. package/dist/rohlik-api.d.ts.map +1 -1
  10. package/dist/rohlik-api.js +146 -11
  11. package/dist/rohlik-api.js.map +1 -1
  12. package/dist/tools/account-data.d.ts.map +1 -1
  13. package/dist/tools/account-data.js +2 -1
  14. package/dist/tools/account-data.js.map +1 -1
  15. package/dist/tools/cart-management.d.ts.map +1 -1
  16. package/dist/tools/cart-management.js +3 -2
  17. package/dist/tools/cart-management.js.map +1 -1
  18. package/dist/tools/delivery-info.d.ts.map +1 -1
  19. package/dist/tools/delivery-info.js +3 -2
  20. package/dist/tools/delivery-info.js.map +1 -1
  21. package/dist/tools/delivery-slots.d.ts.map +1 -1
  22. package/dist/tools/delivery-slots.js +2 -1
  23. package/dist/tools/delivery-slots.js.map +1 -1
  24. package/dist/tools/discounted-items.d.ts +36 -0
  25. package/dist/tools/discounted-items.d.ts.map +1 -0
  26. package/dist/tools/discounted-items.js +69 -0
  27. package/dist/tools/discounted-items.js.map +1 -0
  28. package/dist/tools/frequent-items.d.ts +34 -0
  29. package/dist/tools/frequent-items.d.ts.map +1 -0
  30. package/dist/tools/frequent-items.js +184 -0
  31. package/dist/tools/frequent-items.js.map +1 -0
  32. package/dist/tools/meal-suggestions.d.ts +36 -0
  33. package/dist/tools/meal-suggestions.d.ts.map +1 -0
  34. package/dist/tools/meal-suggestions.js +243 -0
  35. package/dist/tools/meal-suggestions.js.map +1 -0
  36. package/dist/tools/order-detail.d.ts +28 -0
  37. package/dist/tools/order-detail.d.ts.map +1 -0
  38. package/dist/tools/order-detail.js +79 -0
  39. package/dist/tools/order-detail.js.map +1 -0
  40. package/dist/tools/order-history.d.ts.map +1 -1
  41. package/dist/tools/order-history.js +2 -1
  42. package/dist/tools/order-history.js.map +1 -1
  43. package/dist/tools/premium-info.d.ts.map +1 -1
  44. package/dist/tools/premium-info.js +4 -3
  45. package/dist/tools/premium-info.js.map +1 -1
  46. package/dist/tools/shopping-scenarios.d.ts +15 -0
  47. package/dist/tools/shopping-scenarios.d.ts.map +1 -0
  48. package/dist/tools/shopping-scenarios.js +143 -0
  49. package/dist/tools/shopping-scenarios.js.map +1 -0
  50. package/dist/tools/upcoming-orders.d.ts.map +1 -1
  51. package/dist/tools/upcoming-orders.js +2 -1
  52. package/dist/tools/upcoming-orders.js.map +1 -1
  53. package/dist/types.d.ts +22 -0
  54. package/dist/types.d.ts.map +1 -1
  55. package/package.json +8 -3
@@ -0,0 +1,243 @@
1
+ import { z } from "zod";
2
+ // Category mappings for different meal types
3
+ const MEAL_CATEGORY_MAPPINGS = {
4
+ breakfast: [
5
+ "Pekárna",
6
+ "Mléko a mléčné nápoje",
7
+ "Müsli a cereálie",
8
+ "Džemy a pomazánky",
9
+ "Ovoce",
10
+ "Med",
11
+ "Máslo a tuky",
12
+ "Vejce"
13
+ ],
14
+ lunch: [
15
+ "Maso a drůbež",
16
+ "Zelenina",
17
+ "Přílohy",
18
+ "Těstoviny",
19
+ "Rýže",
20
+ "Omáčky a dresinky",
21
+ "Polévky",
22
+ "Luštěniny"
23
+ ],
24
+ dinner: [
25
+ "Maso a drůbež",
26
+ "Ryby a mořské plody",
27
+ "Zelenina",
28
+ "Přílohy",
29
+ "Těstoviny",
30
+ "Rýže",
31
+ "Brambory",
32
+ "Omáčky a dresinky"
33
+ ],
34
+ snack: [
35
+ "Sladkosti",
36
+ "Ovoce",
37
+ "Ořechy a semínka",
38
+ "Jogurty",
39
+ "Sýry",
40
+ "Chipsy a krekry",
41
+ "Tyčinky"
42
+ ],
43
+ baking: [
44
+ "Mouka a směsi",
45
+ "Cukr a sladidla",
46
+ "Pečení a vaření",
47
+ "Čokoláda a kakao",
48
+ "Ořechy a semínka",
49
+ "Vejce",
50
+ "Máslo a tuky",
51
+ "Droždí a kypřidla"
52
+ ],
53
+ drinks: [
54
+ "Nápoje",
55
+ "Káva",
56
+ "Čaj",
57
+ "Mléko a mléčné nápoje",
58
+ "Džusy a smoothies",
59
+ "Minerální vody",
60
+ "Pivo",
61
+ "Víno"
62
+ ],
63
+ healthy: [
64
+ "Bio produkty",
65
+ "Zdravá výživa",
66
+ "Bezlepkové",
67
+ "Veganské",
68
+ "Ovoce",
69
+ "Zelenina",
70
+ "Ořechy a semínka",
71
+ "Luštěniny"
72
+ ]
73
+ };
74
+ export function createMealSuggestionsTool(createRohlikAPI) {
75
+ return {
76
+ name: "get_meal_suggestions",
77
+ definition: {
78
+ title: "Get Meal Suggestions",
79
+ description: "Get smart shopping suggestions for specific meal types (breakfast, lunch, dinner, etc.) based on your purchase history",
80
+ inputSchema: {
81
+ meal_type: z.enum(["breakfast", "lunch", "dinner", "snack", "baking", "drinks", "healthy"])
82
+ .describe("Type of meal or occasion (enum): breakfast, lunch, dinner, snack, baking, drinks, or healthy"),
83
+ items_count: z.number().min(3).max(30).default(10)
84
+ .describe("Number of items to suggest (3-30, default: 10)"),
85
+ orders_to_analyze: z.number().min(1).max(20).default(5)
86
+ .describe("Number of recent orders to analyze (1-20, default: 5)"),
87
+ prefer_frequent: z.boolean().default(true)
88
+ .describe("Prefer items you order frequently (default: true)")
89
+ }
90
+ },
91
+ handler: async (args) => {
92
+ const { meal_type, items_count = 10, orders_to_analyze = 5, prefer_frequent = true } = args;
93
+ try {
94
+ const api = createRohlikAPI();
95
+ // Get relevant categories for this meal type
96
+ const relevantCategories = MEAL_CATEGORY_MAPPINGS[meal_type];
97
+ if (!relevantCategories || relevantCategories.length === 0) {
98
+ return {
99
+ content: [
100
+ {
101
+ type: "text",
102
+ text: `Unknown meal type: ${meal_type}. Available types: breakfast, lunch, dinner, snack, baking, drinks, healthy`
103
+ }
104
+ ],
105
+ isError: true
106
+ };
107
+ }
108
+ // Fetch order history
109
+ const orderHistory = await api.getOrderHistory(orders_to_analyze);
110
+ if (!orderHistory || (Array.isArray(orderHistory) && orderHistory.length === 0)) {
111
+ return {
112
+ content: [
113
+ {
114
+ type: "text",
115
+ text: "No order history found. I need your past orders to make personalized suggestions."
116
+ }
117
+ ]
118
+ };
119
+ }
120
+ const orders = Array.isArray(orderHistory) ? orderHistory : [orderHistory];
121
+ // Analyze products from relevant categories
122
+ const productMap = new Map();
123
+ let processedOrders = 0;
124
+ for (const order of orders) {
125
+ try {
126
+ const orderId = order.id || order.orderNumber;
127
+ if (!orderId)
128
+ continue;
129
+ const orderDetail = await api.getOrderDetail(String(orderId));
130
+ if (!orderDetail)
131
+ continue;
132
+ processedOrders++;
133
+ const products = orderDetail.products || orderDetail.items || [];
134
+ for (const product of products) {
135
+ const productId = product.productId || product.id;
136
+ const productName = product.productName || product.name;
137
+ if (!productId || !productName)
138
+ continue;
139
+ // Extract category
140
+ const categories = product.categories || [];
141
+ const mainCategory = categories.find((cat) => cat.level === 1) || categories[0];
142
+ const categoryName = mainCategory?.name || '';
143
+ // Check if this product belongs to relevant categories
144
+ const isRelevant = relevantCategories.some(cat => categoryName.toLowerCase().includes(cat.toLowerCase()) ||
145
+ cat.toLowerCase().includes(categoryName.toLowerCase()));
146
+ if (!isRelevant)
147
+ continue;
148
+ const key = `${productId}`;
149
+ if (productMap.has(key)) {
150
+ const existing = productMap.get(key);
151
+ existing.frequency++;
152
+ existing.totalQuantity += (product.quantity || 1);
153
+ if (product.price) {
154
+ const currentAvg = existing.averagePrice || 0;
155
+ existing.averagePrice = (currentAvg * (existing.frequency - 1) + product.price) / existing.frequency;
156
+ }
157
+ }
158
+ else {
159
+ productMap.set(key, {
160
+ productId: String(productId),
161
+ productName,
162
+ brand: product.brand || '',
163
+ frequency: 1,
164
+ totalQuantity: product.quantity || 1,
165
+ averagePrice: product.price || 0,
166
+ category: categoryName
167
+ });
168
+ }
169
+ }
170
+ }
171
+ catch (error) {
172
+ console.error(`Failed to process order: ${error}`);
173
+ }
174
+ }
175
+ if (productMap.size === 0) {
176
+ return {
177
+ content: [
178
+ {
179
+ type: "text",
180
+ text: `No items found for ${meal_type} in your order history. Try a different meal type or check if you have enough order history.`
181
+ }
182
+ ]
183
+ };
184
+ }
185
+ // Sort by frequency if preferred, otherwise by recency
186
+ const sortedProducts = Array.from(productMap.values())
187
+ .sort((a, b) => {
188
+ if (prefer_frequent) {
189
+ return b.frequency - a.frequency;
190
+ }
191
+ return b.totalQuantity - a.totalQuantity;
192
+ })
193
+ .slice(0, items_count);
194
+ // Format output
195
+ const mealEmojis = {
196
+ breakfast: "🍳",
197
+ lunch: "🍽️",
198
+ dinner: "🍴",
199
+ snack: "🍿",
200
+ baking: "🧁",
201
+ drinks: "🥤",
202
+ healthy: "🥗"
203
+ };
204
+ const emoji = mealEmojis[meal_type] || "🛒";
205
+ const formatItem = (item, index) => {
206
+ const brand = item.brand ? ` (${item.brand})` : '';
207
+ const avgPrice = item.averagePrice ? `${item.averagePrice.toFixed(2)} Kč` : 'N/A';
208
+ const category = item.category ? ` • ${item.category}` : '';
209
+ return `${index + 1}. ${item.productName}${brand}${category}
210
+ 📊 Ordered ${item.frequency}× • 💰 ${avgPrice} • 🆔 ${item.productId}`;
211
+ };
212
+ const output = `${emoji} ${meal_type.toUpperCase()} SUGGESTIONS
213
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
214
+ 📈 Analyzed ${processedOrders} orders • Found ${productMap.size} relevant items
215
+ 🎯 Relevant categories: ${relevantCategories.slice(0, 5).join(", ")}${relevantCategories.length > 5 ? '...' : ''}
216
+
217
+ ${prefer_frequent ? '🏆 TOP ITEMS YOU FREQUENTLY ORDER:' : '📦 SUGGESTED ITEMS:'}
218
+
219
+ ${sortedProducts.map(formatItem).join('\n\n')}`;
220
+ return {
221
+ content: [
222
+ {
223
+ type: "text",
224
+ text: output
225
+ }
226
+ ]
227
+ };
228
+ }
229
+ catch (error) {
230
+ return {
231
+ content: [
232
+ {
233
+ type: "text",
234
+ text: error instanceof Error ? error.message : String(error)
235
+ }
236
+ ],
237
+ isError: true
238
+ };
239
+ }
240
+ }
241
+ };
242
+ }
243
+ //# sourceMappingURL=meal-suggestions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"meal-suggestions.js","sourceRoot":"","sources":["../../src/tools/meal-suggestions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,6CAA6C;AAC7C,MAAM,sBAAsB,GAA6B;IACvD,SAAS,EAAE;QACT,SAAS;QACT,uBAAuB;QACvB,kBAAkB;QAClB,mBAAmB;QACnB,OAAO;QACP,KAAK;QACL,cAAc;QACd,OAAO;KACR;IACD,KAAK,EAAE;QACL,eAAe;QACf,UAAU;QACV,SAAS;QACT,WAAW;QACX,MAAM;QACN,mBAAmB;QACnB,SAAS;QACT,WAAW;KACZ;IACD,MAAM,EAAE;QACN,eAAe;QACf,qBAAqB;QACrB,UAAU;QACV,SAAS;QACT,WAAW;QACX,MAAM;QACN,UAAU;QACV,mBAAmB;KACpB;IACD,KAAK,EAAE;QACL,WAAW;QACX,OAAO;QACP,kBAAkB;QAClB,SAAS;QACT,MAAM;QACN,iBAAiB;QACjB,SAAS;KACV;IACD,MAAM,EAAE;QACN,eAAe;QACf,iBAAiB;QACjB,iBAAiB;QACjB,kBAAkB;QAClB,kBAAkB;QAClB,OAAO;QACP,cAAc;QACd,mBAAmB;KACpB;IACD,MAAM,EAAE;QACN,QAAQ;QACR,MAAM;QACN,KAAK;QACL,uBAAuB;QACvB,mBAAmB;QACnB,gBAAgB;QAChB,MAAM;QACN,MAAM;KACP;IACD,OAAO,EAAE;QACP,cAAc;QACd,eAAe;QACf,YAAY;QACZ,UAAU;QACV,OAAO;QACP,UAAU;QACV,kBAAkB;QAClB,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AAC,CAAC,CAAC,qBAAqB;;EAE9E,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;gBAExC,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,MAAM;yBACb;qBACF;iBACF,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;yBAC7D;qBACF;oBACD,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { z } from "zod";
2
+ import { RohlikAPI } from "../rohlik-api.js";
3
+ export declare function createOrderDetailTool(createRohlikAPI: () => RohlikAPI): {
4
+ name: string;
5
+ definition: {
6
+ title: string;
7
+ description: string;
8
+ inputSchema: {
9
+ orderId: z.ZodString;
10
+ };
11
+ };
12
+ handler: (args: {
13
+ orderId: string;
14
+ }) => Promise<{
15
+ content: {
16
+ type: "text";
17
+ text: string;
18
+ }[];
19
+ isError?: undefined;
20
+ } | {
21
+ content: {
22
+ type: "text";
23
+ text: string;
24
+ }[];
25
+ isError: boolean;
26
+ }>;
27
+ };
28
+ //# sourceMappingURL=order-detail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order-detail.d.ts","sourceRoot":"","sources":["../../src/tools/order-detail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,MAAM,SAAS;;;;;;;;;oBAU5C;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;EAuE5C"}
@@ -0,0 +1,79 @@
1
+ import { z } from "zod";
2
+ import { getCurrency } from "../locale.js";
3
+ export function createOrderDetailTool(createRohlikAPI) {
4
+ return {
5
+ name: "get_order_detail",
6
+ definition: {
7
+ title: "Get Order Detail",
8
+ description: "Get detailed information about a specific order by its ID, including all products",
9
+ inputSchema: {
10
+ orderId: z.string().describe("The order ID to fetch details for")
11
+ }
12
+ },
13
+ handler: async (args) => {
14
+ const { orderId } = args;
15
+ try {
16
+ const api = createRohlikAPI();
17
+ const orderDetail = await api.getOrderDetail(orderId);
18
+ if (!orderDetail) {
19
+ return {
20
+ content: [
21
+ {
22
+ type: "text",
23
+ text: `Order with ID ${orderId} not found.`
24
+ }
25
+ ]
26
+ };
27
+ }
28
+ const formatProduct = (product, index) => {
29
+ const name = product.productName || product.name || 'Unknown product';
30
+ const quantity = product.quantity || 1;
31
+ const price = product.price || product.totalPrice || 0;
32
+ const brand = product.brand || '';
33
+ return ` ${index + 1}. ${name}${brand ? ` (${brand})` : ''}
34
+ Quantity: ${quantity}
35
+ Price: ${price} ${getCurrency()}`;
36
+ };
37
+ const order = orderDetail;
38
+ const orderNumber = order.orderNumber || order.id || orderId;
39
+ const orderDate = order.deliveredAt || order.createdAt || 'Unknown date';
40
+ const totalPrice = order.totalPrice || order.price || 'Unknown price';
41
+ const status = order.status || 'Unknown status';
42
+ const deliveryDate = order.deliveryDate || order.deliveredAt || 'Unknown delivery date';
43
+ const products = order.products || order.items || [];
44
+ const output = `📦 ORDER DETAILS - ${orderNumber}
45
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
46
+ Order Date: ${orderDate}
47
+ Delivery Date: ${deliveryDate}
48
+ Status: ${status}
49
+ Total Price: ${totalPrice} ${getCurrency()}
50
+
51
+ 📋 PRODUCTS (${products.length} items):
52
+ ${products.map(formatProduct).join('\n\n')}
53
+
54
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
55
+ Total: ${totalPrice} ${getCurrency()}`;
56
+ return {
57
+ content: [
58
+ {
59
+ type: "text",
60
+ text: output
61
+ }
62
+ ]
63
+ };
64
+ }
65
+ catch (error) {
66
+ return {
67
+ content: [
68
+ {
69
+ type: "text",
70
+ text: error instanceof Error ? error.message : String(error)
71
+ }
72
+ ],
73
+ isError: true
74
+ };
75
+ }
76
+ }
77
+ };
78
+ }
79
+ //# sourceMappingURL=order-detail.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order-detail.js","sourceRoot":"","sources":["../../src/tools/order-detail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,UAAU,qBAAqB,CAAC,eAAgC;IACpE,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,UAAU,EAAE;YACV,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,mFAAmF;YAChG,WAAW,EAAE;gBACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;aAClE;SACF;QACD,OAAO,EAAE,KAAK,EAAE,IAAyB,EAAE,EAAE;YAC3C,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;YAEzB,IAAI,CAAC;gBACH,MAAM,GAAG,GAAG,eAAe,EAAE,CAAC;gBAC9B,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;gBAEtD,IAAI,CAAC,WAAW,EAAE,CAAC;oBACjB,OAAO;wBACL,OAAO,EAAE;4BACP;gCACE,IAAI,EAAE,MAAe;gCACrB,IAAI,EAAE,iBAAiB,OAAO,aAAa;6BAC5C;yBACF;qBACF,CAAC;gBACJ,CAAC;gBAED,MAAM,aAAa,GAAG,CAAC,OAAY,EAAE,KAAa,EAAU,EAAE;oBAC5D,MAAM,IAAI,GAAG,OAAO,C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AW,EAAE,EAAE,CAAC;gBAE/B,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,MAAM;yBACb;qBACF;iBACF,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;yBAC7D;qBACF;oBACD,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"order-history.d.ts","sourceRoot":"","sources":["../../src/tools/order-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,wBAAgB,sBAAsB,CAAC,eAAe,EAAE,MAAM,SAAS;;;;;;;;;oBAU7C;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;EAsD3C"}
1
+ {"version":3,"file":"order-history.d.ts","sourceRoot":"","sources":["../../src/tools/order-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,wBAAgB,sBAAsB,CAAC,eAAe,EAAE,MAAM,SAAS;;;;;;;;;oBAU7C;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;EAsD3C"}
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { getCurrency } from "../locale.js";
2
3
  export function createOrderHistoryTool(createRohlikAPI) {
3
4
  return {
4
5
  name: "get_order_history",
@@ -31,7 +32,7 @@ export function createOrderHistoryTool(createRohlikAPI) {
31
32
  const status = order.status || 'Delivered';
32
33
  return `${index + 1}. ${orderNumber}
33
34
  Date: ${orderDate}
34
- Total: ${totalPrice} CZK
35
+ Total: ${totalPrice} ${getCurrency()}
35
36
  Status: ${status}`;
36
37
  };
37
38
  const orders = Array.isArray(orderHistory) ? orderHistory : [orderHistory];
@@ -1 +1 @@
1
- {"version":3,"file":"order-history.js","sourceRoot":"","sources":["../../src/tools/order-history.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,sBAAsB,CAAC,eAAgC;IACrE,OAAO;QACL,IAAI,EAAE,mBAAmB;QACzB,UAAU,EAAE;YACV,KAAK,EAAE,mBAAmB;YAC1B,WAAW,EAAE,gCAAgC;YAC7C,WAAW,EAAE;gBACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,yDAAyD,CAAC;aAClH;SACF;QACD,OAAO,EAAE,KAAK,EAAE,IAAwB,EAAE,EAAE;YAC1C,MAAM,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC;YAE5B,IAAI,CAAC;gBACH,MAAM,GAAG,GAAG,eAAe,EAAE,CAAC;gBAC9B,MAAM,YAAY,GAAG,MAAM,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;gBAEtD,IAAI,CAAC,YAAY,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;oBAChF,OAAO;wBACL,OAAO,EAAE;4BACP;gCACE,IAAI,EAAE,MAAe;gCACrB,IAAI,EAAE,yBAAyB;6BAChC;yBACF;qBACF,CAAC;gBACJ,CAAC;gBAED,MAAM,WAAW,GAAG,CAA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C,WAAW,IAAI,KAAK,CAAC,EAAE,IAAI,SAAS,KAAK,GAAG,CAAC,EAAE,CAAC;oBAC1E,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,WAAW,CAAC;oBAE3C,OAAO,GAAG,KAAK,GAAG,CAAC,KAAK,WAAW;WAClC,SAAS;YACR,UAAU,IAAI,WAAW,EAAE;aAC1B,MAAM,EAAE,CAAC;gBACd,CAAC,CAAC;gBAEF,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;gBAC3E,MAAM,MAAM,GAAG,qBAAqB,MAAM,CAAC,MAAM,gBAAgB,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;gBAExG,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,MAAM;yBACb;qBACF;iBACF,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;yBAC7D;qBACF;oBACD,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"premium-info.d.ts","sourceRoot":"","sources":["../../src/tools/premium-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;EA6FrE"}
1
+ {"version":3,"file":"premium-info.d.ts","sourceRoot":"","sources":["../../src/tools/premium-info.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;EA6FrE"}
@@ -1,3 +1,4 @@
1
+ import { getCurrency } from "../locale.js";
1
2
  export function createPremiumInfoTool(createRohlikAPI) {
2
3
  return {
3
4
  name: "get_premium_info",
@@ -33,7 +34,7 @@ export function createPremiumInfoTool(createRohlikAPI) {
33
34
  Type: ${sub.type || 'Unknown'}
34
35
  Start: ${sub.startDate || 'Unknown'}
35
36
  End: ${sub.endDate || 'Unknown'}
36
- Price: ${sub.price || 'Unknown'} CZK`);
37
+ Price: ${sub.price || 'Unknown'} ${getCurrency()}`);
37
38
  }
38
39
  // Benefits
39
40
  if (data.benefits && Array.isArray(data.benefits)) {
@@ -42,10 +43,10 @@ ${data.benefits.map((benefit) => ` • ${benefit.name || benefit}`).join('\n')
42
43
  }
43
44
  // Savings
44
45
  if (data.totalSavings !== undefined) {
45
- sections.push(`💰 TOTAL SAVINGS: ${data.totalSavings} CZK`);
46
+ sections.push(`💰 TOTAL SAVINGS: ${data.totalSavings} ${getCurrency()}`);
46
47
  }
47
48
  if (data.monthlySavings !== undefined) {
48
- sections.push(`📊 MONTHLY SAVINGS: ${data.monthlySavings} CZK`);
49
+ sections.push(`📊 MONTHLY SAVINGS: ${data.monthlySavings} ${getCurrency()}`);
49
50
  }
50
51
  // Free delivery info
51
52
  if (data.freeDeliveryCount !== undefined) {
@@ -1 +1 @@
1
- {"version":3,"file":"premium-info.js","sourceRoot":"","sources":["../../src/tools/premium-info.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,qBAAqB,CAAC,eAAgC;IACpE,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,UAAU,EAAE;YACV,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,wDAAwD;YACrE,WAAW,EAAE,EAAE;SA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,WAAW,CAAC,CAAC;gBAE9C,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,MAAM;yBACb;qBACF;iBACF,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;yBAC7D;qBACF;oBACD,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare function createShoppingScenariosTool(): {
2
+ name: string;
3
+ definition: {
4
+ title: string;
5
+ description: string;
6
+ inputSchema: {};
7
+ };
8
+ handler: () => Promise<{
9
+ content: {
10
+ type: "text";
11
+ text: string;
12
+ }[];
13
+ }>;
14
+ };
15
+ //# sourceMappingURL=shopping-scenarios.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shopping-scenarios.d.ts","sourceRoot":"","sources":["../../src/tools/shopping-scenarios.ts"],"names":[],"mappings":"AAEA,wBAAgB,2BAA2B;;;;;;;;;;;;;EA8I1C"}
@@ -0,0 +1,143 @@
1
+ export function createShoppingScenariosTool() {
2
+ return {
3
+ name: "get_shopping_scenarios",
4
+ definition: {
5
+ title: "Get Shopping Scenarios",
6
+ description: "Shows example scenarios and use cases for the Rohlik MCP - helps users understand what's possible",
7
+ inputSchema: {}
8
+ },
9
+ handler: async () => {
10
+ const output = `🛒 ROHLIK MCP - WHAT YOU CAN DO
11
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
12
+
13
+ 📋 SMART SHOPPING SCENARIOS:
14
+
15
+ 1️⃣ MEAL-BASED SHOPPING
16
+ 💬 "Add breakfast items I typically order"
17
+ 💬 "Show me lunch suggestions for this week"
18
+ 💬 "I need dinner ingredients - suggest what I usually buy"
19
+ 💬 "Add my usual snacks to the cart"
20
+ 🔧 Tool: get_meal_suggestions
21
+
22
+ 2️⃣ QUICK REORDERING
23
+ 💬 "Show my 20 most frequently purchased items"
24
+ 💬 "What do I buy most often?"
25
+ 💬 "Add my top 10 frequent items to cart"
26
+ 🔧 Tool: get_frequent_items
27
+
28
+ 3️⃣ CATEGORY-BASED SHOPPING
29
+ 💬 "What dairy products do I usually buy?"
30
+ 💬 "Show my top bakery purchases"
31
+ 💬 "Add my usual fruits and vegetables"
32
+ 🔧 Tool: get_frequent_items (with categories)
33
+
34
+ 4️⃣ SPECIFIC PRODUCT SEARCH
35
+ 💬 "Find organic milk and add to cart"
36
+ 💬 "Search for gluten-free bread"
37
+ 💬 "Show me all chocolates on sale"
38
+ 🔧 Tool: search_products + add_to_cart
39
+
40
+ 5️⃣ WEEKLY PLANNING
41
+ 💬 "I need groceries for the whole week - suggest based on my history"
42
+ 💬 "Show what I typically buy for breakfast, lunch, and dinner"
43
+ 💬 "Help me plan my weekly shopping"
44
+ 🔧 Combination of meal suggestions
45
+
46
+ 6️⃣ ORDER MANAGEMENT
47
+ 💬 "What's in my cart?"
48
+ 💬 "Show my last 5 orders"
49
+ 💬 "What did I order last week?"
50
+ 💬 "Show details of order #1234567"
51
+ 🔧 Tools: get_cart_content, get_order_history, get_order_detail
52
+
53
+ 7️⃣ DELIVERY PLANNING
54
+ 💬 "When is my next delivery?"
55
+ 💬 "What delivery slots are available tomorrow?"
56
+ 💬 "Show the cheapest delivery slots this week"
57
+ 🔧 Tools: get_upcoming_orders, get_delivery_slots
58
+
59
+ 8️⃣ ACCOUNT & SAVINGS
60
+ 💬 "How much have I saved with Premium?"
61
+ 💬 "What are my Premium benefits?"
62
+ 💬 "Check my reusable bags count"
63
+ 🔧 Tools: get_premium_info, get_reusable_bags_info
64
+
65
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
66
+
67
+ 🎯 MEAL TYPES AVAILABLE:
68
+ • breakfast 🍳 - Morning essentials (bread, milk, cereals, fruits)
69
+ • lunch 🍽️ - Midday meal ingredients (meat, vegetables, pasta, rice)
70
+ • dinner 🍴 - Evening meal items (meat, fish, vegetables, sides)
71
+ • snack 🍿 - Quick bites (sweets, fruits, nuts, yogurt)
72
+ • baking 🧁 - Baking supplies (flour, sugar, chocolate, butter)
73
+ • drinks 🥤 - Beverages (coffee, tea, juices, water, alcohol)
74
+ • healthy 🥗 - Health-focused (bio, vegan, gluten-free, vegetables)
75
+
76
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
77
+
78
+ 💡 POWER TIPS:
79
+
80
+ ✨ Combine suggestions with actions:
81
+ "Show breakfast suggestions and add top 5 to cart"
82
+
83
+ ✨ Use natural language:
84
+ "I forgot to buy milk last time, add it to my cart"
85
+
86
+ ✨ Ask for alternatives:
87
+ "Find cheaper alternative to product #123456"
88
+
89
+ ✨ Plan ahead:
90
+ "What should I order for weekend breakfast?"
91
+
92
+ ✨ Be specific:
93
+ "Add ingredients for apple pie - only gluten-free"
94
+
95
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
96
+
97
+ 🔧 AVAILABLE TOOLS (${16}):
98
+
99
+ 📦 Shopping:
100
+ • search_products - Find products by name
101
+ • add_to_cart - Add products to cart
102
+ • get_cart_content - View current cart
103
+ • remove_from_cart - Remove items
104
+ • get_shopping_list - View shopping lists
105
+
106
+ 🤖 Smart Features:
107
+ • get_meal_suggestions - Meal-based suggestions (NEW!)
108
+ • get_frequent_items - Most purchased items
109
+ • get_shopping_scenarios - This help (NEW!)
110
+
111
+ 📊 Orders:
112
+ • get_order_history - Past orders
113
+ • get_order_detail - Order details
114
+ • get_upcoming_orders - Scheduled orders
115
+
116
+ 🚚 Delivery:
117
+ • get_delivery_info - Current delivery info
118
+ • get_delivery_slots - Available time slots
119
+
120
+ 👤 Account:
121
+ • get_account_data - Full account info
122
+ • get_premium_info - Premium subscription
123
+ • get_announcements - Current announcements
124
+ • get_reusable_bags_info - Bag tracking
125
+
126
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
127
+
128
+ 🚀 TRY IT NOW:
129
+ Start with: "Show me breakfast suggestions based on what I usually order"
130
+
131
+ 💬 Need help? Just ask: "What can I do with Rohlik MCP?"`;
132
+ return {
133
+ content: [
134
+ {
135
+ type: "text",
136
+ text: output
137
+ }
138
+ ]
139
+ };
140
+ }
141
+ };
142
+ }
143
+ //# sourceMappingURL=shopping-scenarios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shopping-scenarios.js","sourceRoot":"","sources":["../../src/tools/shopping-scenarios.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,2BAA2B;IACzC,OAAO;QACL,IAAI,EAAE,wBAAwB;QAC9B,UAAU,EAAE;YACV,KAAK,EAAE,wBAAwB;YAC/B,WAAW,EAAE,mGAAmG;YAChH,WAAW,EAAE,EAAE;SAChB;QACD,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAuFC,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yDAkCiC,CAAC;YAEpD,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,MAAM;qBACb;iBACF;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"upcoming-orders.d.ts","sourceRoot":"","sources":["../../src/tools/upcoming-orders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;EA+DxE"}
1
+ {"version":3,"file":"upcoming-orders.d.ts","sourceRoot":"","sources":["../../src/tools/upcoming-orders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAG7C,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;EA+DxE"}
@@ -1,3 +1,4 @@
1
+ import { getCurrency } from "../locale.js";
1
2
  export function createUpcomingOrdersTool(createRohlikAPI) {
2
3
  return {
3
4
  name: "get_upcoming_orders",
@@ -29,7 +30,7 @@ export function createUpcomingOrdersTool(createRohlikAPI) {
29
30
  const itemCount = order.itemCount || order.items?.length || 'Unknown';
30
31
  return `${index + 1}. ${orderNumber}
31
32
  Delivery: ${deliveryDate} ${deliveryTime}
32
- Total: ${totalPrice} CZK
33
+ Total: ${totalPrice} ${getCurrency()}
33
34
  Items: ${itemCount}
34
35
  Status: ${status}`;
35
36
  };
@@ -1 +1 @@
1
- {"version":3,"file":"upcoming-orders.js","sourceRoot":"","sources":["../../src/tools/upcoming-orders.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,wBAAwB,CAAC,eAAgC;IACvE,OAAO;QACL,IAAI,EAAE,qBAAqB;QAC3B,UAAU,EAAE;YACV,KAAK,EAAE,qBAAqB;YAC5B,WAAW,EAAE,oCAAoC;YACjD,WAAW,EAAE,EAAE;SAChB;QACD,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,IAAI,CAAC;gBACH,MAAM,GAAG,GAAG,eAAe,EAAE,CAAC;gBAC9B,MAAM,cAAc,GAAG,MAAM,GAAG,CAAC,iBAAiB,EAAE,CAAC;gBAErD,IAAI,CAAC,cAAc,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;oBACtF,OAAO;wBACL,OAAO,EAAE;4BACP;gCACE,IAAI,EAAE,MAAe;gCACr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