Skip to main content
Glama
FHIR MCP Server

FHIR MCP Server

by wso2

read

Retrieves a single FHIR resource by type and ID, optionally adding search parameters, operations, or FHIRPath filters to return only needed fields.

Instructions

Performs a FHIR read interaction to retrieve a single resource instance by its type and resource ID, optionally refining the response with search parameters or custom operations. Use it when you know the exact resource ID and require that one resource; do not use it for bulk queries. If additional query-level parameters or operations are needed (e.g., _elements or $validate), include them in searchParam or operation. Optionally specify fields to filter the response to only the data your task needs (e.g., Patient.birthDate, Observation.valueQuantity).

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": {
      "type": "<type>",
      "id": "<id>"
    },
    "name": "read"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe logical ID of a specific FHIR resource instance.
typeYesThe FHIR resource type name. Must exactly match one of the resource types supported by the server.
operationNoThe name of a custom FHIR operation or extended query defined for the resource must match one of the operation names returned by `get_capabilities`.
searchParamNoA mapping of FHIR search parameter names to their desired values. These parameters refine queries for operation-specific query qualifiers. Only parameters exposed by `get_capabilities` for that resource type are valid.
response_filter_fhirpathsNoSpecify FHIRPath expressions to filter the response to only the data you need. Omitting returns the full resource. Bundle.* expressions supported with $everything.

Output Schema

NameRequiredDescriptionDefault
resultYesA dictionary containing the single FHIR resource instance of the requested type and id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.11.0
    • addedInput schema / properties / response_filter_fhirpaths
      Added value: +{
      +  "default": [],
      +  "description": "Specify FHIRPath expressions to filter the response to only the data you need. Omitting returns the full resource. Bundle.* expressions supported with $everything.",
      +  "examples": [
      +    [
      +      "Patient.name",
      +      "Patient.birthDate",
      +      "Observation.valueQuantity"
      +    ]
      +  ],
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Response Filter Fhirpaths",
      +  "type": "array"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "result": {
      +      "additionalProperties": true,
      +      "description": "A dictionary containing the single FHIR resource instance of the requested type and id.",
      +      "title": "Result",
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "result"
      +  ],
      +  "title": "readOutput",
      +  "type": "object"
      +}
  2. First observedv0.9.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It discloses that the response can be narrowed via FHIRPath filtering and that searchParam/operation extend the interaction, but it says nothing about failure behavior for a missing or invalid ID, permission requirements, or whether $everything can return a Bundle instead of a single resource.

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 and the primary use/avoid condition are front-loaded in the first two sentences, which is the right ordering. The final sentence on field filtering overlaps with the schema's `response_filter_fhirpaths` description and could be trimmed without information loss.

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

Completeness4/5

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

An output schema exists, so return-value explanation is not required, and the description covers purpose, selection criteria, and the two extension parameters adequately for a read tool. It falls short only on error/edge-case behavior (invalid ID, $everything returning a Bundle) which matters given the absence of annotations.

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 schema already documents all five parameters with titles, defaults and examples; the baseline is 3. The description adds only modest meaning beyond that, mainly the guidance that searchParam/operation can carry query-level qualifiers like _elements and $validate, while its field-filter examples largely restate the schema's own examples.

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?

The description gives a specific verb and resource ('Performs a FHIR `read` interaction to retrieve a single resource instance by its type and resource ID') and scopes it to single-instance retrieval. It separates itself from bulk retrieval generically ('do not use it for bulk queries') but never names the `search` sibling, so differentiation is implied rather than explicit.

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?

It states a clear positive condition ('Use it when you know the exact resource ID and require that one resource') and a clear exclusion ('do not use it for bulk queries'), plus guidance on where to put extra query-level parameters ($validate, _elements). The gap is that it does not name the alternative tool (`search`) that the exclusion points to.

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

Deploy Server

Other Tools