Skip to main content
Glama

get_clinical_summary

Retrieve a comprehensive clinical summary for a patient from athenahealth, including allergies, problems, prescriptions, vitals, labs, and alerts to support clinical decision-making.

Instructions

Get a comprehensive clinical summary for a patient

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patient_idYesPatient ID
include_allergiesNoInclude allergies
include_problemsNoInclude problems
include_prescriptionsNoInclude prescriptions
include_vitalsNoInclude vitals
include_labsNoInclude lab results
include_alertsNoInclude clinical alerts

Implementation Reference

  • The primary handler function for the get_clinical_summary tool. It fetches patient demographics and optionally allergies, problems, prescriptions, vitals, labs, and alerts from AthenaHealth API, handles errors gracefully for sandbox limitations, logs data access, and returns a JSON-formatted summary.
    async handleGetClinicalSummary(args: any) {
      const { patient_id, ...options } = args;
      const summary: any = {};
      const errors: any = {};
    
      // Get patient details
      try {
        summary.patient = await this.client.getPatient(patient_id);
      } catch (error: any) {
        errors.patient = error.message || 'Failed to fetch patient data';
      }
    
      // Get clinical data based on options - handle errors gracefully
      const warnings: string[] = [];
    
      if (options.include_allergies !== false) {
        try {
          summary.allergies = await this.client.getPatientAllergies(patient_id);
        } catch (error: any) {
          warnings.push('Allergies endpoint not available in preview/sandbox');
          summary.allergies = [];
        }
      }
    
      if (options.include_problems !== false) {
        try {
          summary.problems = await this.client.getPatientProblems(patient_id);
        } catch (error: any) {
          warnings.push('Problems endpoint not available in preview/sandbox');
          summary.problems = [];
        }
      }
    
      if (options.include_prescriptions !== false) {
        try {
          summary.prescriptions = await this.client.getPatientPrescriptions(patient_id);
        } catch (error: any) {
          warnings.push('Prescriptions endpoint not available in preview/sandbox');
          summary.prescriptions = [];
        }
      }
    
      if (options.include_vitals !== false) {
        try {
          summary.vitals = await this.client.getPatientVitals(patient_id);
        } catch (error: any) {
          warnings.push('Vitals endpoint not available in preview/sandbox');
          summary.vitals = [];
        }
      }
    
      if (options.include_labs !== false) {
        try {
          summary.labs = await this.client.getPatientLabResults(patient_id);
        } catch (error: any) {
          warnings.push('Labs endpoint not available in preview/sandbox');
          summary.labs = [];
        }
      }
    
      if (options.include_alerts !== false) {
        try {
          summary.alerts = await this.client.getClinicalAlerts(patient_id);
        } catch (error: any) {
          warnings.push('Alerts endpoint not available in preview/sandbox');
          summary.alerts = [];
        }
      }
    
      // Include warnings and errors
      if (warnings.length > 0) {
        summary._warnings = warnings;
        summary._note = 'Preview/Sandbox environment: Clinical endpoints unavailable. Only patient demographics accessible.';
      }
    
      if (Object.keys(errors).length > 0) {
        summary._errors = errors;
      }
    
      logDataAccess('CLINICAL_SUMMARY', patient_id, 'READ');
    
      return {
        content: [
          {
            type: 'text' as const,
            text: JSON.stringify(summary, null, 2),
          },
        ],
      };
    }
  • Tool definition including name, description, and input schema specifying patient_id as required and optional boolean flags to include various clinical data sections.
    {
      name: 'get_clinical_summary',
      description: 'Get a comprehensive clinical summary for a patient',
      inputSchema: {
        type: 'object',
        properties: {
          patient_id: { type: 'string', description: 'Patient ID' },
          include_allergies: { type: 'boolean', description: 'Include allergies', default: true },
          include_problems: { type: 'boolean', description: 'Include problems', default: true },
          include_prescriptions: { type: 'boolean', description: 'Include prescriptions', default: true },
          include_vitals: { type: 'boolean', description: 'Include vitals', default: true },
          include_labs: { type: 'boolean', description: 'Include lab results', default: true },
          include_alerts: { type: 'boolean', description: 'Include clinical alerts', default: true },
        },
        required: ['patient_id'],
      },
    },
  • Registration in the MCP server tool call handler switch statement, dispatching calls to the toolHandlers.handleGetClinicalSummary method.
    case 'get_clinical_summary':
      return await this.toolHandlers.handleGetClinicalSummary(args);
  • Tool list request handler that returns the toolDefinitions array, making get_clinical_summary available to MCP clients.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools: toolDefinitions };
    });
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. While 'Get' implies a read-only operation, it doesn't specify authentication requirements, rate limits, error conditions, or what constitutes a 'comprehensive clinical summary' (e.g., format, data sources, or time range). For a tool with 7 parameters and no annotation coverage, this is a significant gap in transparency.

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 front-loads the core purpose ('Get a comprehensive clinical summary for a patient') with zero wasted words. It's appropriately sized for the tool's complexity, making it easy for an agent to parse quickly without unnecessary elaboration.

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 tool's complexity (7 parameters, no output schema, and no annotations), the description is incomplete. It lacks details on behavioral aspects (e.g., permissions, errors), output format, or how parameter choices impact the summary. While schema coverage is high, the absence of annotations and output schema means the description should compensate more to guide effective tool use.

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 100%, with all parameters clearly documented in the input schema (e.g., 'patient_id' as Patient ID, booleans for including allergies, problems, etc.). The description adds no additional parameter semantics beyond what the schema provides, such as explaining how these inclusions affect the summary output. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('comprehensive clinical summary for a patient'), making the purpose specific and understandable. However, it doesn't explicitly differentiate this tool from sibling tools like 'get_encounter' or 'get_patient_encounters', which might also retrieve patient-related clinical data, leaving some ambiguity about scope boundaries.

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., patient must exist), exclusions, or comparisons to sibling tools like 'get_encounter' or 'search_patients', leaving the agent to infer usage context solely from the tool name and parameters.

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

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/ophydami/Athenahealth-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server