Skip to main content
Glama

check_drug_interactions

Check for potential drug interactions between prescribed medications to ensure patient safety and prevent adverse effects.

Instructions

Check for drug interactions for a patient

Input Schema

NameRequiredDescriptionDefault
medicationsYesList of medication names or RxNorm codes
patient_idYesPatient ID

Input Schema (JSON Schema)

{ "properties": { "medications": { "description": "List of medication names or RxNorm codes", "items": { "type": "string" }, "type": "array" }, "patient_id": { "description": "Patient ID", "type": "string" } }, "required": [ "patient_id", "medications" ], "type": "object" }

Implementation Reference

  • MCP tool handler that extracts arguments, calls AthenaHealthClient.checkDrugInteractions, logs data access, and formats the response as MCP content.
    async handleCheckDrugInteractions(args: any) { const { patient_id, medications } = args; const interactions = await this.client.checkDrugInteractions(patient_id, medications); logDataAccess('DRUG_INTERACTIONS', patient_id, 'CHECK'); return { content: [ { type: 'text' as const, text: JSON.stringify(interactions, null, 2), }, ], }; }
  • Tool definition including name, description, and input schema for validating arguments.
    { name: 'check_drug_interactions', description: 'Check for drug interactions for a patient', inputSchema: { type: 'object', properties: { patient_id: { type: 'string', description: 'Patient ID' }, medications: { type: 'array', items: { type: 'string' }, description: 'List of medication names or RxNorm codes' }, }, required: ['patient_id', 'medications'], }, },
  • Switch case in MCP server that routes 'check_drug_interactions' tool calls to the appropriate handler.
    case 'check_drug_interactions': return await this.toolHandlers.handleCheckDrugInteractions(args);
  • Core implementation that makes the POST request to Athenahealth API endpoint for drug interactions, formatting medications as form data.
    async checkDrugInteractions(patientId: string, medications: string[]): Promise<ClinicalAlert[]> { const formData = new URLSearchParams(); medications.forEach((med, index) => { formData.append(`medications[${index}]`, med); }); const response = await this.makeRequest<AthenaHealthResponse<ClinicalAlert[]>>( `${this.config.practice_id}/patients/${patientId}/druginteractions`, { method: 'POST', data: formData.toString(), headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, } ); return response.data; }

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