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 +1 -1
- package/dist/index.js +15 -17
- package/dist/schemas.d.ts +21 -15
- package/dist/schemas.js +7 -5
- package/package.json +1 -1
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.
|
|
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: '
|
|
163
|
-
description: 'Get
|
|
164
|
-
inputSchema: zodToJsonSchema(
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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')
|