@ythalorossy/openfda 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +16 -5
  2. package/dist/index.js +669 -311
  3. package/package.json +4 -2
package/README.md CHANGED
@@ -8,16 +8,26 @@ A Model Context Protocol (MCP) server for querying drug information from the Ope
8
8
 
9
9
  ## Features
10
10
 
11
- - Retrieve drug label information by brand name
11
+ - Retrieve drug label information by brand name, with `limit` (default 1, max 25) and `skip` to page through the rest of the matching labels — the first match is not necessarily the most canonical one, and `substance_name` leads each record so a combination product is obvious at a glance
12
12
  - Retrieve drug information by generic (active ingredient) name
13
13
  - Get all brand versions of a generic drug
14
- - Get adverse event (side effect) reports for a drug (by brand or generic name)
14
+ - Get adverse event (side effect) reports for a drug (by brand or generic name), with paging via `skip` (maximum 25000) and ordering via `sort` (`receivedate:desc` / `receivedate:asc`) — without `sort`, results are a deterministic earliest-`report_id` slice, so a small sample is not representative
15
+ - Rank adverse-event values for a drug by frequency (e.g. the most commonly reported reactions) via `get-drug-adverse-event-counts`; returns `{term, term_code, count}` — for coded fields (`serious`, `patient.patientsex`, `patient.reaction.reactionoutcome`) `term` is a decoded human-readable label and `term_code` carries the raw upstream value, while text fields pass through unchanged in both; note that openFDA omits a result total on aggregated responses, so this tool reports no total
15
16
  - Retrieve all drugs manufactured by a specific company
16
- - Get comprehensive drug safety information (warnings, contraindications, interactions, precautions, etc.)
17
- - Retrieve full Drugs@FDA application data for a given section and field
17
+ - Get comprehensive drug safety information (warnings, contraindications, interactions, precautions, etc.); `generic_name` is `null`, not `"Unknown"`, when the label carries no structured generic or substance name
18
+ - Retrieve Drugs@FDA application data for a given section and field, with a `limit` parameter and a real `Showing N of M` total; can also search by `sponsor_name`, which is stored uppercase and normalised automatically. `detail` controls the record shape and defaults to `summary` (application number, sponsor, products and a `submission_count`, with no `submissions` array); `detail: 'full'` adds the `submissions` array, capped at 10 per record, plus `submissions_truncated` when more were omitted. This default changed in 1.3.0 — code written against an earlier version that read `results[].submissions` directly must now pass `detail: 'full'`
18
19
  - Normalize and validate NDC (National Drug Code) formats
19
20
  - Helpful error messages and suggestions for failed queries
20
21
 
22
+ > **Route vocabularies differ across tools.** `openfda.route` (used by
23
+ > `get-drug-by-name`, `get-drug-by-generic-name`, `get-drug-by-ndc`,
24
+ > `get-drug-by-product-ndc` and `get-drugs-by-manufacturer` — the SPL route
25
+ > of administration) and `products[].route` (used by `get-drugsfda` — the
26
+ > Drugs@FDA product route) are different controlled vocabularies. The same
27
+ > insulin glargine product is reported as `SUBCUTANEOUS` in one and
28
+ > `INJECTION` in the other, so joining or filtering on route across tools
29
+ > will silently miss matches.
30
+
21
31
  1. **Set up your OpenFDA API Key**
22
32
 
23
33
  The server reads `OPENFDA_API_KEY` from its process environment. It is
@@ -59,7 +69,8 @@ A Model Context Protocol (MCP) server for querying drug information from the Ope
59
69
  "get-drug-safety-info",
60
70
  "get-drug-by-ndc",
61
71
  "get-drug-by-product-ndc",
62
- "get-drugsfda"
72
+ "get-drugsfda",
73
+ "get-drug-adverse-event-counts"
63
74
  ]
64
75
  }
65
76
  }