Skip to main content
Glama
Kartha-AI

MCP Server for Google Cloud Healthcare API

by Kartha-AI

get_patient_observations

Retrieve patient observations such as vitals and lab results using LOINC or SNOMED codes, specified date ranges, and status filters through the MCP Server for Google Cloud Healthcare API.

Instructions

Get observations (vitals, labs) for a patient

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoLOINC or SNOMED code
dateFromNoYYYY-MM-DD
dateToNoYYYY-MM-DD
patientIdYes
statusNo

Implementation Reference

  • The handler function that executes the tool logic: constructs FHIR search parameters for Observation resources filtered by patient and optional criteria, fetches from server, and formats response.
    async getPatientObservations(args: any) {
      const params = new URLSearchParams();
      params.append('patient', `${args.patientId}`);
      if (args.code) params.append('code', args.code);
      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(`/Observation?${params}`);
      return this.formatResponse(`fhir://Patient/${args.patientId}/observations`, response.data);
    }
  • Input schema definition and metadata for the get_patient_observations tool.
    {
      name: "get_patient_observations",
      description: "Get observations (vitals, labs) for a patient",
      inputSchema: {
        type: "object",
        properties: {
          patientId: { type: "string" },
          code: { type: "string", description: "LOINC or SNOMED code" },
          dateFrom: { type: "string", description: "YYYY-MM-DD" },
          dateTo: { type: "string", description: "YYYY-MM-DD" },
          status: { 
            type: "string",
            enum: ["registered", "preliminary", "final", "amended", "corrected", "cancelled"]
          }
        },
        required: ["patientId"]
      }
    },
  • Registration of the tool handler in the MCP callTool request switch statement, dispatching to the FhirClient implementation.
    case "get_patient_observations":
      return await this.fhirClient.getPatientObservations(request.params.arguments);
  • The listTools handler that returns the TOOL_DEFINITIONS array containing this tool's registration.
    private handleList = async () => ({
      tools: TOOL_DEFINITIONS
    });
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It implies a read operation ('Get') but doesn't disclose critical traits like authentication needs, rate limits, pagination, error handling, or what 'observations' entail beyond examples. This is inadequate for a tool with 5 parameters and no output schema.

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 a single, efficient sentence that front-loads the core purpose. It avoids redundancy but could be more structured by including key usage notes. No wasted words, though it risks under-specification.

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?

For a tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, output format, error cases, and doesn't compensate for the 40% schema coverage gap. Siblings like get_vital_signs suggest this tool might overlap, but no guidance is provided.

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 60%, with parameters like 'code' and date fields well-described in the schema. The description adds marginal value by hinting at observation types ('vitals, labs'), which loosely relates to 'code', but doesn't clarify semantics for undocumented parameters (e.g., 'patientId' or 'status'). Baseline 3 is appropriate given the schema does most work.

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 action ('Get') and resource ('observations for a patient'), with examples of observation types ('vitals, labs') that help distinguish it from siblings like get_vital_signs or get_lab_results. However, it doesn't explicitly differentiate from all siblings, such as get_patient_conditions or get_patient_procedures, which might also involve patient data retrieval.

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., patientId requirement), exclusions, or comparisons to siblings like get_vital_signs or get_lab_results, leaving the agent to infer usage from the name alone.

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