diff --git a/src/cronometer_api_mcp/client.py b/src/cronometer_api_mcp/client.py index fc0701e..c1e8546 100644 --- a/src/cronometer_api_mcp/client.py +++ b/src/cronometer_api_mcp/client.py @@ -307,6 +307,7 @@ def create_custom_food( fiber_g: float = 0, sugar_g: float = 0, sodium_mg: float = 0, + saturated_fat_g: float = 0, serving_name: str = "1 serving", serving_grams: float = 100.0, ) -> dict: @@ -331,6 +332,10 @@ def create_custom_food( {"id": NUTRIENT_IDS["fiber"], "amount": round(fiber_g * scale, 2)}, {"id": NUTRIENT_IDS["sugar"], "amount": round(sugar_g * scale, 2)}, {"id": NUTRIENT_IDS["sodium"], "amount": round(sodium_mg * scale, 2)}, + { + "id": NUTRIENT_IDS["saturated_fat"], + "amount": round(saturated_fat_g * scale, 2), + }, # Derived / calculated fields the app includes {"id": -203, "amount": round(protein_g * scale, 2)}, {"id": -204, "amount": round(fat_g * scale, 2)}, diff --git a/src/cronometer_api_mcp/server.py b/src/cronometer_api_mcp/server.py index ddf0d2d..b041412 100644 --- a/src/cronometer_api_mcp/server.py +++ b/src/cronometer_api_mcp/server.py @@ -517,6 +517,7 @@ def add_custom_food( fiber_g: float = 0, sugar_g: float = 0, sodium_mg: float = 0, + saturated_fat_g: float = 0, serving_name: str = "1 serving", serving_grams: float = 100.0, ) -> str: @@ -534,6 +535,7 @@ def add_custom_food( fiber_g: Fiber per serving (g, default 0). sugar_g: Sugar per serving (g, default 0). sodium_mg: Sodium per serving (mg, default 0). + saturated_fat_g: Saturated fat per serving (g, default 0). serving_name: Name for the serving size (default "1 serving"). serving_grams: Weight of one serving in grams (default 100). """ @@ -548,6 +550,7 @@ def add_custom_food( fiber_g=fiber_g, sugar_g=sugar_g, sodium_mg=sodium_mg, + saturated_fat_g=saturated_fat_g, serving_name=serving_name, serving_grams=serving_grams, )