Skip to main content
Glama
RowanErasmus

DailyMed MCP Server

by RowanErasmus

get_drug_packaging

Retrieve detailed packaging information for FDA-approved drugs using their unique SET ID from the DailyMed database.

Instructions

Get packaging information for a specific drug by its SET ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
setIdYesThe SET ID of the drug to get packaging info for

Implementation Reference

  • The handler for fetching packaging information, which makes an API call to `/spls/{setId}/packaging.json`.
    async getSPLPackaging(setId: string): Promise<any> {
      if (!setId || typeof setId !== "string") {
        throw new Error("Valid SET ID is required");
      }
    
      try {
        const response = await this.client.get(`/spls/${setId}/packaging.json`);
    
        if (response.data && response.data.data) {
          return response.data.data;
        } else {
          throw new Error("Unexpected response structure for SPL packaging");
        }
      } catch (error) {
        throw new Error(
          `Failed to fetch SPL packaging: ${error instanceof Error ? error.message : "Unknown error"}`,
        );
      }
    }
  • src/tools.ts:55-67 (registration)
    Registration of the `get_drug_packaging` tool in the `dailyMedTools` list.
      name: "get_drug_packaging",
      description: "Get packaging information for a specific drug by its SET ID",
      inputSchema: {
        type: "object",
        properties: {
          setId: {
            type: "string",
            description: "The SET ID of the drug to get packaging info for",
          },
        },
        required: ["setId"],
      },
    },

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