From 1e54f291a77fb9c1b26b83e27f0f5c72a011c8ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sat, 26 Sep 2026 13:39:11 +0200 Subject: [PATCH] docs(mcp): notes, held-back documents and module switches across every read --- docs/api/mcp-capabilities.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/docs/api/mcp-capabilities.md b/docs/api/mcp-capabilities.md index 31e7866c0..0d65f025e 100644 --- a/docs/api/mcp-capabilities.md +++ b/docs/api/mcp-capabilities.md @@ -103,12 +103,19 @@ What `search` matches for the clinical records: - `visit:`: visit kind (a procedure also answers to "surgery" and "operation"), reason, outcome, body site and side, practitioner name and specialty. -- `condition:`: label, type, body site and side, and the note. +- `condition:`: label, type, body site and side. - `document:`: title, file name, document kind ("discharge letter"), and whole words of the document's indexed text when one is stored. The - document itself is never read for a search. + document itself is never read for a search. A document uploaded with AI + reading deferred is matched on its title and details only. - `vaccination:`: vaccine name, catalogue name, practitioner. +Condition and vaccination notes are never searched or returned, the same +rule the Coach and the doctor report follow. A deleted practitioner is not +named or matched. Query words shorter than four letters match whole words or +word starts only. Titles and file names are also looked up in the database, +so an older document is found by them even outside the newest 500. + Body sites are matched after decryption, folded the way the body-sites view folds them, with German and English body-part names treated as one ("knee" finds "Knie"). Results are ordered by how many query words they match, then @@ -116,13 +123,19 @@ by field weight, then newest first, so the same query always returns the same list. A kind whose module is switched off (`illness`, `inboundDocuments`, `vaccinations`, and for the older kinds `medications` and `labs`) is neither searched nor fetched; `fetch` answers such an id with -`metadata.reason: "module_disabled"`. +`metadata.reason: "module_disabled"`. The same switches apply to every other +MCP read: `get_labs`, `get_medication_schedule`, `get_medication_compliance` +and the lab and medication resources answer +`{ present: false, reason: "module_disabled" }`, and `get_visits` withholds +condition labels (`conditionsReason: "module_disabled"`) when the illness +module is off. `fetch` on a clinical record returns its key fields, with never-recorded fields as `null`, and `metadata.links`: the records it is directly linked to, each with an id `fetch` accepts. A document returns its metadata and at most a 1,500-character excerpt of its indexed text, never the file, a download -URL, or its stored summary. All user-written text is wrapped in the +URL, or its stored summary. A document held back from AI reading returns no +excerpt and `metadata.reason: "ai_read_deferred"`. All user-written text is wrapped in the `<<>>` / `<<>>` fence. Every read tool is annotated read-only / non-destructive / idempotent /