Skip to main content
Glama
Open Drug Data MCP
by knorby

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DSLD_API_KEYNoOptional NIH DSLD key from data.gov. Raises the limit from 1,000 to 10,000 requests per hour. Keyless requests work.
UMLS_API_KEYNoRequired for the UMLS reference source only. A free UTS account API key under the UMLS Metathesaurus license. Without it, other sources work and the UMLS reference source returns a configuration error naming this variable.
NLM_PUBMED_TOOLNoOptional tool name NCBI asks distributed software to send with PubMed requests.
OPENFDA_API_KEYNoOptional openFDA key. Raises the upstream rate limit; keyless requests work.
NLM_PUBMED_EMAILNoOptional contact address NCBI asks distributed software to send with PubMed requests.
NLM_PUBMED_API_KEYNoOptional NCBI E-utilities key for PubMed. Raises the rate limit.
DRUGDATA_TIMEOUT_MSNoPer-request upstream timeout in milliseconds. Must be a positive integer when set; a blank value counts as unset.30000
DRUGDATA_DISABLED_SOURCESNoComma-separated adapter ids to switch off: openfda, cosing, nlm, drugcentral, dsld, inkeedecoder. nlm covers every NLM namespace and the PubChem adapter. Unknown ids are a configuration error.
DRUGDATA_SEARCH_TIMEOUT_MSNoShared wall-clock deadline for search fan-out and enrichment. Returns completed results with source statuses and coverage.positive integer or positive integer; blank means default. Does not change by-source lookup timeouts.45000

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Open Drug Data is one research interface over openFDA, CosIng, RxNorm/DailyMed, DrugCentral, NIH DSLD, INKEEDecoder, and the NLM reference sources (Prescribable RxNorm, RxClass, MeSH, PubMed, MedlinePlus, UMLS, ClinicalTrials.gov, PubChem). Every record is credited to the upstream database that supplied it and carries a deep link.

The loop is search → resolve → get. Every search and resolve result ends with nextSteps; follow them instead of inventing an identifier.

For free text, start with type 'name'. Use product type 'brand' deliberately for a brand-only search; it reaches fewer sources than 'name'. If a full product name has no matches, retry type 'name' with only the brand (Natrol) or only the ingredient (melatonin); compare brand, variant, strength, and dosage form before selecting a record. Pass product category when known: medication, supplement, or cosmetic. Ingredient search has no category filter. Search returns entities with original records, confirmed links, candidates, conflicts, per-entity nextSteps, source statuses, and coverage; identical names alone never establish identity. For an existing source+id, use drugdata_get_product or drugdata_get_ingredient instead of searching again; pass the returned id unchanged. Open only records needed for the question, with costly flags off unless needed. If tools omit needed page or article content, selectively fetch the supplied URLs with the host's web tools; do not bulk crawl. PubChem CID is supported by ingredient search, get_ingredient(source: pubchem), and resolve_identifiers(cid). Read partial, coverage, and each source's error/timeout status before claiming completeness. Default searches return lightweight evidence without identity resolution; resolve_identities: true opts in to enrichment of at most five entities with concurrency three. Search has a shared 45-second default deadline and retains completed results when that deadline expires. Unresolved candidates and source-attributed conflicts stay explicit; do not choose or conceal them.

  1. Search by what you have. drugdata_search_products accepts a product name, brand, ingredient, barcode, or NDC. drugdata_search_ingredients accepts a name, INCI name, UNII, CAS number, EC number, RxCUI, or PubChem CID. Choose the type that matches the value in hand.

  2. Resolve cross-source identity when the search entity has not already supplied the needed links. Call drugdata_resolve_identifiers with exactly one of unii, ndc, rxcui, cid, cas, inci_name, substance_name, spl_setid, or dsld_id. That runs the identity chain across sources and returns what it could link plus what remains ambiguous.

  3. get the full record from the database that owns it. drugdata_get_product takes source openfda, dsld, dailymed, or inkeedecoder; drugdata_get_ingredient takes source openfda, cosing, drugcentral, nlm, inkeedecoder, or pubchem. Pass the database's own id from the result unchanged. Costly sections are opt-in; turn them on only when the question needs them.

  4. For everything written about a substance, drugdata_search_references searches one NLM reference source at a time — PubMed literature, ClinicalTrials.gov studies, MedlinePlus consumer pages, RxClass drug classes, MeSH descriptors, UMLS terminology, and the prescribable drug dataset. Results are link-first: titles, identifiers, and deep links, not article text. Continue with the returned cursor when hasMore is true.

Identifier vocabulary: NDC is a US drug product or package code; UNII is an FDA ingredient identifier; RxCUI is an RxNorm concept; CAS and EC are chemical registry numbers; INCI is a cosmetic ingredient name; an SPL setid identifies a DailyMed label document; a structId identifies a DrugCentral structure; a CID identifies a PubChem compound; a PMID identifies a PubMed article and an NCT number a ClinicalTrials.gov study. DSLD label ids and source slugs appear alongside them. An identifier one source knows often unlocks records in another, and resolve_identifiers is the bridge.

Confidence: in resolve results, links are trusted matches — direct means the same identifier, derived means a documented crosswalk. candidates are possible matches that need judgment: never silently treat one as confirmed or choose one for the user. When identity matters, prefer a direct link or ask which record is meant.

Pagination: a search takes one page number, applies it to every source in the fan-out, and re-queries all of them; read each source's hasMore rather than assuming a shared page count. Lookups page their own ingredient and label-section collections. Reference searches continue with an opaque cursor instead of a page number. Never walk every page by default — request the next page only when the answer needs it. Responses are character-bounded; when text or whole entities are omitted, the result says so. Coverage counts describe the pre-bound result.

Sourcing etiquette: cite the upstream database and its deep link in your answer, and do not present this server as the source. Regulatory text — annex notices, label sections, indication wording — is verbatim: summarize or quote briefly with attribution rather than republishing it. Zero matches are a normal result, not an error; use drugdata_ping when a source looks unavailable.

Informational/research use only — not medical advice; see docs/SOURCES.md for source terms.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
drugdata_pingA

Check that the server is running and see which data sources this process will use. Reports the server name and version, each source's adapter id and whether it is enabled, and whether its API key is configured (never the key itself). Needs no credentials and no network — use it to verify connectivity before searching.

drugdata_search_productsA

Search products across openFDA, DSLD, INKEEDecoder, RxNorm, and DailyMed. Start free text with type 'name'; use 'brand' deliberately for brand-only search, which covers fewer sources. If a full product name has no matches, retry type 'name' with only the brand (Natrol) or only the ingredient (melatonin); compare brand, variant, strength, and dosage form before selecting a record. Use ingredient, barcode, or ndc when appropriate, and pass category medication/supplement/cosmetic when known. Returns evidence-grouped entities with original records, confirmed links, source-attributed conflicts, unconfirmed candidates, and per-entity nextSteps. A product RxCUI or shared name alone does not merge products. For source+id use drugdata_get_product instead. Default searches return lightweight evidence without identity resolution; resolve_identities: true opts in to enrichment of at most five entities, concurrency three, within the shared 45-second default deadline. Read partial, coverage, and sources (status ok/error/timeout); completed results survive a timeout. One page applies to every source and re-queries all of them; each source's hasMore is independent. Selectively fetch supplied URLs only when more page content is needed. No matches is normal, not an error.

drugdata_search_ingredientsA

Search ingredients across openFDA, CosIng, DrugCentral, RxNorm, PubChem, and INKEEDecoder. Start free text with type 'name'; use inci, unii, cas, ec, rxcui, or cid when that is the value you have. There is no ingredient category filter. Returns evidence-grouped entities with original records, confirmed links, source-attributed conflicts, unconfirmed candidates, and per-entity nextSteps. For source+id use drugdata_get_ingredient instead. Default searches return lightweight evidence without identity resolution; resolve_identities: true opts in to enrichment of at most five entities, concurrency three, within the shared 45-second default deadline. Read partial, coverage, and sources (status ok/error/timeout); completed results survive a timeout. One page applies to every source and re-queries all of them; each source's hasMore is independent. Selectively fetch supplied URLs only when more page content is needed. No matches is normal, not an error.

drugdata_get_productA

Use this for an existing source+id, including an entity record or confirmed link; do not repeat a broad search. Fetch only needed records; selectively fetch supplied URLs with host web tools if more page content is needed. Fetch one product record from openFDA, DSLD, DailyMed, or INKEEDecoder. The id is the database's own key: a product NDC (openFDA), a numeric label id (DSLD), an SPL set id (DailyMed), or a product slug/URL (INKEEDecoder). The result carries the unified product ref, source-specific details, ingredient rows (roles, quantities, UNIIs when supplied by the source), links, and suggested follow-up calls. openFDA directory ingredient rows may lack identifiers. For SPL label UNIIs use drugdata_resolve_identifiers with include_label_ingredients: true. include_ingredients is true by default; false also skips DSLD ingredient mapping and enrichment. include_ingredient_enrichment adds DSLD nutrient CAS/group metadata with up to 20 extra serial requests, default false; it has no effect when ingredients are omitted. include_label_sections extracts DailyMed SPL usage sections — these are large and default false. page pages the ingredient and label-section collections one page at a time and re-fetches the record; it never walks pages automatically. A malformed id is an error result naming the search tool that finds a valid one; an upstream miss is an error result, not an empty product.

drugdata_get_ingredientA

Use this for an existing source+id, including an entity record or confirmed link; do not repeat a broad search. Fetch only needed records; selectively fetch supplied URLs with host web tools if more page content is needed. Fetch one ingredient profile from openFDA, CosIng, DrugCentral, RxNorm, INKEEDecoder, or PubChem. The id is the database's own key: a UNII or dashed CAS number (openfda), a numeric substance id or exact INCI/glossary name (cosing), a numeric structure id, UNII, dashed CAS number, or a supported TYPE:value crosswalk identifier (drugcentral), a numeric RxCUI (nlm), an ingredient slug/URL (inkeedecoder), or a numeric PubChem CID (pubchem). The result carries the unified ingredient ref, the source's profile fields and identifier crosswalk, verbatim regulatory notices where the source publishes them, links, and suggested follow-up calls. include_clinical asks DrugCentral for indications, off-label uses, contraindications, and FAERS counts — extra requests, verbose, default false. include_cosing_panel asks INKEEDecoder to include its CosIng CAS/EC/IUPAC panel from the same page fetch — no extra request, default false. A malformed id is an error result naming the search tool that finds a valid one; an upstream miss is an error result, not an empty profile.

drugdata_resolve_identifiersA

Resolve one identifier across openFDA, CosIng, RxNorm, DrugCentral, DailyMed, DSLD, INKEEDecoder, and PubChem. Pass exactly one of unii, ndc, rxcui, cid (PubChem compound id), cas, inci_name, substance_name, spl_setid, or dsld_id. Ingredient identifiers return an identity graph of confident cross-source links with labeled candidate sets for ambiguity; product identifiers (ndc, spl_setid, dsld_id) return the product's cross-source links plus its ingredient rows. include_label_ingredients parses SPL XML for ingredient UNIIs — extra request, default false. resolve_ingredients runs the full resolution per ingredient — many requests on multi-ingredient products, default false — and returns graphs for a prefix of the ingredient rows, capped at 20. max_candidates caps the options per ambiguous source result. Results carry a compact confidence count and suggested follow-up calls. An identifier of the wrong shape is an error result naming the search tool that finds a valid one; zero matches are ordinary and in-band.

drugdata_search_referencesA

Search NLM reference sources beyond product and ingredient records: Prescribable RxNorm (the currently prescribable drug dataset), RxClass (drug classes by name or member RxCUI), MeSH (medical subject descriptors), PubMed (biomedical literature), MedlinePlus (consumer-health topic pages), MedlinePlus Genetics (condition and gene pages), MedlinePlus Connect (drug pages by name, RxCUI, or NDC), UMLS (unified medical terminology; needs UMLS_API_KEY), and ClinicalTrials.gov (study registry). One call searches exactly one source — pass source plus the query. Results are link-first references: a title, the stable identifier (RxCUI, class id, MeSH id, PMID, CUI, or NCT number), and a deep link to the upstream record — not extracted article or study text. Each source accepts only some query types (for example MeSH searches by name only); an invalid pairing is rejected before any request. Continue with the returned cursor when hasMore is true. No matches is a normal empty result, not an error.

Prompts

Interactive templates invoked by user choice

NameDescription
research_drugResearch a product or ingredient across openFDA, CosIng, RxNorm/DailyMed, DrugCentral, NIH DSLD, INKEEDecoder, and PubChem: search by name or identifier, resolve identity across sources, and fetch selected records with citations.

Resources

Contextual data attached and managed by the client

NameDescription
server-infoServer name, version, transport, the enabled upstream databases, and the research-use disclaimer.

TDQS

A4.5/5.0

Scored across 7 tools

Disambiguation4/5

The product vs ingredient tools are clearly separated, and search/get/resolve roles are mostly distinct. There is some overlap around identifiers: an NDC can be used in search_products, get_product, and resolve_identifiers, though the descriptions explain the different purposes. Overall the boundaries are understandable but not perfectly crisp.

Naming Consistency5/5

All tools share a consistent `drugdata_` prefix and follow a predictable verb-plus-resource pattern such as search_products, get_product, and resolve_identifiers. `ping` is the only non-resource verb, but it is conventional and does not disrupt the pattern.

Tool Count5/5

Seven tools is a well-scoped set for a multi-source drug data server, with separate operations for products, ingredients, identifier resolution, references, and health checking. Each tool has a clear place and no bulk of redundant endpoints.

Completeness4/5

The surface covers searching and fetching products and ingredients, cross-source identifier resolution, reference search, and server health. Minor gaps exist in that reference results are link-first rather than retrievable records, and some specialized lookups depend on optional parameters, but core workflows are covered.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues