yazio-mcp 0.0.2 → 0.0.5

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
@@ -16,7 +16,7 @@ An MCP (Model Context Protocol) server that connects Claude/Cursor to your Yazio
16
16
  - 🏃‍♂️ **Fitness Data** - Track exercises and water intake
17
17
  - ⚖️ **Weight Monitoring** - View weight history and trends
18
18
  - 🎯 **Goal Management** - Access and manage nutrition goals
19
- - 🔍 **Product Search** - Search Yazio's extensive food database
19
+ - 🔍 **Product Search** - Search Yazio's extensive [food database](https://www.yazio.com/en/foods)
20
20
 
21
21
  ## 🚀 Quick Start
22
22
 
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ class YazioMcpServer {
11
11
  constructor() {
12
12
  this.server = new Server({
13
13
  name: 'yazio-mcp',
14
- version: '0.0.2',
14
+ version: '0.0.5',
15
15
  }, {
16
16
  capabilities: {
17
17
  tools: {},
@@ -56,16 +56,6 @@ class YazioMcpServer {
56
56
  setupToolHandlers() {
57
57
  this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
58
58
  tools: [
59
- {
60
- name: 'get_product',
61
- description: 'Get detailed information about a specific product by ID',
62
- inputSchema: zodToJsonSchema(GetProductInputSchema),
63
- annotations: {
64
- readOnlyHint: true,
65
- idempotentHint: true,
66
- openWorldHint: true
67
- }
68
- },
69
59
  {
70
60
  name: 'get_user',
71
61
  description: 'Get Yazio user profile information',
@@ -148,6 +138,15 @@ class YazioMcpServer {
148
138
  idempotentHint: true
149
139
  }
150
140
  },
141
+ {
142
+ name: 'get_user_daily_summary',
143
+ description: 'Get daily nutrition summary for a specific date',
144
+ inputSchema: zodToJsonSchema(GetDailySummaryInputSchema),
145
+ annotations: {
146
+ readOnlyHint: true,
147
+ idempotentHint: true
148
+ }
149
+ },
151
150
  {
152
151
  name: 'search_products',
153
152
  description: 'Search for food products in Yazio database',
@@ -159,12 +158,13 @@ class YazioMcpServer {
159
158
  }
160
159
  },
161
160
  {
162
- name: 'get_user_daily_summary',
163
- description: 'Get daily nutrition summary for a specific date',
164
- inputSchema: zodToJsonSchema(GetDailySummaryInputSchema),
161
+ name: 'get_product',
162
+ description: 'Get detailed information about a specific product by ID',
163
+ inputSchema: zodToJsonSchema(GetProductInputSchema),
165
164
  annotations: {
166
165
  readOnlyHint: true,
167
- idempotentHint: true
166
+ idempotentHint: true,
167
+ openWorldHint: true
168
168
  }
169
169
  },
170
170
  {
@@ -418,8 +418,6 @@ class YazioMcpServer {
418
418
  async addUserConsumedItem(args) {
419
419
  const client = await this.ensureAuthenticated();
420
420
  try {
421
- // The Yazio API expects specific parameters, we'll pass them directly
422
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
423
421
  const result = await client.user.addConsumedItem(args);
424
422
  return {
425
423
  content: [
package/dist/schemas.d.ts CHANGED
@@ -94,23 +94,29 @@ export declare const GetUserSuggestedProductsInputSchema: z.ZodObject<{
94
94
  limit?: number | undefined;
95
95
  }>;
96
96
  export declare const AddConsumedItemInputSchema: z.ZodObject<{
97
- productId: z.ZodOptional<z.ZodString>;
98
- amount: z.ZodOptional<z.ZodNumber>;
99
- unit: z.ZodOptional<z.ZodString>;
100
- date: z.ZodOptional<z.ZodString>;
101
- mealType: z.ZodOptional<z.ZodEnum<["breakfast", "lunch", "dinner", "snack"]>>;
97
+ id: z.ZodString;
98
+ product_id: z.ZodString;
99
+ date: z.ZodUnion<[z.ZodString, z.ZodDate]>;
100
+ daytime: z.ZodEnum<["breakfast", "lunch", "dinner", "snack"]>;
101
+ amount: z.ZodNumber;
102
+ serving: z.ZodString;
103
+ serving_quantity: z.ZodNumber;
102
104
  }, "strip", z.ZodTypeAny, {
103
- date?: string | undefined;
104
- productId?: string | undefined;
105
- amount?: number | undefined;
106
- unit?: string | undefined;
107
- mealType?: "breakfast" | "lunch" | "dinner" | "snack" | undefined;
105
+ date: string | Date;
106
+ id: string;
107
+ product_id: string;
108
+ daytime: "breakfast" | "lunch" | "dinner" | "snack";
109
+ amount: number;
110
+ serving: string;
111
+ serving_quantity: number;
108
112
  }, {
109
- date?: string | undefined;
110
- productId?: string | undefined;
111
- amount?: number | undefined;
112
- unit?: string | undefined;
113
- mealType?: "breakfast" | "lunch" | "dinner" | "snack" | undefined;
113
+ date: string | Date;
114
+ id: string;
115
+ product_id: string;
116
+ daytime: "breakfast" | "lunch" | "dinner" | "snack";
117
+ amount: number;
118
+ serving: string;
119
+ serving_quantity: number;
114
120
  }>;
115
121
  export declare const RemoveConsumedItemInputSchema: z.ZodObject<{
116
122
  itemId: z.ZodString;
package/dist/schemas.js CHANGED
@@ -32,11 +32,13 @@ export const GetUserExercisesInputSchema = OptionalDateInputSchema; // Only supp
32
32
  export const GetUserSettingsInputSchema = EmptyInputSchema;
33
33
  export const GetUserSuggestedProductsInputSchema = OptionalQueryInputSchema;
34
34
  export const AddConsumedItemInputSchema = z.object({
35
- productId: z.string().optional().describe('ID of the product to add'),
36
- amount: z.number().optional().describe('Amount of the product consumed'),
37
- unit: z.string().optional().describe('Unit of measurement (g, ml, pieces, etc.)'),
38
- date: z.string().optional().describe('Date when the food was consumed (defaults to today) in YYYY-MM-DD format'),
39
- mealType: DaytimeSchema.optional().describe('Type of meal')
35
+ id: z.string().describe('Unique identifier for the consumed item'),
36
+ product_id: z.string().describe('ID of the product to add'),
37
+ date: z.union([z.string(), z.date()]).describe('Date when the food was consumed in YYYY-MM-DD format or Date object'),
38
+ daytime: DaytimeSchema.describe('Type of meal (breakfast, lunch, dinner, snack)'),
39
+ amount: z.number().describe('Amount of the product consumed'),
40
+ serving: z.string().describe('Serving description'),
41
+ serving_quantity: z.number().describe('Quantity of servings')
40
42
  });
41
43
  export const RemoveConsumedItemInputSchema = z.object({
42
44
  itemId: ItemIdSchema.describe('ID of the consumed item to remove')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yazio-mcp",
3
- "version": "0.0.2",
3
+ "version": "0.0.5",
4
4
  "description": "MCP server for accessing Yazio user & nutrition data (unofficial)",
5
5
  "mcpName": "io.github.fliptheweb/yazio-mcp",
6
6
  "author": "fliptheweb",