Skip to main content
Glama
Kartha-AI

MCP Server for Google Cloud Healthcare API

by Kartha-AI

get_medications_history

Retrieve a patient's detailed medication history, including discontinued medications, to inform clinical workflows and decision-making using Google Cloud Healthcare API.

Instructions

Get patient's medication history including changes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeDiscontinuedNo
patientIdYes

Implementation Reference

  • The main handler function that implements the tool logic by querying the FHIR server for MedicationStatement resources for the given patient, optionally filtered by date range, and formats the response.
    async getMedicationHistory(args: any) {
      const params = new URLSearchParams();
      params.append('patient', `${args.patientId}`);
      if (args.dateFrom) params.append('date', `ge${args.dateFrom}`);
      if (args.dateTo) params.append('date', `le${args.dateTo}`);
    
      const response = await this.client.get(`/MedicationStatement?${params}`);
      return this.formatResponse(`fhir://Patient/${args.patientId}/medication-history`, response.data);
    }
  • Defines the tool's metadata including name, description, and input schema validation.
    {
      name: "get_medications_history",
      description: "Get patient's medication history including changes",
      inputSchema: {
        type: "object",
        properties: {
          patientId: { type: "string" },
          includeDiscontinued: { type: "boolean" }
        },
        required: ["patientId"]
      }
    },
  • Dispatches calls to the 'get_medications_history' tool to the appropriate FhirClient handler method.
    case "get_medications_history":
      return await this.fhirClient.getMedicationHistory(request.params.arguments);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Get patient's medication history including changes', implying a read-only operation, but doesn't specify if it requires authentication, has rate limits, returns paginated results, or what format the history includes (e.g., timestamps, dosages). For a tool with no annotation coverage, this is a significant gap in transparency.

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 that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 (a medical data tool with 2 parameters), lack of annotations, no output schema, and low schema coverage (0%), the description is incomplete. It doesn't cover behavioral aspects like authentication needs, error handling, or return format, leaving gaps that could hinder correct tool invocation by an agent.

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?

The input schema has 2 parameters with 0% description coverage, so the schema provides no semantic context. The description mentions 'medication history including changes', which hints at the 'includeDiscontinued' parameter (suggesting it controls whether to show stopped medications), but doesn't explain 'patientId' or provide details on parameter usage. This adds minimal value beyond the bare schema.

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 the resource 'patient's medication history including changes', which is specific and distinguishes it from siblings like 'get_patient_medications' (which might not include historical changes). However, it doesn't explicitly differentiate from all siblings, such as 'get_patient_conditions' or 'get_patient_allergies', which could be similar in structure but for different data types.

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. It doesn't mention prerequisites (e.g., needing a valid patient ID), exclusions, or compare it to siblings like 'get_patient_medications' (which might fetch current medications only). This leaves the agent without clear context for selection.

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