Use _include to pull referenced resources alongside search results, e.g., GET [base]/MedicationRequest?patient=[id]&_include=MedicationRequest:medication to get both MedicationRequest and referenced Medication resources in the same Bundle.
Use _revinclude to pull resources that reference your results, e.g., GET [base]/Patient?_id=[id]&_revinclude=Observation:subject to get all Observations for that patient in one call.
Use chained parameters to filter by a referenced resource's field, e.g., GET [base]/Observation?patient.name=Smith; the chain traverses the reference at query time.
Inspect the Bundle entry.search.mode field: 'match' entries are primary results; 'include' entries are pulled in via _include/_revinclude.
Combine multiple _include params in one request by repeating the parameter: _include=MedicationRequest:medication&_include=MedicationRequest:requester.
Check the server's CapabilityStatement (GET [base]/metadata) to confirm which _include and chain combinations are advertised as supported.
Known gotchas
_include depth is typically limited to one hop; iterative includes (_include:iterate) may not be supported on all servers.
Large _revinclude results can return very large Bundles; always check the total and paginate rather than assuming one page contains everything.
Chained search across resource types may not be supported; fall back to two-step queries if the server returns a 400 for the chained parameter.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp