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
| Name | Required | Description | Default |
|---|---|---|---|
| setId | Yes | The SET ID of the drug to get packaging info for |
Implementation Reference
- src/clients/spl-client.ts:344-362 (handler)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"], }, },