Skip to main content
Glama
fitdays-mcp-server

fitdays-mcp-server

by brad28820

Latest weight

get_latest_weight

Retrieves the current body-composition and weight measurement for all users or one sub-user, using a 5-minute shared cache and lazy sync.

Instructions

Return the most recent body-composition / weight measurement in the current global cache, optionally for a single sub-user (suid). Data is fetched lazily when no valid cache exists and stored in a global cache shared by all tools for 5 minutes; subsequent queries use that cached snapshot until it expires. Use refresh_sync if you are within the 5-minute cache window and fresher data is required. Returns exactly one measurement containing weight_kg, weight_lb, bmi, bfr_pct (body fat percentage), rom_pct (muscle percentage), rosm_pct (skeletal muscle percentage), vwc_pct (body water percentage), pp_pct (protein percentage), sfr_pct (subcutaneous fat percentage), uvi (visceral fat index), bm_kg (bone mass), bmr_kcal (basal metabolic rate), bodyage (body age), measured_at (ISO 8601 timestamp), measured_time (Unix-seconds timestamp), data_id, suid, uid, is_deleted, and ext_data, or null if no matching measurement exists. ext_data contains the measured person's context and FitDays reference values for interpreting the weight metrics. Treat these as informational rather than authoritative, and adjust them to the person's actual situation. Context fields describe the person and measurement state, including age, height, sex (female or male), and onlyMeasureWeight (whether the record contains weight only). Range and standard fields provide reference targets: Min and Max define the reference range, while Standard is the recommended value. They include body-fat mass, body-fat percentage, BMI, basal metabolic rate, bone mass, muscle mass, skeletal muscle mass, protein mass, water mass, and weight fields. Control fields indicate the suggested adjustment toward the corresponding Standard value, including bfmControl (body-fat mass), ffmControl (fat-free mass), and weightControl (weight). Fat-free-mass reference fields provide the recommended fat-free mass, including ffmStandard. Index fields provide skeletal-muscle indexing, including smi (skeletal muscle index). Classification fields describe body-composition status, including bodyScore, bodyType, and obesityDegree. Target fields describe target body-composition values, including targetWeight, targetBodyfatMass, and targetSMMMass; unavailable target-mass values are null. Device fields identify the source device, including deviceModelExt, deviceNameExt, and deviceSoftwareVer. By default ignores tombstoned records (is_deleted: 1).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_latest_weight"
  }
}

Input Schema

NameRequiredDescriptionDefault
suidNoSub-user id resolved by `list_users`. Omit to return the latest record across all users.
include_deletedNoInclude records with `is_deleted: 1`. Default: false.
include_ext_dataNoInclude the `ext_data` reference/context object. Set to false to omit it. Default: true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.2/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full burden, and it does: lazy fetch on cache miss, a 5-minute TTL, a global cache shared across all tools, the escape hatch via `refresh_sync`, tombstoned records ignored by default, and `null` returned when no measurement matches. That is exactly the operational context an agent needs to call this repeatedly without misreading stale results as live data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose, cache semantics, and alternative routing are correctly front-loaded in the first two sentences, and those earn their place. The remainder is a long unbroken enumeration of return fields and `ext_data` sub-fields that reads as a wall of prose without structure, and much of it is metadata an agent rarely needs in order to pick a tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description has to cover return shape and behavior itself, and it does so thoroughly: exact field list, `null` case, tombstone default, cache lifetime, and the nature of `ext_data` reference values. Nothing material is missing for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, and the description goes beyond it by explaining what `ext_data` actually contains (context, range/standard, control, index, classification, target, and device fields), which helps an agent decide whether to set `include_ext_data: false`. It adds less for `suid` and `include_deleted`, which the schema already documents well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Return the most recent body-composition / weight measurement') and states its scope ('in the current global cache, optionally for a single sub-user'). It clearly separates itself from `refresh_sync`, but never contrasts with nearby siblings such as `get_weight_history` or `get_todays_weigh_ins`, which an agent deciding between a single latest reading and a history call would want.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing is given for the freshness case: use `refresh_sync` when inside the 5-minute window and fresher data is required. It also states the default behavior for deleted records. What is missing is guidance against history-style siblings, so the agent must infer when to prefer `get_weight_history` over this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.