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);
    }
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. It mentions 'search' but doesn't clarify if this is a read-only operation, what the output format might be, whether there are rate limits, or if it requires specific permissions. For a search tool with zero 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 with zero waste. It's front-loaded with the core purpose and appropriately sized for a simple search tool, making it easy to parse quickly.

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 complexity of RxNorm mappings and the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'mappings' are, what the search returns, or how it relates to other mapping tools. For a tool in a domain with many siblings, more context is needed to guide effective 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?

The schema description coverage is 100%, with the parameter 'drugName' clearly documented as 'Drug name to search for in RxNorm mappings'. The description adds no additional meaning beyond this, such as examples, formatting hints, or search behavior details. Baseline 3 is appropriate since the schema does the heavy lifting.

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 'Search for RxNorm mappings by drug name' clearly states the action (search) and target (RxNorm mappings), but it's somewhat vague about what 'mappings' entail compared to siblings like 'get_mappings_by_rxcui' or 'get_rxnorm_mappings_by_pharmacologic_class'. It doesn't specify whether this searches for mappings to/from RxNorm or within RxNorm, leaving room for ambiguity.

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. With siblings like 'search_drug_names', 'get_mappings_by_rxcui', and 'get_rxnorm_mappings_by_pharmacologic_class', there's no indication of how this tool differs in context or scope, leaving the agent to guess based on the name alone.

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

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