Skip to main content
Glama

Get Allergies

get_allergies
Read-onlyIdempotent

Retrieve a patient's FHIR R4 AllergyIntolerance records before medication reasoning, returning status, type, category, criticality, substance code, and recorded date.

Instructions

List FHIR R4 AllergyIntolerance resources for one patient. Use it before reasoning about medications. Returns a JSON array with clinical status, type, category, criticality, the substance code (system and code only; display and free text are dropped) and recorded date. 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_allergies"
  }
}

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.1/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses the exact field set returned, that display and free-text substance values are dropped, the HMAC-hashed audit record and no-PHI logging, the policy check preceding any FHIR call, and three distinct failure messages including the 200-result cap. None of this is recoverable from readOnlyHint/idempotentHint alone.

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?

Front-loads purpose and intended use in the first two sentences, then packs return shape and error behavior efficiently. The error-message sentences are dense and slightly run-on, but each carries actionable information an agent would otherwise have to guess.

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, yet the description enumerates the returned fields and error strings, and covers access control and result limits. For a single-parameter read tool, nothing an agent needs to call it correctly or interpret failure is missing.

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 description coverage is 100% and the patient_id description already spells out the FHIR logical id format and warns it is not a name or MRN, so the schema does the heavy lifting. The description adds no format or syntax detail beyond referencing the patient id in the context of the audit hash and access check, matching the baseline for a single fully-documented parameter.

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

Purpose4/5

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

States a specific verb and resource ('List FHIR R4 AllergyIntolerance resources') with an explicit scope of 'for one patient', so an agent knows exactly what it retrieves. It does not name a sibling such as get_medication_list explicitly, though 'Use it before reasoning about medications' signals its place relative to medication tools.

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

Usage Guidelines4/5

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

Gives a clear usage context ('Use it before reasoning about medications') and states the read-only nature. It lacks explicit when-not guidance or a named alternative for the case where allergy data is not the right input, so it stops short of full routing guidance.

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