Skip to main content
Glama

Get Immunizations

get_immunizations
Read-onlyIdempotent

Retrieves a patient's FHIR R4 immunization records, returning vaccine codes, status, and dates while enforcing patient access checks and audit logging.

Instructions

List FHIR R4 Immunization resources for one patient. Returns a JSON array with status, vaccine code (system and code only; display and free text are dropped) and the date given. Read only. Every call writes one audit record in which the patient id is HMAC-hashed; no PHI is logged. Access is checked first against the server patient policy: a patient outside the caller grant returns "Patient access not authorized" before any FHIR request. More than 200 results returns "Too many results (more than 200); narrow the request". Other failures return "FHIR request failed" with no server detail.

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_immunizations"
  }
}

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. Addedv0.7.1

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations (readOnly, idempotent, non-destructive), it discloses the exact return shape and trimmed fields, the audit-record side effect with HMAC-hashed patient id and no PHI logging, the authorization check ordering, and the three distinct error strings. This is unusually rich behavioral context for a read tool.

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 purpose is front-loaded and each sentence adds operational value with no filler. It is dense rather than bloated, though the verbatim error strings make it longer than strictly necessary for a one-parameter read tool.

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?

With no output schema, the description supplies the return structure (status, vaccine code system+code, date given) and notes display/free text are dropped. Combined with the audit, auth, and result-limit behavior, an agent has everything needed to call it and interpret failures.

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%, so the patient_id semantics (FHIR logical id, not a name or MRN) are already fully documented in the schema. The description adds nothing about the parameter beyond reinforcing 'one patient', 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?

The opening sentence states a specific verb and resource ('List FHIR R4 Immunization resources') and scopes it to 'one patient'. Because the resource is named explicitly, an agent can distinguish it from get_allergies, get_conditions, and get_medication_list without inspecting schemas.

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

Usage Guidelines3/5

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

Usage is implied by the resource type and the single-patient scope, and the >200 result cap gives a practical constraint. However, the description never states when to prefer this over siblings or what to do instead (e.g., get_patient_summary for a consolidated view), so guidance is implied rather than explicit.

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