Skip to main content
Glama
RowanErasmus

DailyMed MCP Server

by RowanErasmus

get_download_links

Retrieve ZIP and PDF download links for specific drug documents from the FDA DailyMed database using the drug's SET ID.

Instructions

Get download links for ZIP and PDF files of a specific drug by its SET ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
setIdYesThe SET ID of the drug to get download links for

Implementation Reference

  • Implementation of the download link generation for ZIP and PDF files in SPLClient.
    async downloadSPLZip(setId: string): Promise<string> {
      if (!setId || typeof setId !== "string") {
        throw new Error("Valid SET ID is required");
      }
    
      return `${this.baseURL}/spls/${setId}.zip`;
    }
    
    async downloadSPLPdf(setId: string): Promise<string> {
      if (!setId || typeof setId !== "string") {
        throw new Error("Valid SET ID is required");
      }
    
      return `${this.baseURL}/spls/${setId}.pdf`;
    }
  • src/index.ts:206-227 (registration)
    Tool handler registration for 'get_download_links' in the DailyMed server.
    case "get_download_links":
      const zipLink = await this.client.downloadSPLZip(
        args.setId as string,
      );
      const pdfLink = await this.client.downloadSPLPdf(
        args.setId as string,
      );
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              {
                zipDownload: zipLink,
                pdfDownload: pdfLink,
              },
              null,
              2,
            ),
          },
        ],
      };
  • Tool schema definition for 'get_download_links'.
      name: "get_download_links",
      description:
        "Get download links for ZIP and PDF files of a specific drug by its SET ID",
      inputSchema: {
        type: "object",
        properties: {
          setId: {
            type: "string",
            description: "The SET ID of the drug to get download links 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