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.
To correct an existing food, prefer mfp_edit_food (edits in place via PATCH);
creating a corrected copy and deleting the old one also works.
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