mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 23:52:24 +00:00
feat(mcp): expose glucose, sleep, workout, illness, and cycle reads
Bridge the five already-built, grounded Coach retrieval tools the inventory already advertised but the wire was missing — closing the advertise-but-missing self-inconsistency — each a thin wrapper over the existing read with the same gates and present:false contract. Add a multi-metric fan-out that loops the single-metric read, and a per-analyte lab-history mode on the labs read. Declare a structured output schema on every remaining tool so structured content validates for both a miss and a hit. Page the large reads (search, lab history, multi-metric) behind an opaque cursor. Return plain-text, citation-ready summaries from fetch with per-item deep links instead of a JSON dump.
This commit is contained in:
1 parent
b40a963cb1
commit
af8afde63a
4 files changed
+601
-25
No files matched your search
@@ -81,6 +81,14 @@ const READ_TOOLS = [
|
||||
"compare_metric",
|
||||
"get_metric_baseline",
|
||||
"detect_changepoints",
|
||||
// v1.24 — Coach-F1 reads bridged to the wire.
|
||||
"get_glucose_panel",
|
||||
"get_sleep",
|
||||
"get_workouts",
|
||||
"get_illness_recovery",
|
||||
"get_cycle",
|
||||
// v1.24 — multi-metric fan-out.
|
||||
"get_metrics",
|
||||
].sort();
|
||||
|
||||
/** A valid, narrow-scope (`health:read`) token resolution. */
|
||||
@@ -342,6 +350,7 @@ describe("/mcp — write tools gate on health:write", () => {
|
||||
);
|
||||
expect(names).toContain("log_measurement");
|
||||
expect(names).toContain("log_mood");
|
||||
expect(names).toContain("log_blood_pressure");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user