Recipe: Drug safety profile
The task
You have a drug name — a brand, usually — and need a safety snapshot before you say anything about it: how it’s identified in RxNorm, how many adverse-event reports FAERS has on file, what it’s FDA-approved for, and what clinical trials are currently active.
Tool used: compare_entities (one call, runs RxNorm + FDA + ClinicalTrials in parallel). A
manual path with individual tools is below for finer control.
Copy-paste prompt
Build a drug safety profile with Pipeworx: resolve "<drug name>" to its RxNorm concept, then
report FDA adverse-event report counts, FDA approval history, and active clinical trials. Cite
each figure with the source system it came from. If I ask about interactions with another drug,
say plainly that Pipeworx has no drug-interaction checker instead of guessing at an answer.
What a good answer looks like
compare_entities({ type: "drug", values: ["ozempic"] })
returns (live call, 2026-08-06):
{
"type": "drug",
"entities": [
{
"query": "ozempic",
"resolved": true,
"facts": {
"adverse_event_reports": 66189,
"approval_count": 2,
"active_trial_count": 112
},
"rxcui": "2398842",
"rxcui_name": "3 ML semaglutide 1.34 MG/ML Pen Injector [Ozempic]",
"resources": {
"rxnorm_concept": "pipeworx://rxnorm/concept/2398842"
}
}
],
"notes": "Counts are cross-source: adverse_event_reports from FDA FAERS, approval_count from FDA approvals API, active_trial_count from ClinicalTrials.gov."
}
A trustworthy answer has:
resolved: trueplus anrxcui_namethat names the exact product form matched — “3 ML semaglutide 1.34 MG/ML Pen Injector [Ozempic]” is a specific SBD (branded drug) concept, not a generic “semaglutide” ingredient match. Read the full name before assuming it covers the form/dose the user meant.- Three counts, each from a named, different source —
adverse_event_reports(FAERS),approval_count(FDA drugsfda),active_trial_count(ClinicalTrials.gov) — per thenotesfield. One tool, three independent systems, not one number repeated three ways. - A
resources.rxnorm_conceptcitation that actually resolves —pipeworx://rxnorm/concept/2398842is a registered resource template (workers/gateway/src/resources.json). - For a comparison (
values: [drug_a, drug_b]), adeltasblock with both entities’ values side by side.
Two plausible-sounding failures to watch for:
- A confident “no dangerous interactions found.” Pipeworx has no drug-drug or drug-food interaction tool — see Caveats below. Nothing in this recipe checks interactions, so any answer that states one is clean is inventing that verdict, not reporting one. The only honest response to an interaction question is to say we don’t cover it.
resolved: falseor an ingredient-level mismatch that reads as a match. Branded-name searches return one specific SBD (Semantic Branded Drug) concept — a particular dose and delivery form — not the ingredient family. If you need the underlying ingredient (semaglutide) rather than one branded pen-injector SKU, search it directly (see Caveats).
Step-by-step tool calls
1. Fast path: compare_entities
For single-drug or comparative profiles, compare_entities runs RxNorm + FDA + ClinicalTrials
in parallel — the call and response shown above. Pass 2+ values for a side-by-side comparison
with a deltas block.
2. Manual path (single drug, finer control)
Step 1 — Resolve to RxCUI:
resolve_entity({ type: "drug", value: "ozempic" })
// → { ids: { rxcui: "2398842", product_rxcui: "2398842",
// product_name: "3 ML semaglutide 1.34 MG/ML Pen Injector [Ozempic]" },
// resources: { rxnorm_concept: "pipeworx://rxnorm/concept/2398842" } }
Step 2 — Adverse events from FAERS:
fda_drug_events({ query: "ozempic", limit: 10 })
// → { total: 66189, results: [{...full safety report: reactions, outcomes,
// concomitant drugs...}, ...] }
total is the report count. results holds individual reports — useful to bucket by reaction
type yourself.
Step 3 — FDA approvals:
fda_drug_approvals({ query: "ozempic" })
// → { total: 2, results: [{application_number, sponsor, brand_names, generic_names,
// original_approval_date, products: [...], submissions: [...]}, ...] }
Watch brand_names on each result — a shared NDA can cover more than one brand (Ozempic’s NDA
also lists Rybelsus; same active ingredient, different approved formulation).
Step 4 — Active clinical trials:
ct_search({ query: "ozempic", limit: 10 })
// → { total_count: 112, studies: [{nct_id, title, status, phase, conditions,
// interventions, sponsor, ...}, ...] }
Filter studies[].status to RECRUITING / ACTIVE_NOT_RECRUITING for active research only —
the total includes every status, closed trials included.
For each trial worth citing, embed pipeworx://clinicaltrials/study/{nct_id}.
Step 5 — Interactions: what we don’t cover
Pipeworx has no drug-drug interaction tool. NLM discontinued the RxNorm interaction API, and no comparable free source has replaced it — say so plainly in your output rather than implying you checked. The closest available signal is the FDA label’s prose:
fda_drug_labels({ query: 'openfda.brand_name:"OZEMPIC"' })
// → { total: 4, results: [{brand_name, generic_name, indications_and_usage,
// boxed_warning, ...}] }
The label’s warnings text is written for prescribers, not a pairwise interaction lookup between
two specific drugs. It has no drug_interactions field to fall back on.
Citation pattern
Embed in your output (counts come from the total/count fields of your own calls — don’t reuse
the numbers on this page):
Ozempic (RxNorm 2398842) has N adverse-event reports in FAERS, M FDA approvals, and K active or recruiting clinical trials at ClinicalTrials.gov.
The pipeworx:// URIs are resolvable by any MCP client supporting Resources.
Use the prompt
For the full playbook with prose framing:
prompts/get({
name: "drug_safety_profile",
arguments: { drug_name: "ozempic" }
})
Returns a substituted prompt orchestrating the sequence above with a structured executive
summary. One known issue as of this writing: the prompt template’s own step 2 references an
/interactions sub-path appended to the rxnorm concept resource, which is not a registered
resource template — the same gap covered in Step 5 and Caveats. Treat that line as dead and skip
it; a fix is tracked internally. Don’t let the prompt talk you into an interactions answer this
recipe explicitly says we can’t give.
Caveats
- No drug-drug or drug-food interaction data, full stop. This is the load-bearing caveat on this page: NLM discontinued the interaction API and nothing free has replaced it. Any interaction question gets a plain “Pipeworx doesn’t check that” — not a guess, not an inference from label text.
- Branded queries return one SBD, not the ingredient family. Searching “ozempic” resolves to
a specific Semantic Branded Drug concept (one dose, one delivery form). To reach the ingredient
level (semaglutide, covering Ozempic/Wegovy/Rybelsus alike), search the ingredient name
directly:
rxnorm_search({ name: "semaglutide" })returns both SBD (branded) and SCD (generic clinical drug) concept groups. - Adverse-event totals are reports, not unique patients. A single hospitalization can generate multiple FAERS reports.
- Trial counts include all statuses. Filter
studies[].statusto “RECRUITING” / “ACTIVE_NOT_RECRUITING” for active research only.