The Context Engine Studio is now open source.  View on GitHub →
Clinia
Tools

read_patient

Reads a path of a patient's virtual file tree in a chosen format, optionally capped to a token budget.

Reads one path of a patient's virtual file tree, in the format and length you choose.

Input

ArgumentTypeRequiredDescription
patient_idstringYesThe patient's patientId. See Shared arguments.
pathstringYesA path relative to the patient, such as /labs/latest. See Paths.
formatstringNonarrative (default), structured or compact. See Formats.
token_budgetnumberNoApproximate cap on the output, in tokens of 4 characters. Omit for no cap.
session_idstringNoA session to record the call on. See Record calls on a session.

Formats

FormatOutputTypical tokens
narrativeProse Markdown with clinical context300–800
structuredJSON with every field200–500
compactKey facts only50–150

VFS Paths details what each format holds for each kind of path.

Output

The content of the path, as text, in the requested format.

Input
{ "patient_id": "abc", "path": "/labs/latest", "format": "compact" }
Output
HbA1c 7.1% (2023-09-07) | eGFR 52 mL/min (2023-08-15) | ...

When the content is longer than token_budget × 4 characters, it is cut at that length and ends with …[truncated to token budget].

For a path that does not exist, Path not found: {path}. See Errors.

On this page