cronometer-api-mcp 0.2.6__tar.gz → 0.2.7__tar.gz
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.
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/PKG-INFO +31 -5
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/README.md +30 -4
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/pyproject.toml +1 -1
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/server.json +2 -2
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/src/cronometer_api_mcp/client.py +1117 -91
- cronometer_api_mcp-0.2.7/src/cronometer_api_mcp/macro.py +37 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/src/cronometer_api_mcp/server.py +412 -49
- cronometer_api_mcp-0.2.7/tests/test_biometrics_write.py +53 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/tests/test_client.py +2 -1
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/tests/test_custom_food_edit.py +348 -5
- cronometer_api_mcp-0.2.7/tests/test_diary_delete.py +120 -0
- cronometer_api_mcp-0.2.7/tests/test_diary_groups.py +733 -0
- cronometer_api_mcp-0.2.7/tests/test_entry_time.py +79 -0
- cronometer_api_mcp-0.2.7/tests/test_exercise.py +76 -0
- cronometer_api_mcp-0.2.7/tests/test_macro_split.py +237 -0
- cronometer_api_mcp-0.2.7/tests/test_macro_targets.py +269 -0
- cronometer_api_mcp-0.2.7/tests/test_notes.py +268 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/tests/test_relative_dates.py +2 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/tests/test_server_import.py +11 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/tests/test_timezone.py +15 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/uv.lock +28 -28
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/.dockerignore +0 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/.env.example +0 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/.github/dependabot.yml +0 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/.github/workflows/ci.yml +0 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/.github/workflows/docker.yml +0 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/.github/workflows/publish.yml +0 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/.gitignore +0 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/.python-version +0 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/Dockerfile +0 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/LICENSE +0 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/src/cronometer_api_mcp/__init__.py +0 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/src/cronometer_api_mcp/barcode.py +0 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/tests/test_barcode.py +0 -0
- {cronometer_api_mcp-0.2.6 → cronometer_api_mcp-0.2.7}/tests/test_totp.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: cronometer-api-mcp
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: MCP server for Cronometer nutrition data using the mobile REST API
|
|
5
5
|
Author: Randy
|
|
6
6
|
License-Expression: MIT
|
|
@@ -137,7 +137,7 @@ cached session, so it also overrides a stale cached timezone.
|
|
|
137
137
|
|
|
138
138
|
| Tool | Description |
|
|
139
139
|
|------|-------------|
|
|
140
|
-
| `get_food_log` | Diary entries for a date, each enriched with food name, source, serving measure/count,
|
|
140
|
+
| `get_food_log` | Diary entries for a date, each enriched with food name, source, serving measure/count, that food's per-entry nutrient contribution, and the diary group (meal slot) it sits in, plus an energy_summary (target/consumed/remaining kcal) and a nutrition_summary of consumed totals for every tracked nutrient |
|
|
141
141
|
| `get_daily_nutrition` | Consumed macro and micronutrient totals for every nutrient tracked in Cronometer |
|
|
142
142
|
| `get_nutrition_scores` | Category scores (Vitamins, Minerals, etc.) with per-nutrient consumed amounts and confidence levels |
|
|
143
143
|
|
|
@@ -152,28 +152,54 @@ cached session, so it also overrides a stale cached timezone.
|
|
|
152
152
|
|
|
153
153
|
| Tool | Description |
|
|
154
154
|
|------|-------------|
|
|
155
|
-
| `
|
|
156
|
-
| `
|
|
155
|
+
| `get_diary_groups` | The account's diary groups (meal slots) and their names, for interpreting the group in each entry's `order` |
|
|
156
|
+
| `add_food_entry` | Log a food serving to the diary, optionally at a given time of day |
|
|
157
|
+
| `remove_food_entry` | Remove one or more diary entries: foods, exercises, notes or biometrics |
|
|
157
158
|
| `add_custom_food` | Create a custom food with specified nutrition and optional barcodes |
|
|
158
159
|
| `update_custom_food` | Edit a custom food in place: name, nutrition, serving size, or barcodes |
|
|
159
160
|
| `delete_custom_food` | Retire a custom food so it leaves search and the Custom Foods list (existing diary entries are kept) |
|
|
161
|
+
| `delete_recipe` | Delete a recipe or saved meal: retired by default (diary entries are kept), or permanently, which also removes the diary entries that logged it |
|
|
160
162
|
| `add_recipe` | Create a recipe from existing foods referenced by ID and gram weight |
|
|
163
|
+
| `update_recipe` | Edit a recipe in place: name, ingredients and amounts, serving size, or notes; nutrition is recalculated |
|
|
161
164
|
| `import_recipe` | Create a recipe from a free-text ingredient list; Cronometer matches each line to a database food and converts the amount to grams |
|
|
162
165
|
| `copy_day` | Copy all entries from the previous day |
|
|
163
166
|
| `mark_day_complete` | Mark a diary day as complete or incomplete |
|
|
167
|
+
| `add_note` | Add a note to a diary day, optionally at a given time of day |
|
|
168
|
+
| `update_note` | Replace the text of a diary note |
|
|
164
169
|
|
|
165
170
|
### Targets & Tracking
|
|
166
171
|
|
|
167
172
|
| Tool | Description |
|
|
168
173
|
|------|-------------|
|
|
169
|
-
| `
|
|
174
|
+
| `search_activities` | Find activities to log as exercise, by name |
|
|
175
|
+
| `add_exercise` | Log an exercise with its duration and calories burned |
|
|
176
|
+
| `get_macro_targets` | Fixed-gram macro targets, weight goal, macro split (percent of energy), weekly macro schedule and saved target templates |
|
|
177
|
+
| `set_macro_targets` | Set protein / fat / net-carb targets in grams, the weekly weight goal (which moves the calorie target) and the sodium range; writes both the profile prefs and the per-nutrient target rows |
|
|
178
|
+
| `set_macro_split` | Set the protein / carbs / fat split in percent of energy |
|
|
170
179
|
| `get_fasting_history` | Fasting history within a date range |
|
|
171
180
|
| `get_fasting_stats` | Aggregate fasting statistics |
|
|
172
181
|
| `list_biometrics` | List trackable biometric metrics and their units |
|
|
173
182
|
| `get_biometrics` | Biometric time series (e.g. weight, body fat) within a date range |
|
|
183
|
+
| `add_biometric` | Record a biometric reading such as a weight or body fat |
|
|
174
184
|
|
|
175
185
|
All date parameters use `YYYY-MM-DD` format and default to today when omitted.
|
|
176
186
|
|
|
187
|
+
### Diary groups
|
|
188
|
+
|
|
189
|
+
`add_food_entry`, `add_note`, and `add_exercise` accept `diary_group="auto"`
|
|
190
|
+
or an enabled group name from `get_diary_groups`. Names match ignoring case
|
|
191
|
+
and whitespace, in any language. Group 0 and Uncategorized are writable;
|
|
192
|
+
duplicate enabled names must be made distinct in Cronometer.
|
|
193
|
+
|
|
194
|
+
`"auto"` requires unique enabled groups named Breakfast, Lunch, Dinner, and
|
|
195
|
+
Snacks, in any positions. It picks by the entry's time in the account timezone
|
|
196
|
+
(`time=` for food and notes, or now). If any of those names is missing,
|
|
197
|
+
disabled, or ambiguous, choose an explicit group name. Missing profile prefs
|
|
198
|
+
use compatibility defaults; explicit names and visibility flags take precedence.
|
|
199
|
+
|
|
200
|
+
Python client callers: omit `diary_group` or pass `None` for automatic selection.
|
|
201
|
+
An integer, including `0`, always selects that actual group number.
|
|
202
|
+
|
|
177
203
|
### Relative dates and recent days
|
|
178
204
|
|
|
179
205
|
`get_food_log`, `get_daily_nutrition`, and `get_nutrition_scores` also accept
|
|
@@ -117,7 +117,7 @@ cached session, so it also overrides a stale cached timezone.
|
|
|
117
117
|
|
|
118
118
|
| Tool | Description |
|
|
119
119
|
|------|-------------|
|
|
120
|
-
| `get_food_log` | Diary entries for a date, each enriched with food name, source, serving measure/count,
|
|
120
|
+
| `get_food_log` | Diary entries for a date, each enriched with food name, source, serving measure/count, that food's per-entry nutrient contribution, and the diary group (meal slot) it sits in, plus an energy_summary (target/consumed/remaining kcal) and a nutrition_summary of consumed totals for every tracked nutrient |
|
|
121
121
|
| `get_daily_nutrition` | Consumed macro and micronutrient totals for every nutrient tracked in Cronometer |
|
|
122
122
|
| `get_nutrition_scores` | Category scores (Vitamins, Minerals, etc.) with per-nutrient consumed amounts and confidence levels |
|
|
123
123
|
|
|
@@ -132,28 +132,54 @@ cached session, so it also overrides a stale cached timezone.
|
|
|
132
132
|
|
|
133
133
|
| Tool | Description |
|
|
134
134
|
|------|-------------|
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
135
|
+
| `get_diary_groups` | The account's diary groups (meal slots) and their names, for interpreting the group in each entry's `order` |
|
|
136
|
+
| `add_food_entry` | Log a food serving to the diary, optionally at a given time of day |
|
|
137
|
+
| `remove_food_entry` | Remove one or more diary entries: foods, exercises, notes or biometrics |
|
|
137
138
|
| `add_custom_food` | Create a custom food with specified nutrition and optional barcodes |
|
|
138
139
|
| `update_custom_food` | Edit a custom food in place: name, nutrition, serving size, or barcodes |
|
|
139
140
|
| `delete_custom_food` | Retire a custom food so it leaves search and the Custom Foods list (existing diary entries are kept) |
|
|
141
|
+
| `delete_recipe` | Delete a recipe or saved meal: retired by default (diary entries are kept), or permanently, which also removes the diary entries that logged it |
|
|
140
142
|
| `add_recipe` | Create a recipe from existing foods referenced by ID and gram weight |
|
|
143
|
+
| `update_recipe` | Edit a recipe in place: name, ingredients and amounts, serving size, or notes; nutrition is recalculated |
|
|
141
144
|
| `import_recipe` | Create a recipe from a free-text ingredient list; Cronometer matches each line to a database food and converts the amount to grams |
|
|
142
145
|
| `copy_day` | Copy all entries from the previous day |
|
|
143
146
|
| `mark_day_complete` | Mark a diary day as complete or incomplete |
|
|
147
|
+
| `add_note` | Add a note to a diary day, optionally at a given time of day |
|
|
148
|
+
| `update_note` | Replace the text of a diary note |
|
|
144
149
|
|
|
145
150
|
### Targets & Tracking
|
|
146
151
|
|
|
147
152
|
| Tool | Description |
|
|
148
153
|
|------|-------------|
|
|
149
|
-
| `
|
|
154
|
+
| `search_activities` | Find activities to log as exercise, by name |
|
|
155
|
+
| `add_exercise` | Log an exercise with its duration and calories burned |
|
|
156
|
+
| `get_macro_targets` | Fixed-gram macro targets, weight goal, macro split (percent of energy), weekly macro schedule and saved target templates |
|
|
157
|
+
| `set_macro_targets` | Set protein / fat / net-carb targets in grams, the weekly weight goal (which moves the calorie target) and the sodium range; writes both the profile prefs and the per-nutrient target rows |
|
|
158
|
+
| `set_macro_split` | Set the protein / carbs / fat split in percent of energy |
|
|
150
159
|
| `get_fasting_history` | Fasting history within a date range |
|
|
151
160
|
| `get_fasting_stats` | Aggregate fasting statistics |
|
|
152
161
|
| `list_biometrics` | List trackable biometric metrics and their units |
|
|
153
162
|
| `get_biometrics` | Biometric time series (e.g. weight, body fat) within a date range |
|
|
163
|
+
| `add_biometric` | Record a biometric reading such as a weight or body fat |
|
|
154
164
|
|
|
155
165
|
All date parameters use `YYYY-MM-DD` format and default to today when omitted.
|
|
156
166
|
|
|
167
|
+
### Diary groups
|
|
168
|
+
|
|
169
|
+
`add_food_entry`, `add_note`, and `add_exercise` accept `diary_group="auto"`
|
|
170
|
+
or an enabled group name from `get_diary_groups`. Names match ignoring case
|
|
171
|
+
and whitespace, in any language. Group 0 and Uncategorized are writable;
|
|
172
|
+
duplicate enabled names must be made distinct in Cronometer.
|
|
173
|
+
|
|
174
|
+
`"auto"` requires unique enabled groups named Breakfast, Lunch, Dinner, and
|
|
175
|
+
Snacks, in any positions. It picks by the entry's time in the account timezone
|
|
176
|
+
(`time=` for food and notes, or now). If any of those names is missing,
|
|
177
|
+
disabled, or ambiguous, choose an explicit group name. Missing profile prefs
|
|
178
|
+
use compatibility defaults; explicit names and visibility flags take precedence.
|
|
179
|
+
|
|
180
|
+
Python client callers: omit `diary_group` or pass `None` for automatic selection.
|
|
181
|
+
An integer, including `0`, always selects that actual group number.
|
|
182
|
+
|
|
157
183
|
### Relative dates and recent days
|
|
158
184
|
|
|
159
185
|
`get_food_log`, `get_daily_nutrition`, and `get_nutrition_scores` also accept
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/rwestergren/cronometer-api-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.7",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "pypi",
|
|
13
13
|
"identifier": "cronometer-api-mcp",
|
|
14
|
-
"version": "0.2.
|
|
14
|
+
"version": "0.2.7",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|