Skip to main content
Glama
Kartha-AI

MCP Server for Google Cloud Healthcare API

by Kartha-AI

get_lab_results

Retrieve patient lab results (e.g., CBC, METABOLIC, LIPIDS) using patient ID and optional timeframe, integrated with Google Cloud Healthcare API for efficient clinical workflows.

Instructions

Get patient's lab results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoe.g., CBC, METABOLIC, LIPIDS, ALL
patientIdYes
timeframeNo

Implementation Reference

  • The core handler function that implements the get_lab_results tool by querying FHIR Observation resources filtered by patient and optional date range, then formatting the response.
    async getPatientLabResults(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(`/Observation?${params}`);
      return this.formatResponse(`fhir://Patient/${args.patientId}/lab-results`, response.data);
    }
  • Defines the input schema, description, and name for the get_lab_results tool used in tool listing.
    {
      name: "get_lab_results",
      description: "Get patient's lab results",
      inputSchema: {
        type: "object",
        properties: {
          patientId: { type: "string" },
          category: { 
            type: "string",
            description: "e.g., CBC, METABOLIC, LIPIDS, ALL"
          },
          timeframe: { type: "string" }
        },
        required: ["patientId"]
      }
    },
  • Registers the handler dispatch for get_lab_results tool calls, routing to FhirClient.getPatientLabResults.
    case "get_lab_results":
      return await this.fhirClient.getPatientLabResults(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 but only states the basic action. It doesn't cover critical aspects such as whether this is a read-only operation, authentication requirements, rate limits, error handling, or what the output format looks like (e.g., structured data vs. raw text), leaving significant gaps for a medical data tool.

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 extremely concise with a single, front-loaded sentence ('Get patient's lab results') that directly states the purpose without any wasted words. 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 medical data retrieval, lack of annotations, no output schema, and low schema coverage, the description is incomplete. It fails to address key contextual elements like data sensitivity, return format, error cases, or how it integrates with sibling tools, making it inadequate for safe and effective use by an AI agent.

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 low at 33% (only 'category' has a description), but the description adds no parameter information beyond what's implied by the tool name. It doesn't explain 'patientId' (required), 'timeframe', or provide examples for 'category' beyond the schema's limited enum-like hints, resulting in minimal compensation for the coverage gap.

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 tool's purpose as 'Get patient's lab results' with a specific verb ('Get') and resource ('lab results'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_patient_observations' or 'get_vital_signs' that might also retrieve medical data, missing full 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 prerequisites (e.g., needing a patient ID), exclusions, or comparisons to siblings like 'get_patient_observations' for other data types, leaving usage context entirely implicit.

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