Skip to main content
Glama
Kartha-AI

MCP Server for Google Cloud Healthcare API

by Kartha-AI

get_patient_encounters

Retrieve patient healthcare encounters by specifying a patient ID, date range, and status. Facilitates efficient access to visit data for clinical and administrative workflows.

Instructions

Get healthcare encounters/visits for a patient

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateFromNoYYYY-MM-DD
dateToNoYYYY-MM-DD
patientIdYes
statusNo

Implementation Reference

  • The main handler function that executes the tool logic: queries FHIR Encounter resources filtered by patient ID, optional status, and date range, then formats and returns the response.
    async getPatientEncounters(args: any) {
      const params = new URLSearchParams();
      params.append('patient', `${args.patientId}`);
      if (args.status) params.append('status', args.status);
      if (args.dateFrom) params.append('date', `ge${args.dateFrom}`);
      if (args.dateTo) params.append('date', `le${args.dateTo}`);
    
      const response = await this.client.get(`/Encounter?${params}`);
      return this.formatResponse(`fhir://Patient/${args.patientId}/encounters`, response.data);
    }
  • Registration/dispatch point in ToolHandler.handleCall switch statement that routes the tool call to the FhirClient implementation.
    case "get_patient_encounters":
      return await this.fhirClient.getPatientEncounters(request.params.arguments);
  • Tool schema definition used for input validation and tool listing/registration via TOOL_DEFINITIONS.
    {
      name: "get_patient_encounters",
      description: "Get healthcare encounters/visits for a patient",
      inputSchema: {
        type: "object",
        properties: {
          patientId: { type: "string" },
          status: {
            type: "string",
            enum: ["planned", "arrived", "in-progress", "finished", "cancelled"]
          },
          dateFrom: { type: "string", description: "YYYY-MM-DD" },
          dateTo: { type: "string", description: "YYYY-MM-DD" }
        },
        required: ["patientId"]
      }
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 states the action ('Get') but lacks details on permissions, rate limits, pagination, or response format. For a read operation with multiple parameters, this is insufficient to inform the agent about how the tool behaves beyond its basic function.

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 front-loaded and appropriately sized for its content, earning full marks for conciseness.

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 tool's complexity (4 parameters, no annotations, no output schema), the description is incomplete. It doesn't address behavioral aspects like data retrieval limits or error handling, and with low schema coverage, it fails to compensate for missing parameter documentation. This is inadequate for a tool that retrieves patient data with multiple filters.

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?

The description mentions 'healthcare encounters/visits' but doesn't explain parameters beyond what the schema provides. With 50% schema description coverage (two parameters have descriptions, two do not), the description adds minimal value—it implies filtering by patient and possibly date/status, but doesn't clarify semantics like what 'status' enums mean in context. This meets the baseline for partial schema coverage.

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 ('healthcare encounters/visits for a patient'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_appointments' or 'get_patient_procedures', which might also retrieve patient-related data, so it doesn't reach the highest score for sibling distinction.

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 siblings like 'get_appointments' or 'get_patient_procedures', nor does it specify prerequisites or exclusions, leaving the agent with minimal 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