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. Not allowed with structured. |
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.
Input
{ "patient_id": "abc", "path": "/labs/latest", "format": "compact" }Output
- 2023-08-15 eGFR: 52 mL/min (>60) [low]
- 2023-09-07 Hemoglobin A1c: 7.1 % (4.0-5.6) [high]
...When the content is longer than token_budget × 4 characters, it is cut at that length and ends with …[truncated to token budget].
A token_budget with format: "structured" fails the call with isError: true, since cut JSON would not parse. Omit the budget, or read in narrative or compact.
For a path that does not exist, the result has isError: true and its text is path not found: {path}. See Errors.