Recipe: Drug safety profile
This recipe walks an agent from “ozempic” to a structured safety profile — RxNorm canonical concept, FDA adverse-event report counts, FDA approval history, active clinical trials — with pipeworx:// citations.
Tools used: resolve_entity, compare_entities (optional), fda_drug_events, fda_drug_approvals, ct_search, rxnorm_interactions.
Calls: 1 (compound) or 4 (parallel) depending on path.
Fast path: compare_entities
For single-drug or comparative profiles, compare_entities runs RxNorm + FDA + ClinicalTrials in parallel:
compare_entities({
type: "drug",
values: ["ozempic", "mounjaro"]
})
Returns:
{
"type": "drug",
"entities": [
{
"query": "ozempic",
"resolved": true,
"rxcui": "1991311",
"rxcui_name": "...semaglutide... [Ozempic]",
"facts": {
"adverse_event_reports": 63000,
"approval_count": 2,
"active_trial_count": 104
},
"resources": {
"rxnorm_concept": "pipeworx://rxnorm/concept/1991311",
"rxnorm_interactions": "pipeworx://rxnorm/concept/1991311/interactions"
}
},
{ "query": "mounjaro", ...same shape... }
],
"deltas": {
"adverse_event_reports": [{entity: "ozempic", value: 63000}, {entity: "mounjaro", value: 87308}],
...
}
}
One call, three sources, parallel — replaces ~8 sequential calls.
Manual path (single drug)
If you want finer control:
Step 1: Resolve to RxCUI
resolve_entity({ type: "drug", value: "ozempic" })
// → { ids: { rxcui: "1991311", product_name: "..." },
// resources: { rxnorm_concept, rxnorm_interactions } }
Step 2: Adverse events from FAERS
fda_drug_events({ query: "ozempic", limit: 10 })
// → { total: 63000, results: [{...full safety report...}, ...] }
The total field is the report count. The results array contains individual reports — useful to bucket by reaction type.
Step 3: FDA approvals
fda_drug_approvals({ query: "ozempic" })
// → { total: 2, results: [{approval_date, indication, ...}] }
Step 4: Active clinical trials
ct_search({ query: "ozempic", limit: 10 })
// → { total_count: 104, studies: [{nct_id, brief_title, phase, status, ...}] }
For each interesting trial, embed pipeworx://clinicaltrials/study/{nct_id} in your output.
Step 5: Drug interactions
rxnorm_interactions({ rxcui: "1991311" })
// → list of clinically significant interactions
Or via resource URI: resources/read({ uri: "pipeworx://rxnorm/concept/1991311/interactions" }).
Citation pattern
Embed in your output:
Ozempic (RxNorm 1991311) has 63,000 adverse-event reports in FAERS, 2 FDA approvals (2017 for type 2 diabetes, 2024 for cardiovascular risk reduction), and 104 active or recruiting clinical trials at ClinicalTrials.gov. Notable interaction class: insulin secretagogues — see interactions.
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 that orchestrates the full sequence including a structured executive summary.
Caveats
- Branded queries return SBD only. Searching “ozempic” returns Semantic Branded Drug concepts. To get the ingredient (semaglutide) RxCUI, run
rxnorm_search({name: "semaglutide"})separately. - Adverse-event totals are reports, not unique patients. A single hospitalization can generate multiple reports.
- Trial counts include all statuses. Filter
studies[].statusto “Recruiting” / “Active, not recruiting” for active research only.