Skip to main content
Glama
Kartha-AI

MCP Server for Google Cloud Healthcare API

by Kartha-AI

get_patient_conditions

Retrieve a patient's medical conditions or diagnoses using their ID, with options to filter by onset date and status, leveraging the MCP Server for Google Cloud Healthcare API.

Instructions

Get medical conditions/diagnoses for a patient

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
onsetDateNoYYYY-MM-DD
patientIdYes
statusNo

Implementation Reference

  • Defines the tool schema, description, and input validation schema for 'get_patient_conditions'.
    {
      name: "get_patient_conditions",
      description: "Get medical conditions/diagnoses for a patient",
      inputSchema: {
        type: "object",
        properties: {
          patientId: { type: "string" },
          status: { 
            type: "string",
            enum: ["active", "inactive", "resolved"]
          },
          onsetDate: { type: "string", description: "YYYY-MM-DD" }
        },
        required: ["patientId"]
      }
    },
  • The listTools handler that returns all TOOL_DEFINITIONS including get_patient_conditions schema.
    private handleList = async () => ({
      tools: TOOL_DEFINITIONS
    });
  • Switch case in callTool handler that routes get_patient_conditions calls to FhirClient.
    case "get_patient_conditions":
      return await this.fhirClient.getPatientConditions(request.params.arguments);
  • Core implementation of get_patient_conditions: constructs FHIR search params and queries /Condition endpoint for the patient's conditions.
    async getPatientConditions(args: any) {
      const params = new URLSearchParams();
      params.append('patient', `${args.patientId}`);
      if (args.status) params.append('clinical-status', args.status);
      if (args.onsetDate) params.append('onset-date', args.onsetDate);
    
      const response = await this.client.get(`/Condition?${params}`);
      return this.formatResponse(`fhir://Patient/${args.patientId}/conditions`, response.data);
    }
  • Registers the ToolHandler (which handles tool list and calls) to the MCP server.
    private setupHandlers() {
      this.toolHandler.register(this.mcpServer);
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 the tool retrieves data ('Get'), implying a read-only operation, but doesn't specify permissions required, rate limits, pagination, or what happens if no conditions exist. For a medical data tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 waste—it directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple retrieval tool and front-loaded with the core action.

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 (medical data retrieval with 3 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like safety, permissions, or return format, which are critical for an AI agent to use this tool correctly in a healthcare context.

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 33% (only 'onsetDate' has a description), so the description must compensate but doesn't add any parameter details. It mentions 'medical conditions/diagnoses for a patient,' which loosely relates to the parameters but doesn't explain their roles (e.g., patientId for identification, status for filtering). With low coverage and no compensation, it meets the baseline for minimal value.

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 ('medical conditions/diagnoses for a patient'), making the purpose immediately understandable. It distinguishes this tool from siblings like get_patient_allergies or get_patient_medications by specifying the type of medical data retrieved. However, it doesn't explicitly differentiate from all possible siblings beyond the resource type.

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 similar tools like get_patient_encounters or get_patient_procedures. Usage is implied by the name and purpose but not explicitly stated.

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