Skip to main content
Glama
Kartha-AI

MCP Server for Google Cloud Healthcare API

by Kartha-AI

get_patient_allergies

Retrieve patient allergies and intolerances by specifying patient ID, category, status, and type to enhance clinical workflows using the MCP Server for Google Cloud Healthcare API.

Instructions

Get allergies and intolerances for a patient

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNo
patientIdYes
statusNo
typeNo

Implementation Reference

  • Core handler function that performs FHIR API search for patient allergies/intolerances with optional filters (status, type, category) and formats the response.
    async getPatientAllergies(args: any) {
      const params = new URLSearchParams();
      params.append('patient', args.patientId);
      if (args.status) params.append('clinical-status', args.status);
      if (args.type) params.append('type', args.type);
      if (args.category) params.append('category', args.category);
    
      const response = await this.client.get(`/AllergyIntolerance?${params}`);
      return this.formatResponse(`fhir://Patient/${args.patientId}/allergies`, response.data);
    }
  • Tool dispatch/registration in the main CallTool handler switch statement, routing 'get_patient_allergies' calls to FhirClient.getPatientAllergies.
    case "get_patient_allergies":
      return await this.fhirClient.getPatientAllergies(request.params.arguments);
  • Tool definition including name, description, and input schema (requires patientId, optional status/type/category filters). Used for ListTools response.
    {
      name: "get_patient_allergies",
      description: "Get allergies and intolerances for a patient",
      inputSchema: {
        type: "object",
        properties: {
          patientId: { type: "string" },
          status: { 
            type: "string",
            enum: ["active", "inactive", "resolved"]
          },
          type: {
            type: "string",
            enum: ["allergy", "intolerance"]
          },
          category: {
            type: "string",
            enum: ["food", "medication", "environment", "biologic"]
          }
        },
        required: ["patientId"]
      }
    },
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' which implies a read-only operation, but doesn't specify whether this requires authentication, rate limits, what happens if patientId is invalid, or the format/scope of returned data. For a tool with 4 parameters and no output schema, this leaves significant behavioral gaps.

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 states the core purpose without unnecessary words. It's front-loaded with the essential information ('Get allergies and intolerances for a patient'), making it easy to parse. Every word earns its place.

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 (4 parameters with enums, no annotations, no output schema), the description is insufficient. It doesn't explain what the tool returns, how parameters interact (e.g., can you filter by both category and status?), or behavioral aspects like error handling. For a medical data retrieval tool, more context about data scope and usage is needed.

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 adds no parameter-specific information beyond what's in the schema. With 0% schema description coverage, all 4 parameters (patientId, category, status, type) are undocumented in both schema and description. However, the description implies filtering by patient, which aligns with the required patientId parameter, providing minimal context. This meets the baseline for inadequate 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 action ('Get') and target resource ('allergies and intolerances for a patient'), making the purpose immediately understandable. It distinguishes this from siblings like get_patient_medications or get_patient_conditions by specifying the type of medical data. However, it doesn't explicitly differentiate from potential overlapping tools (none in the sibling list), so it's not a perfect 5.

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 patientId), when not to use it, or how it compares to other patient data tools like get_patient_conditions. The agent must infer usage from the name and parameters 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