Skip to main content
Glama

Get FHIR Patient

get_patient
Read-onlyIdempotent

Read one FHIR R4 Patient resource by its logical id to confirm a patient exists and retrieve gender, birth date and active status. Returns read-only JSON for the patient id.

Instructions

Read one FHIR R4 Patient resource by its logical id from the configured FHIR server (by default the public synthetic SMART sandbox). Use it first to confirm a patient exists and to get gender, birth date and active status; use search_observations or get_medication_list for clinical data. Read only. Returns the Patient as JSON with only id, active, gender and birthDate. Every call writes one audit record in which the patient id is HMAC-hashed; no PHI is logged. Other failures return the fixed text "FHIR request failed" with no server detail. Access is checked first against the server patient policy: a patient outside the caller grant returns "Patient access not authorized" before any FHIR request.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "patient_id": "<patient_id>"
    },
    "name": "get_patient"
  }
}

Input Schema

NameRequiredDescriptionDefault
patient_idYesFHIR logical id of the Patient, 1 to 64 letters, digits, dots or hyphens, for example a sandbox id returned by the FHIR server. Not a name, MRN or other identifier.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.0
    • addedInput schema / properties / patient_id / description
      Added value: +"FHIR logical id of the Patient, 1 to 64 letters, digits, dots or hyphens, for example a sandbox id returned by the FHIR server. Not a name, MRN or other identifier."
  2. First observedv0.4.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive, but the description goes well beyond them: audit logging with an HMAC-hashed patient id and no PHI, sanitized failure text, and the authorization check that runs before any FHIR request with its exact denial message. The only shortfall is that it doesn't characterize latency or whether the result reflects a cached/sandboxed dataset.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose, return shape, and routing advice are front-loaded and no sentence is filler. It is a dense single block, however, and the audit/error/authorization details would read more cleanly as short separated clauses.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must describe returns — and it does, enumerating exactly id, active, gender and birthDate. It also covers the failure and authorization paths, which is everything an agent needs to call this correctly and interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already spells out the pattern, length limits and the crucial "not a name, MRN or other identifier" caveat. The description reinforces the logical-id meaning but adds no syntax or format detail beyond what the schema provides, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Read one FHIR R4 Patient resource by its logical id") plus the source of truth (configured FHIR server, defaulting to the public synthetic sandbox). It also names the sibling tools that handle clinical data, so the agent can separate this lookup from search_observations and get_medication_list without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit ordering rule ("Use it first to confirm a patient exists") and an explicit routing rule to alternatives for clinical data. Both the when-to-use and when-to-use-something-else conditions are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.