Create a private custom food in the user's MyFitnessPal account.
Fills the full nutrition panel MFP supports (macros, fats breakdown,
cholesterol, sodium, potassium, fiber, sugars, and the four %DV micros).
Uses the cookie-authenticated web endpoint, so no browser needs to be
running. Returns the new food's id, which mfp_add_food_to_diary accepts.
CARBS ARE NET (with the default country_code="NL"): pass net carbs in
`carbs`; MFP stores net_carbs as given and reports total = carbs + fiber.
Never pre-add fiber. Verified: carbs=42/fiber=8 stores 50/42 under "NL" but
42/34 with country_code omitted, so the field is load-bearing, not cosmetic.
MFP has no update endpoint. To correct a food, create the corrected version
then mfp_delete_custom_food the old one.
Args:
params: CreateCustomFoodInput (description, brand_name, serving_amount,
serving_unit, calories + optional nutrients, public, response_format)
Returns:
str: The created food's id, description and HTTP status