Search Patient Data
Use the search_patient MCP tool to find facts and events by keyword.
The Clinia Context Engine maintains a full-text index over all ingested patient data. The index covers entity display names, clinical codes, and attribute text. Search is available via the search_patient MCP tool.
Make the call
search_patient(
patient_id = "{patientId}",
query = "{query}"
)Query patterns
Single term (matches fact names, event summaries and document text):
search_patient(patient_id = "{patientId}", query = "tiotropium")Multi-term (a result must contain every term; results are ranked by how well they match):
search_patient(patient_id = "{patientId}", query = "COPD exacerbation")Matching is on English word stems, so medications matches medication.
Interpreting results
Results come back as a Markdown list. Each entry is a path, then its preview on the next line:
- /medications/active/fct_j9n3v6b1k8d4s7x2c5y0p4q1
tiotropium, inhalation — active
- /timeline/2023/ece_r2k8w5n1c7x4v9q3z6b0m8t2
2023-02-14 [encounter] COPD exacerbation; tiotropium continued, prednisone added
- /sources/progress_note/en_g9pzqpksszgn6fdnena1aht4/respirology_follow_up_ena1aht4.md
Respirology follow-up with spirometryEach result has:
- A path: the VFS path of the matching item, relative to the patient. Pass it directly to
read_patientto retrieve the full content. - A preview: a one-line summary of the item, not the passage that matched.
Agent workflow
Search is most useful when the agent doesn't know the exact VFS path. A typical pattern:
search_patientwith a keyword to get candidate pathsread_patienton the most relevant path to get full content- Repeat for additional context if needed
Prefer browse_patient when the agent knows the category it wants (e.g. "list active conditions"). Use search when the agent knows a term but not where in the VFS it lives.