Skip to main content
Glama

Get Conditions

get_conditions
Read-onlyIdempotent

Retrieves FHIR R4 Condition resources for one patient, including active and resolved problems and diagnoses, to review treatment history and check clinicalStatus for active conditions.

Instructions

List FHIR R4 Condition resources (problems and diagnoses) for one patient, active and resolved. Use it to see what the patient is or was treated for; check clinicalStatus for active. Returns a JSON array with clinical and verification status, code (system and code only; display and free text are dropped), onset, abatement and recorded dates. 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_conditions"
  }
}

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

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

Goes well beyond the annotations: it discloses that display names and free text are dropped from returned codes, that every call writes an audit record with an HMAC-hashed patient id and no PHI, and that a policy check precedes the FHIR request. It also enumerates the exact failure strings for unauthorized patient, over-200-results, and generic FHIR failure, which lets the agent interpret errors without guesswork.

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

Conciseness5/5

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

Purpose and scope come first, then usage, then return shape, then behavioral/security notes and error contracts. Every sentence carries information an agent needs; nothing is redundant padding despite the length.

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?

For a single-parameter read tool with no output schema, the description supplies the return format (JSON array with status, truncated code, onset/abatement/recorded dates), the result cap, and the error contract. Nothing an agent needs in order to call and interpret it 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?

Only one parameter and schema description coverage is 100%, with the schema already stating it is a FHIR logical id and not a name or MRN. The description adds a little framing ('for one patient', 'a patient outside the caller grant'), but no format or edge-case guidance beyond what the schema carries, 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: list FHIR R4 Condition resources, explicitly glossed as problems and diagnoses, scoped to one patient and covering both active and resolved states. The resource type itself separates it from siblings like get_allergies, get_encounters, and get_medication_list without ambiguity.

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?

'Use it to see what the patient is or was treated for; check clinicalStatus for active' gives a clear clinical use context and tells the agent how to interpret active vs resolved results. It stops short of naming alternatives or stating when not to use it (e.g. when a full summary is wanted), so it falls short of a 5.

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