Skip to main content
Glama

Get Medication List

get_medication_list
Read-onlyIdempotent

Retrieve a patient's active FHIR R4 MedicationRequest resources to see current prescriptions, excluding stopped, completed, or inactive orders. Returns status, intent, medication code and authoredOn in a read-only JSON array.

Instructions

List the active FHIR R4 MedicationRequest resources for one patient. Use it to see what is currently prescribed; inactive, stopped and completed requests are excluded. Read only. Returns a JSON array of MedicationRequests with status, intent, subject, the medication code or reference and authoredOn, at most 200 results. Every call writes one hashed audit record. 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_medication_list"
  }
}

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

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

Beyond the read-only and idempotent annotations, the description discloses status filtering, a 200-result cap, returned fields, audit logging, fixed failure text without server detail, and authorization checks occurring before any FHIR request. These are substantive behavioral details an agent would not know from annotations 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?

The description is front-loaded with the core purpose and then layers useful operational details. Most sentences earn their place, though 'Read only' duplicates the readOnlyHint annotation and the single block is slightly dense.

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 one-parameter read-only tool without an output schema, the description gives enough detail about return shape, result limits, authorization behavior, and error handling. An agent has what it needs to invoke the tool correctly and interpret common outcomes.

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 schema already explains that patient_id is a FHIR logical id rather than a name or MRN. The description adds only that results are for one patient, so it does not add meaningful semantics beyond the schema.

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 description states a specific verb and resource: list active FHIR R4 MedicationRequest resources for one patient. It also clarifies the status scope, making it clearly distinct from sibling tools focused on patients or observations.

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 explicitly says to use this to see what is currently prescribed and that inactive, stopped and completed requests are excluded. It does not name alternative tools or broader replacement scenarios, but the usage context for this tool is clear.

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