Send a GET request to [fhir-base]/Patient/[id]/$everything, optionally adding _since (date), _type (comma-separated resource types), _count (page size), and start/end date parameters to scope the results
Receive the first response Bundle of type searchset and process all entries in the Bundle
Check Bundle.link for a relation=next URL — if present, follow it to retrieve subsequent pages of the complete record
Continue paginating through next-page links until a Bundle with no next link is returned, accumulating all resources across all pages
Deduplicate resources by resource type and logical ID across pages in case the server includes references in multiple pages
Known gotchas
The $everything operation can return very large result sets for patients with extensive records — servers may paginate aggressively using small page sizes, requiring many round trips; design your client to handle hundreds of pages
Not all FHIR servers implement $everything, and those that do may vary in which resource types are included — check the server's CapabilityStatement OperationDefinition for the supported resource types and parameters
Some servers implement $everything as an asynchronous operation returning 202 Accepted rather than a synchronous response — always include the Prefer: respond-async header and be prepared to poll for completion
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