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"],
      },
    },
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 states the tool retrieves packaging information, implying a read-only operation, but doesn't clarify aspects like rate limits, error handling, authentication needs, or what the output format might be. This leaves significant gaps in understanding how the tool behaves beyond its basic function.

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 that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to understand at a glance.

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 lack of annotations and output schema, the description is insufficient for a tool that likely returns structured data. It doesn't explain what packaging information includes (e.g., types, formats) or how results are presented, leaving the agent with incomplete context for 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 input schema has 100% description coverage, with 'setId' clearly documented. The description adds minimal value by reiterating the parameter's purpose ('by its SET ID'), but doesn't provide additional context such as format examples or constraints beyond what the schema already states. This meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the verb ('Get') and resource ('packaging information for a specific drug'), making the purpose evident. It distinguishes itself from siblings by focusing on packaging info, unlike tools like 'get_drug_details' or 'get_drug_ndcs'. However, it doesn't explicitly differentiate from all siblings, such as 'get_drug_media', which might also provide related information.

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. It mentions the 'SET ID' parameter but doesn't explain when to choose this over other drug-related tools like 'get_drug_details' or 'get_drug_ndcs', nor does it specify prerequisites or exclusions for usage.

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