Skip to main content
Glama
RowanErasmus

DailyMed MCP Server

by RowanErasmus

search_by_rxnorm_mapping

Find RxNorm mappings for medications using drug names to access standardized drug identifiers and related information from the DailyMed database.

Instructions

Search for RxNorm mappings by drug name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
drugNameYesDrug name to search for in RxNorm mappings

Implementation Reference

  • The searchRxNormMappingsByName method in MappingService performs the core logic for searching RxNorm mappings by drug name.
    searchRxNormMappingsByName(drugName: string): RxNormMapping[] {
      const searchTerm = drugName.toLowerCase();
      const results: RxNormMapping[] = [];
      
      for (const mappings of this.rxNormMappings.values()) {
        for (const mapping of mappings) {
          if (mapping.rxstring.toLowerCase().includes(searchTerm)) {
            results.push(mapping);
          }
        }
      }
      
      return results;
    }
  • The tool definition and input schema for search_by_rxnorm_mapping in src/tools.ts.
    {
      name: "search_by_rxnorm_mapping",
      description: "Search for RxNorm mappings by drug name",
      inputSchema: {
        type: "object",
        properties: {
          drugName: {
            type: "string",
            description: "Drug name to search for in RxNorm mappings",
          },
        },
        required: ["drugName"],
      },
  • The delegate method searchByRxNormMapping in DailyMedClient, which bridges the tool call to the MappingService.
    async searchByRxNormMapping(drugName: string) {
      return this.mappingService.searchRxNormMappingsByName(drugName);
    }

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/RowanErasmus/dailymed-mcp-server'

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