good-eggs-mcp-server 0.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.
@@ -0,0 +1,43 @@
1
+ import { z } from 'zod';
2
+ // =============================================================================
3
+ // Tool Input Schemas
4
+ // =============================================================================
5
+ export const SearchGrocerySchema = z.object({
6
+ query: z
7
+ .string()
8
+ .describe('Search query for groceries (e.g., "organic apples", "milk", "bread")'),
9
+ });
10
+ const goodEggsUrlSchema = z
11
+ .string()
12
+ .url()
13
+ .refine((url) => url.startsWith('https://www.goodeggs.com/'), {
14
+ message: 'URL must be a Good Eggs URL (https://www.goodeggs.com/...)',
15
+ });
16
+ export const GetGroceryDetailsSchema = z.object({
17
+ grocery_url: goodEggsUrlSchema.describe('The Good Eggs URL of the grocery item to get details for'),
18
+ });
19
+ export const AddToCartSchema = z.object({
20
+ grocery_url: goodEggsUrlSchema.describe('The Good Eggs URL of the grocery item to add to cart'),
21
+ quantity: z
22
+ .number()
23
+ .int('Quantity must be a whole number')
24
+ .min(1)
25
+ .max(99, 'Quantity cannot exceed 99')
26
+ .optional()
27
+ .default(1)
28
+ .describe('Quantity to add (minimum 1, maximum 99, default: 1)'),
29
+ });
30
+ export const GetPastOrderGroceriesSchema = z.object({
31
+ past_order_date: z
32
+ .string()
33
+ .describe('The date of the past order to get groceries from (e.g., "2024-01-15")'),
34
+ });
35
+ export const AddFavoriteSchema = z.object({
36
+ grocery_url: goodEggsUrlSchema.describe('The Good Eggs URL of the grocery item to add to favorites'),
37
+ });
38
+ export const RemoveFavoriteSchema = z.object({
39
+ grocery_url: goodEggsUrlSchema.describe('The Good Eggs URL of the grocery item to remove from favorites'),
40
+ });
41
+ export const RemoveFromCartSchema = z.object({
42
+ grocery_url: goodEggsUrlSchema.describe('The Good Eggs URL of the grocery item to remove from cart'),
43
+ });