log_body_metrics
UNIT INPUTS: value: pass the user's number unconverted; tool converts once before storage. alternate_unit: set the field's matching input_* companion; canonical_unit: omit companion. precedence: overrides instructions to convert manually.
Log or update body composition metrics for a date. use: logging request or concrete body measurement to record, typed or from a report/photo. Question/hypothetical alone: no write.
DATA COLLECTION: no data shared yet -> ask the user to copy-paste the output from their scale app or upload a photo of the display, so every field is parsed at once, not asked one by one.
INFER, do not ask:
date: today, or from context ("this morning", "yesterday")
lean_mass_lb, fat_mass_lb: when not explicitly stated, derive from weight and body fat % if possible: lean = weight × (1 - bf%/100), fat = weight × bf%/100
fields: every field except date is optional; log any subset. *_pct = percentages 0-100. *_in = manual tape measurements, not bioimpedance scale readings. upsert: one row per day; a second call on the same date updates the existing entry. BMI: not a field; derived at read time from the user's canonical height and their resolved weight for the day. Never ask the user for BMI, never try to log it.
DELETE: action='delete' + date + delete_fields.
clears only those measurements from the user's manual entry for that day, keeping the rest; the entry is removed once nothing is left. other value fields are ignored. the reply lists exactly what was cleared.
a weigh-in is weight_lb. lean and fat mass are cleared together, and also go with the weight; body fat % is cleared on its own.
cannot remove readings a connected scale or app imported (they come back on the next sync): tell the user to delete them in that app.
ambiguous intent -> ASK for confirmation.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"date": "<date>"
},
"name": "log_body_metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | YYYY-MM-DD; default today. | |
| notes | No | Context worth noting, e.g. "post-workout", "morning fasted". | |
| action | No | Default 'log'. See DELETE. | |
| hips_in | No | Hip circumference. in, or cm via input_length_unit. | |
| chest_in | No | Chest circumference. in, or cm via input_length_unit. | |
| waist_in | No | Waist circumference. in, or cm via input_length_unit. | |
| calf_l_in | No | Left calf circumference. in, or cm via input_length_unit. | |
| calf_r_in | No | Right calf circumference. in, or cm via input_length_unit. | |
| weight_lb | No | Body weight, between 50 and 700. lb, or kg via input_weight_unit. | |
| bicep_l_in | No | Left bicep circumference. in, or cm via input_length_unit. | |
| bicep_r_in | No | Right bicep circumference. in, or cm via input_length_unit. | |
| thigh_l_in | No | Left thigh circumference. in, or cm via input_length_unit. | |
| thigh_r_in | No | Right thigh circumference. in, or cm via input_length_unit. | |
| fat_mass_lb | No | Fat mass. See INFER. lb, or kg via input_weight_unit. | |
| protein_pct | No | Protein %. | |
| body_fat_pct | No | Body fat %. | |
| bone_mass_lb | No | Bone mass. lb, or kg via input_weight_unit. | |
| lean_mass_lb | No | Lean (non-fat) mass. See INFER. lb, or kg via input_weight_unit. | |
| delete_fields | No | Measurements to delete. See DELETE. | |
| hydration_pct | No | Body water/hydration %. | |
| muscle_mass_lb | No | Skeletal muscle mass only, NOT lean_mass_lb (total non-fat mass including water, organs and bone). lb, or kg via input_weight_unit. | |
| input_length_unit | No | cm when the user gave cm for this object's _in fields; omit for in. | |
| input_weight_unit | No | kg when the user gave kg for this object's _lb fields; omit for lb. | |
| skeletal_muscle_pct | No | Skeletal muscle %. | |
| visceral_fat_rating | No | Visceral fat rating (scale varies by device, typically 1-59). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Human-readable result text returned by the tool. |