Skip to main content
Glama
Kartha-AI

MCP Server for Google Cloud Healthcare API

by Kartha-AI

get_patient_medications

Retrieve medication orders for a specific patient, filtered by status, using the MCP Server for Google Cloud Healthcare API. Supports active, completed, stopped, or on-hold medication statuses.

Instructions

Get medication orders for a patient

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patientIdYes
statusNo

Implementation Reference

  • The main handler function that executes the tool logic by querying the FHIR server for MedicationRequest resources filtered by patient ID and optional status.
    async getPatientMedications(args: any) {
      const params = new URLSearchParams();
      params.append('patient', `${args.patientId}`);
      if (args.status) params.append('status', args.status);
    
      const response = await this.client.get(`/MedicationRequest?${params}`);
      return this.formatResponse(`fhir://Patient/${args.patientId}/medications`, response.data);
    }
  • Defines the tool's input schema, description, and registration in the TOOL_DEFINITIONS array used for listing tools.
    {
      name: "get_patient_medications",
      description: "Get medication orders for a patient",
      inputSchema: {
        type: "object",
        properties: {
          patientId: { type: "string" },
          status: {
            type: "string",
            enum: ["active", "completed", "stopped", "on-hold"]
          }
        },
        required: ["patientId"]
      }
    },
  • Registers the tool handler by dispatching calls to the FhirClient.getPatientMedications method in the main tool call switch statement.
    case "get_patient_medications":
      return await this.fhirClient.getPatientMedications(request.params.arguments);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read operation ('Get') but doesn't specify permissions, rate limits, pagination, or response format. This is inadequate for a tool that likely accesses sensitive medical data.

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?

The description is a single, efficient sentence with zero wasted words, making it easy to parse. It's appropriately sized for a simple tool, though this brevity contributes to gaps in other dimensions.

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

Completeness2/5

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

Given the complexity of healthcare data, no annotations, no output schema, and low schema coverage, the description is incomplete. It lacks details on behavioral traits, parameter meanings, and output expectations, making it insufficient for reliable agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate but adds no parameter details. It doesn't explain 'patientId' (e.g., format or source) or 'status' (e.g., filtering by medication state), leaving both parameters semantically unclear beyond the schema's basic structure.

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 clearly states the verb ('Get') and resource ('medication orders for a patient'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_medications_history', leaving room for ambiguity about scope or timeframe.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'get_medications_history' or 'get-drug-info'. It lacks context about prerequisites, such as needing a valid patient ID, or exclusions, leaving the agent to infer usage.

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

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kartha-AI/google-cloud-healthcare-api-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server