cookunity-mcp-server 1.0.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 (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +113 -0
  3. package/dist/constants.d.ts +13 -0
  4. package/dist/constants.d.ts.map +1 -0
  5. package/dist/constants.js +14 -0
  6. package/dist/constants.js.map +1 -0
  7. package/dist/index.d.ts +9 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +79 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/schemas/index.d.ts +215 -0
  12. package/dist/schemas/index.d.ts.map +1 -0
  13. package/dist/schemas/index.js +84 -0
  14. package/dist/schemas/index.js.map +1 -0
  15. package/dist/services/api.d.ts +35 -0
  16. package/dist/services/api.d.ts.map +1 -0
  17. package/dist/services/api.js +249 -0
  18. package/dist/services/api.js.map +1 -0
  19. package/dist/services/auth.d.ts +14 -0
  20. package/dist/services/auth.d.ts.map +1 -0
  21. package/dist/services/auth.js +96 -0
  22. package/dist/services/auth.js.map +1 -0
  23. package/dist/services/helpers.d.ts +23 -0
  24. package/dist/services/helpers.d.ts.map +1 -0
  25. package/dist/services/helpers.js +94 -0
  26. package/dist/services/helpers.js.map +1 -0
  27. package/dist/tools/cart.d.ts +4 -0
  28. package/dist/tools/cart.d.ts.map +1 -0
  29. package/dist/tools/cart.js +186 -0
  30. package/dist/tools/cart.js.map +1 -0
  31. package/dist/tools/deliveries.d.ts +4 -0
  32. package/dist/tools/deliveries.d.ts.map +1 -0
  33. package/dist/tools/deliveries.js +190 -0
  34. package/dist/tools/deliveries.js.map +1 -0
  35. package/dist/tools/menu.d.ts +4 -0
  36. package/dist/tools/menu.d.ts.map +1 -0
  37. package/dist/tools/menu.js +293 -0
  38. package/dist/tools/menu.js.map +1 -0
  39. package/dist/tools/pricing.d.ts +4 -0
  40. package/dist/tools/pricing.d.ts.map +1 -0
  41. package/dist/tools/pricing.js +116 -0
  42. package/dist/tools/pricing.js.map +1 -0
  43. package/dist/tools/user.d.ts +4 -0
  44. package/dist/tools/user.d.ts.map +1 -0
  45. package/dist/tools/user.js +97 -0
  46. package/dist/tools/user.js.map +1 -0
  47. package/dist/types.d.ts +228 -0
  48. package/dist/types.d.ts.map +1 -0
  49. package/dist/types.js +2 -0
  50. package/dist/types.js.map +1 -0
  51. package/package.json +51 -0
@@ -0,0 +1,186 @@
1
+ import { AddToCartSchema, RemoveFromCartSchema, ClearCartSchema, ConfirmOrderSchema } from "../schemas/index.js";
2
+ import { handleError, toStructured } from "../services/helpers.js";
3
+ export function registerCartTools(server, api) {
4
+ server.registerTool("cookunity_add_to_cart", {
5
+ title: "Add Meal to CookUnity Cart",
6
+ description: `Add a meal to the cart for a specific delivery date.
7
+
8
+ Args:
9
+ - date (string, required): YYYY-MM-DD delivery date
10
+ - inventory_id (string, required): Inventory ID from menu/search results
11
+ - quantity (number): Portions to add, default 1 (max 10)
12
+ - batch_id (number, optional): Batch ID from menu results
13
+
14
+ Returns: Confirmation with updated quantity
15
+
16
+ Examples:
17
+ - Add one meal: { date: "2025-02-24", inventory_id: "ABC123" }
18
+ - Add 2 portions: { date: "2025-02-24", inventory_id: "ABC123", quantity: 2 }
19
+
20
+ Error Handling:
21
+ - Invalid inventory_id: API returns error
22
+ - Past cutoff: API returns error — check cutoff with cookunity_list_deliveries first`,
23
+ inputSchema: AddToCartSchema,
24
+ annotations: {
25
+ readOnlyHint: false,
26
+ destructiveHint: false,
27
+ idempotentHint: false,
28
+ openWorldHint: true,
29
+ },
30
+ }, async (params) => {
31
+ try {
32
+ const result = await api.addMeal(params.date, params.inventory_id, params.quantity, params.batch_id);
33
+ const output = {
34
+ success: true,
35
+ date: params.date,
36
+ inventory_id: result.inventoryId,
37
+ quantity: result.qty,
38
+ message: `Added ${params.quantity} portion(s) to cart for ${params.date}.`,
39
+ };
40
+ return { content: [{ type: "text", text: output.message }], structuredContent: toStructured(output) };
41
+ }
42
+ catch (error) {
43
+ return handleError(error);
44
+ }
45
+ });
46
+ server.registerTool("cookunity_remove_from_cart", {
47
+ title: "Remove Meal from CookUnity Cart",
48
+ description: `Remove a meal from the cart for a specific delivery date.
49
+
50
+ Args:
51
+ - date (string, required): YYYY-MM-DD delivery date
52
+ - inventory_id (string, required): Inventory ID of meal to remove
53
+ - quantity (number): Portions to remove, default 1
54
+
55
+ Returns: Confirmation with updated quantity
56
+
57
+ Error Handling:
58
+ - Meal not in cart: API returns error`,
59
+ inputSchema: RemoveFromCartSchema,
60
+ annotations: {
61
+ readOnlyHint: false,
62
+ destructiveHint: true,
63
+ idempotentHint: false,
64
+ openWorldHint: true,
65
+ },
66
+ }, async (params) => {
67
+ try {
68
+ const result = await api.removeMeal(params.date, params.inventory_id, params.quantity);
69
+ const output = {
70
+ success: true,
71
+ date: params.date,
72
+ inventory_id: result.inventoryId,
73
+ remaining_quantity: result.qty,
74
+ message: `Removed ${params.quantity} portion(s) from cart for ${params.date}.`,
75
+ };
76
+ return { content: [{ type: "text", text: output.message }], structuredContent: toStructured(output) };
77
+ }
78
+ catch (error) {
79
+ return handleError(error);
80
+ }
81
+ });
82
+ server.registerTool("cookunity_clear_cart", {
83
+ title: "Clear CookUnity Cart",
84
+ description: `Clear all items from the cart for a specific delivery date. This removes ALL meals.
85
+
86
+ Args:
87
+ - date (string, required): YYYY-MM-DD delivery date
88
+
89
+ Returns: Confirmation message
90
+
91
+ Error Handling:
92
+ - Past cutoff: API returns error`,
93
+ inputSchema: ClearCartSchema,
94
+ annotations: {
95
+ readOnlyHint: false,
96
+ destructiveHint: true,
97
+ idempotentHint: true,
98
+ openWorldHint: true,
99
+ },
100
+ }, async (params) => {
101
+ try {
102
+ await api.clearCart(params.date);
103
+ const output = { success: true, date: params.date, message: `Cart cleared for ${params.date}.` };
104
+ return { content: [{ type: "text", text: output.message }], structuredContent: toStructured(output) };
105
+ }
106
+ catch (error) {
107
+ return handleError(error);
108
+ }
109
+ });
110
+ server.registerTool("cookunity_confirm_order", {
111
+ title: "Confirm CookUnity Order",
112
+ description: `Confirm/place the order for a delivery date. Takes the current cart contents and submits them as an order.
113
+
114
+ Prerequisites:
115
+ - Meals must be in the cart (use cookunity_add_to_cart first)
116
+ - Must be before the cutoff (check with cookunity_list_deliveries)
117
+ - Cart should have enough meals to meet the plan minimum (typically 6)
118
+
119
+ Args:
120
+ - date (string, required): YYYY-MM-DD delivery date
121
+ - comment (string, optional): Delivery instructions
122
+ - tip (number, optional): Tip amount in dollars
123
+
124
+ Returns: Order confirmation with ID and payment status, or error with out-of-stock meal IDs
125
+
126
+ Important: Without confirming, cart items are NOT locked in. CookUnity will auto-fill with recommendations at cutoff instead.`,
127
+ inputSchema: ConfirmOrderSchema,
128
+ annotations: {
129
+ readOnlyHint: false,
130
+ destructiveHint: false,
131
+ idempotentHint: false,
132
+ openWorldHint: true,
133
+ },
134
+ }, async (params) => {
135
+ try {
136
+ // Get upcoming days to find cart contents and delivery window
137
+ const days = await api.getUpcomingDays();
138
+ const day = days.find((d) => d.date === params.date);
139
+ if (!day) {
140
+ return { content: [{ type: "text", text: `No delivery found for ${params.date}. Check available dates with cookunity_list_deliveries.` }], isError: true };
141
+ }
142
+ if (!day.cart || day.cart.length === 0) {
143
+ return { content: [{ type: "text", text: `Cart is empty for ${params.date}. Add meals first with cookunity_add_to_cart.` }], isError: true };
144
+ }
145
+ const products = day.cart.map((item) => ({
146
+ qty: item.qty,
147
+ inventoryId: item.product.inventoryId,
148
+ }));
149
+ // Pull delivery window from user profile, fallback to common defaults
150
+ let start = "11:00";
151
+ let end = "20:00";
152
+ try {
153
+ const userInfo = await api.getUserInfo();
154
+ if (userInfo.deliveryDays?.length) {
155
+ start = userInfo.deliveryDays[0].time_start ?? start;
156
+ end = userInfo.deliveryDays[0].time_end ?? end;
157
+ }
158
+ }
159
+ catch {
160
+ // Fall back to defaults if user info fetch fails
161
+ }
162
+ const result = await api.createOrder(params.date, start, end, products, {
163
+ comment: params.comment,
164
+ tip: params.tip,
165
+ });
166
+ if (result.__typename === "OrderCreationError") {
167
+ const msg = result.error || "Unknown error";
168
+ const oos = result.outOfStockIds?.length ? ` Out of stock: ${result.outOfStockIds.join(", ")}` : "";
169
+ return { content: [{ type: "text", text: `Order failed: ${msg}${oos}` }], isError: true };
170
+ }
171
+ const output = {
172
+ success: true,
173
+ order_id: result.id,
174
+ delivery_date: result.deliveryDate,
175
+ payment_status: result.paymentStatus,
176
+ meals_confirmed: products.length,
177
+ message: `Order confirmed for ${params.date}! ${products.length} meals locked in. Order ID: ${result.id}`,
178
+ };
179
+ return { content: [{ type: "text", text: output.message }], structuredContent: toStructured(output) };
180
+ }
181
+ catch (error) {
182
+ return handleError(error);
183
+ }
184
+ });
185
+ }
186
+ //# sourceMappingURL=cart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cart.js","sourceRoot":"","sources":["../../src/tools/cart.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEjH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEnE,MAAM,UAAU,iBAAiB,CAAC,MAAiB,EAAE,GAAiB;IACpE,MAAM,CAAC,YAAY,CACjB,uBAAuB,EACvB;QACE,KAAK,EAAE,4BAA4B;QACnC,WAAW,EAAE;;;;;;;;;;;;;;;;uFAgBoE;QACjF,WAAW,EAAE,eAAe;QAC5B,WAAW,EAAE;YACX,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,KAAK;YACrB,aAAa,EAAE,IAAI;SACpB;KACF,EACD,KAAK,EAAE,MAAsB,EAAE,EAAE;QAC/B,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,CAA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AAM,+BAA+B,MAAM,CAAC,EAAE,EAAE;aAC1G,CAAC;YACF,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,iBAAiB,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;QACxG,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { CookUnityAPI } from "../services/api.js";
3
+ export declare function registerDeliveryTools(server: McpServer, api: CookUnityAPI): void;
4
+ //# sourceMappingURL=deliveries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deliveries.d.ts","sourceRoot":"","sources":["../../src/tools/deliveries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAgBvD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,YAAY,GAAG,IAAI,CA4MhF"}
@@ -0,0 +1,190 @@
1
+ import { ListDeliveriesSchema, GetCartSchema, SkipDeliverySchema, UnskipDeliverySchema, } from "../schemas/index.js";
2
+ import { ResponseFormat } from "../constants.js";
3
+ import { getNextMonday, formatDelivery, handleError, toStructured } from "../services/helpers.js";
4
+ export function registerDeliveryTools(server, api) {
5
+ server.registerTool("cookunity_list_deliveries", {
6
+ title: "List Upcoming CookUnity Deliveries",
7
+ description: `List upcoming delivery weeks with status (locked/active/skipped/paused), cart contents, and cutoff deadlines. This is the primary tool for understanding the user's delivery calendar. Only shows Monday delivery days.
8
+
9
+ Args:
10
+ - response_format ('markdown'|'json')
11
+
12
+ Returns (JSON): { deliveries[{ date, status, can_edit, menu_available, cutoff, cutoff_timezone, cart_items[], cart_count }] }
13
+
14
+ Examples:
15
+ - See upcoming weeks: {}
16
+ - Check what's in my carts: {}
17
+
18
+ Error Handling:
19
+ - Auth errors suggest checking credentials`,
20
+ inputSchema: ListDeliveriesSchema,
21
+ annotations: {
22
+ readOnlyHint: true,
23
+ destructiveHint: false,
24
+ idempotentHint: true,
25
+ openWorldHint: true,
26
+ },
27
+ }, async (params) => {
28
+ try {
29
+ const days = await api.getUpcomingDays();
30
+ // Filter to Mondays only
31
+ const mondays = days.filter((d) => {
32
+ const dt = new Date(d.date + "T00:00:00Z");
33
+ return dt.getUTCDay() === 1;
34
+ });
35
+ const deliveries = mondays.map(formatDelivery);
36
+ const output = { total: deliveries.length, deliveries };
37
+ if (params.response_format === ResponseFormat.JSON) {
38
+ return { content: [{ type: "text", text: JSON.stringify(output, null, 2) }], structuredContent: toStructured(output) };
39
+ }
40
+ const lines = ["# Upcoming Deliveries", ""];
41
+ for (const d of deliveries) {
42
+ const statusEmoji = d.status === "active" ? "✅" : d.status === "skipped" ? "⏭️" : d.status === "paused" ? "⏸️" : "🔒";
43
+ lines.push(`## ${d.date} ${statusEmoji} ${d.status.toUpperCase()}`);
44
+ if (d.cutoff)
45
+ lines.push(`**Cutoff**: ${d.cutoff} (${d.cutoff_timezone ?? ""})`);
46
+ lines.push(`**Editable**: ${d.can_edit ? "Yes" : "No"} | **Menu available**: ${d.menu_available ? "Yes" : "No"}`);
47
+ if (d.cart_count > 0) {
48
+ lines.push(`**Cart** (${d.cart_count} items):`);
49
+ for (const item of d.cart_items) {
50
+ lines.push(` - ${item.name} x${item.quantity} — $${item.price.toFixed(2)} (${item.chef})`);
51
+ }
52
+ }
53
+ else {
54
+ lines.push("**Cart**: Empty");
55
+ }
56
+ lines.push("");
57
+ }
58
+ return { content: [{ type: "text", text: lines.join("\n") }], structuredContent: toStructured(output) };
59
+ }
60
+ catch (error) {
61
+ return handleError(error);
62
+ }
63
+ });
64
+ server.registerTool("cookunity_get_cart", {
65
+ title: "Get CookUnity Cart",
66
+ description: `Get cart contents for a specific delivery date.
67
+
68
+ Args:
69
+ - date (string, optional): YYYY-MM-DD. Defaults to next Monday.
70
+ - response_format ('markdown'|'json')
71
+
72
+ Returns (JSON): { date, can_edit, is_skipped, cutoff, items[{ name, inventory_id, quantity, price, chef }], total_items, total_price }
73
+
74
+ Error Handling:
75
+ - Returns "Date not found" if date is not in upcoming deliveries`,
76
+ inputSchema: GetCartSchema,
77
+ annotations: {
78
+ readOnlyHint: true,
79
+ destructiveHint: false,
80
+ idempotentHint: true,
81
+ openWorldHint: true,
82
+ },
83
+ }, async (params) => {
84
+ try {
85
+ const date = params.date ?? getNextMonday();
86
+ const days = await api.getUpcomingDays();
87
+ const day = days.find((d) => d.date === date || d.displayDate === date);
88
+ if (!day) {
89
+ return { content: [{ type: "text", text: `Error: Date ${date} not found in upcoming deliveries. Use cookunity_list_deliveries to see available dates.` }], isError: true };
90
+ }
91
+ const items = (day.cart || []).map((c) => ({
92
+ name: c.product?.name ?? "Unknown",
93
+ inventory_id: c.product?.inventoryId ?? "",
94
+ quantity: c.qty,
95
+ price: c.product?.price_incl_tax ?? 0,
96
+ chef: `${c.product?.chef_firstname ?? ""} ${c.product?.chef_lastname ?? ""}`.trim(),
97
+ }));
98
+ const output = {
99
+ date: day.displayDate,
100
+ can_edit: day.canEdit,
101
+ is_skipped: day.skip,
102
+ cutoff: day.cutoff?.time ?? null,
103
+ items,
104
+ total_items: items.reduce((s, i) => s + i.quantity, 0),
105
+ total_price: items.reduce((s, i) => s + i.price * i.quantity, 0),
106
+ };
107
+ if (params.response_format === ResponseFormat.JSON) {
108
+ return { content: [{ type: "text", text: JSON.stringify(output, null, 2) }], structuredContent: toStructured(output) };
109
+ }
110
+ const lines = [`# Cart — ${output.date}`, `Status: ${day.skip ? "Skipped" : day.canEdit ? "Editable" : "Locked"}`, ""];
111
+ if (items.length === 0) {
112
+ lines.push("Cart is empty.");
113
+ }
114
+ else {
115
+ for (const item of items) {
116
+ lines.push(`- **${item.name}** x${item.quantity} — $${item.price.toFixed(2)} (${item.chef})`);
117
+ }
118
+ lines.push("", `**Total**: ${output.total_items} items, $${output.total_price.toFixed(2)}`);
119
+ }
120
+ return { content: [{ type: "text", text: lines.join("\n") }], structuredContent: toStructured(output) };
121
+ }
122
+ catch (error) {
123
+ return handleError(error);
124
+ }
125
+ });
126
+ server.registerTool("cookunity_skip_delivery", {
127
+ title: "Skip CookUnity Delivery",
128
+ description: `Skip a delivery week. The week must be editable (not past cutoff).
129
+
130
+ Args:
131
+ - date (string, required): YYYY-MM-DD delivery date to skip
132
+
133
+ Returns: Confirmation message with skip ID
134
+
135
+ Error Handling:
136
+ - Past cutoff: returns error suggesting checking cutoff with list_deliveries
137
+ - Already skipped: returns API error`,
138
+ inputSchema: SkipDeliverySchema,
139
+ annotations: {
140
+ readOnlyHint: false,
141
+ destructiveHint: false,
142
+ idempotentHint: true,
143
+ openWorldHint: true,
144
+ },
145
+ }, async (params) => {
146
+ try {
147
+ const result = await api.skipDelivery(params.date);
148
+ if (result.__typename === "OrderCreationError") {
149
+ return { content: [{ type: "text", text: `Error: ${result.error ?? "Failed to skip delivery"}. Check cutoff with cookunity_list_deliveries.` }], isError: true };
150
+ }
151
+ const output = { success: true, date: params.date, skip_id: result.id, message: `Delivery for ${params.date} has been skipped.` };
152
+ return { content: [{ type: "text", text: output.message }], structuredContent: toStructured(output) };
153
+ }
154
+ catch (error) {
155
+ return handleError(error);
156
+ }
157
+ });
158
+ server.registerTool("cookunity_unskip_delivery", {
159
+ title: "Unskip CookUnity Delivery",
160
+ description: `Unskip a previously skipped delivery week.
161
+
162
+ Args:
163
+ - date (string, required): YYYY-MM-DD delivery date to unskip
164
+
165
+ Returns: Confirmation message
166
+
167
+ Error Handling:
168
+ - Week not skipped: returns API error`,
169
+ inputSchema: UnskipDeliverySchema,
170
+ annotations: {
171
+ readOnlyHint: false,
172
+ destructiveHint: false,
173
+ idempotentHint: true,
174
+ openWorldHint: true,
175
+ },
176
+ }, async (params) => {
177
+ try {
178
+ const result = await api.unskipDelivery(params.date);
179
+ if (result.__typename === "OrderCreationError") {
180
+ return { content: [{ type: "text", text: `Error: ${result.error ?? "Failed to unskip delivery"}.` }], isError: true };
181
+ }
182
+ const output = { success: true, date: params.date, message: `Delivery for ${params.date} has been unskipped.` };
183
+ return { content: [{ type: "text", text: output.message }], structuredContent: toStructured(output) };
184
+ }
185
+ catch (error) {
186
+ return handleError(error);
187
+ }
188
+ });
189
+ }
190
+ //# sourceMappingURL=deliveries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deliveries.js","sourceRoot":"","sources":["../../src/tools/deliveries.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAElG,MAAM,UAAU,qBAAqB,CAAC,MAAiB,EAAE,GAAiB;IACxE,MAAM,CAAC,YAAY,CACjB,2BAA2B,EAC3B;QACE,KAAK,EAAE,oCAAoC;QAC3C,WAAW,EAAE;;;;;;;;;;;;6CAY0B;QACvC,WAAW,EAAE,oBAAoB;QACjC,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;KACF,EACD,KAAK,EAAE,MAA2B,EAAE,EAAE;QACpC,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,eAAe,EAAE,CAAC;YACzC,yBAAyB;YACzB,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;gBAChC,MAAM,EAAE,GAAG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,EAAE,iBAAiB,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;QACxG,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import type { CookUnityAPI } from "../services/api.js";
3
+ export declare function registerMenuTools(server: McpServer, api: CookUnityAPI): void;
4
+ //# sourceMappingURL=menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/tools/menu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAMvD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,YAAY,GAAG,IAAI,CA+S5E"}