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
| Argument | Type | Required | Description |
|---|---|---|---|
patient_id | string | Yes | The patient's patientId. See Shared arguments. |
path | string | Yes | A path relative to the patient, such as /labs/latest. See Paths. |
format | string | No | narrative (default), structured or compact. See Formats. |
token_budget | number | No | Approximate cap on the output, in tokens of 4 characters. Omit for no cap. |
session_id | string | No | A session to record the call on. See Record calls on a session. |
Formats
| Format | Output | Typical tokens |
|---|---|---|
narrative | Prose Markdown with clinical context | 300–800 |
structured | JSON with every field | 200–500 |
compact | Key facts only | 50–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.
{ "patient_id": "abc", "path": "/labs/latest", "format": "compact" }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.