Skip to main content
Glama

check_drug_interactions

Check for potential drug interactions between medications for a specific patient using athenahealth's clinical data.

Instructions

Check for drug interactions for a patient

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patient_idYesPatient ID
medicationsYesList of medication names or RxNorm codes

Implementation Reference

  • MCP tool handler that processes the check_drug_interactions tool call. Extracts parameters, calls the client service, logs data access, and returns the interactions as JSON text 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 schema definition including name, description, and input validation schema for check_drug_interactions.
    {
      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'],
      },
    },
  • Registration of the check_drug_interactions tool in the MCP server request handler switch statement, dispatching to the tool handler.
    case 'check_drug_interactions':
      return await this.toolHandlers.handleCheckDrugInteractions(args);
  • Core helper function that performs the actual API call to athenahealth's druginteractions endpoint, constructing form data from medications list and returning ClinicalAlert[].
    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;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden but only states the basic action without behavioral details. It doesn't disclose critical traits like whether this is a read-only check (likely, but not confirmed), if it requires specific permissions, potential rate limits, or what happens on errors (e.g., invalid patient ID). This leaves gaps for safe agent invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/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 purpose without fluff. It's appropriately sized for a simple tool, though it could be slightly more informative (e.g., adding context on output) without losing conciseness.

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 no annotations and no output schema, the description is incomplete for a tool that likely returns critical clinical data. It doesn't explain what the check entails (e.g., interaction severity, recommendations) or the return format, leaving the agent uncertain about behavioral outcomes. For a 2-parameter tool with high schema coverage, it compensates poorly for missing structured 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 100%, so the schema already documents both parameters (patient_id and medications). The description adds no extra meaning beyond implying the parameters are used together for interaction checking, but doesn't clarify semantics like medication format expectations (e.g., brand vs. generic names) beyond the schema's 'medication names or RxNorm codes'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Check for drug interactions for a patient' clearly states the action (check) and resource (drug interactions), but it's vague about scope (e.g., severity levels, interaction types) and doesn't differentiate from potential siblings like 'create_prescription' or 'get_clinical_summary' that might involve medication safety. It avoids tautology by not restating the tool name, but lacks specificity.

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?

No guidance is provided on when to use this tool versus alternatives (e.g., 'create_prescription' for prescribing, 'get_clinical_summary' for broader patient data). The description implies usage in medication safety contexts but offers no explicit when/when-not rules or prerequisites, such as needing patient consent or prior medication lists.

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