Skip to main content
Glama
Kartha-AI

MCP Server for Google Cloud Healthcare API

by Kartha-AI

find_patient

Search for patients using demographic details like name, birth date, and gender. Part of the MCP Server for Google Cloud Healthcare API, designed for FHIR-based health solutions.

Instructions

Search for a patient by demographics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
birthDateNoYYYY-MM-DD format
firstNameNo
genderNo
lastNameYes

Implementation Reference

  • Core implementation of the find_patient tool: searches FHIR Patient resources using family name, given name, birthdate; extracts and formats patient demographics from the first matching result.
    async findPatient(args: any) {
      const params = new URLSearchParams();
      if (args.lastName) params.append('family', args.lastName);
      if (args.firstName) params.append('given', args.firstName);
      if (args.birthDate) params.append('birthdate', args.birthDate);
    
      const response = await this.client.get(`/Patient?${params}`);
      
      // Check if we have results
      if (!response.data?.entry?.[0]?.resource) {
          return this.formatResponse("fhir://Patient/search", { message: "No patients found" });
      }
    
      const resource = response.data.entry[0].resource;
      const name = resource.name?.[0] ?? {};
      const address = resource.address?.[0] ?? {};
    
      const patient = {
          name: name.given?.[0] ?? 'Unknown',
          familyName: name.family ?? 'Unknown',
          dob: resource.birthDate ?? 'Unknown',
          gender: resource.gender ?? 'Unknown',
          address: address.line?.[0] ?? 'Unknown',
          city: address.city ?? 'Unknown',
          state: address.state ?? 'Unknown',
          zip: address.postalCode ?? 'Unknown',
          id: resource.id ?? 'Unknown'
      };
    
      return this.formatResponse("fhir://Patient/search", patient);
    }
  • Tool definition including name, description, and input schema (requires lastName; optional firstName, birthDate, gender). Part of TOOL_DEFINITIONS array used for tool listing.
    {
      name: "find_patient",
      description: "Search for a patient by demographics",
      inputSchema: {
        type: "object",
        properties: {
          lastName: { type: "string" },
          firstName: { type: "string" },
          birthDate: { type: "string", description: "YYYY-MM-DD format" },
          gender: { 
            type: "string",
            enum: ["male", "female", "other", "unknown"]
          }
        },
        required: ["lastName"]
      }
    },
  • ToolHandler switch statement registers/dispatches 'find_patient' tool call to FhirClient.findPatient.
    case "find_patient":
      return await this.fhirClient.findPatient(request.params.arguments);
  • handleList method returns TOOL_DEFINITIONS for MCP listTools request, effectively registering available tools including find_patient.
    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 for behavioral disclosure. It mentions 'Search' which implies a read operation, but doesn't describe what happens with partial matches, whether it returns multiple results, error conditions, or authentication requirements. This leaves significant gaps for a search 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 a single, efficient sentence that directly states the tool's function without unnecessary words. It's appropriately sized for a simple search tool and front-loads the essential information.

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 search tool with 4 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the search returns, how results are formatted, whether it's exact or fuzzy matching, or any limitations. The agent would need to guess about important behavioral aspects.

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 only 25% (only birthDate has a description), but the description adds minimal value by mentioning 'demographics' which loosely relates to the parameters. It doesn't explain parameter relationships (like how multiple parameters combine) or provide usage examples, so it only partially compensates for the low 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 action ('Search for a patient') and resource ('by demographics'), making the purpose understandable. However, it doesn't distinguish this tool from potential sibling search tools (though none are listed among siblings), so it doesn't reach the highest score.

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, prerequisites, or specific scenarios. It simply states what the tool does without context about usage patterns or limitations.

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