OpenFDA Example Prompts for AI Agents¶
This document provides example prompts that demonstrate effective use of BioMCP's OpenFDA integration for various precision oncology use cases.
Drug Safety Assessment¶
Basic Safety Profile¶
What are the most common adverse events reported for pembrolizumab?
Include both serious and non-serious events.
Expected BioMCP Usage:
think
- Plan safety assessment approachopenfda_adverse_searcher(drug="pembrolizumab", limit=50)
- Analyze and summarize top reactions
Comparative Safety Analysis¶
Compare the adverse event profiles of imatinib and dasatinib for CML treatment.
Focus on serious events and their frequencies.
Expected BioMCP Usage:
think
- Plan comparative analysisopenfda_adverse_searcher(drug="imatinib", serious=True)
openfda_adverse_searcher(drug="dasatinib", serious=True)
- Compare and contrast findings
Drug Interaction Investigation¶
A patient on warfarin needs to start erlotinib for NSCLC. What drug interactions
and adverse events should we monitor based on FDA data?
Expected BioMCP Usage:
think
- Consider interaction risksopenfda_label_searcher(name="erlotinib")
- Check drug interactions sectionopenfda_adverse_searcher(drug="erlotinib", reaction="bleeding")
openfda_adverse_searcher(drug="erlotinib", reaction="INR")
Treatment Planning¶
Indication Verification¶
Is trastuzumab deruxtecan FDA-approved for HER2-low breast cancer?
What are the specific approved indications?
Expected BioMCP Usage:
think
- Plan indication searchopenfda_label_searcher(name="trastuzumab deruxtecan")
openfda_label_getter(set_id="...")
- Get full indications section- Extract and summarize approved uses
Contraindication Screening¶
Patient has severe hepatic impairment. Which targeted therapy drugs for
melanoma have contraindications or warnings for liver dysfunction?
Expected BioMCP Usage:
think
- Identify melanoma drugs to checkopenfda_label_searcher(indication="melanoma")
- For each drug:
openfda_label_getter(set_id="...", sections=["contraindications", "warnings_and_precautions"])
- Summarize liver-related contraindications
Dosing Guidelines¶
What is the FDA-recommended dosing for osimertinib in EGFR-mutated NSCLC,
including dose modifications for adverse events?
Expected BioMCP Usage:
think
- Plan dosing information retrievalopenfda_label_searcher(name="osimertinib")
openfda_label_getter(set_id="...", sections=["dosage_and_administration", "dose_modifications"])
- Extract dosing guidelines
Device Reliability Assessment¶
Genomic Test Reliability¶
What adverse events have been reported for NGS-based cancer diagnostic devices?
Show me any false positive or accuracy issues.
Expected BioMCP Usage:
think
- Consider test reliability factorsopenfda_device_searcher(genomics_only=True, limit=25)
- Get all genomic device eventsopenfda_device_searcher(problem="false positive", genomics_only=True)
openfda_device_searcher(problem="accuracy", genomics_only=True)
- For significant events:
openfda_device_getter(mdr_report_key="...")
Note: The FDA database uses abbreviated names (e.g., "F1CDX" instead of "FoundationOne CDx").
For specific devices, try: openfda_device_searcher(device="F1CDX")
or search by key terms.
Laboratory Equipment Issues¶
Our lab uses Illumina sequencers. What device malfunctions have been
reported that could impact our genomic testing workflow?
Expected BioMCP Usage:
think
- Assess potential workflow impactsopenfda_device_searcher(manufacturer="Illumina", genomics_only=True)
- Analyze problem patterns
openfda_device_getter(mdr_report_key="...")
for critical issues
Comprehensive Drug Evaluation¶
New Drug Assessment¶
Provide a comprehensive safety and efficacy profile for sotorasib (Lumakras)
including FDA approval, indications, major warnings, and post-market adverse events.
Expected BioMCP Usage:
think
- Plan comprehensive assessmentdrug_getter("sotorasib")
- Basic drug infoopenfda_label_searcher(name="sotorasib")
openfda_label_getter(set_id="...")
- Full labelopenfda_adverse_searcher(drug="sotorasib", serious=True)
trial_searcher(interventions=["sotorasib"])
- Ongoing trials
Risk-Benefit Analysis¶
For a 75-year-old patient with metastatic melanoma, analyze the risk-benefit
profile of nivolumab plus ipilimumab combination therapy based on FDA data.
Expected BioMCP Usage:
think
- Structure risk-benefit analysisopenfda_label_searcher(name="nivolumab")
openfda_label_searcher(name="ipilimumab")
openfda_label_getter(set_id="...", sections=["geriatric_use", "warnings_and_precautions"])
openfda_adverse_searcher(drug="nivolumab", serious=True)
openfda_adverse_searcher(drug="ipilimumab", serious=True)
Special Populations¶
Pregnancy Considerations¶
Which FDA-approved lung cancer treatments have pregnancy category data
or specific warnings for pregnant patients?
Expected BioMCP Usage:
think
- Plan pregnancy safety searchopenfda_label_searcher(indication="lung cancer")
- For each drug:
openfda_label_getter(set_id="...", sections=["pregnancy", "use_in_specific_populations"])
- Compile pregnancy categories and warnings
Pediatric Oncology¶
What FDA-approved indications and safety data exist for using
checkpoint inhibitors in pediatric cancer patients?
Expected BioMCP Usage:
think
- Identify checkpoint inhibitorsopenfda_label_searcher(name="pembrolizumab")
openfda_label_getter(set_id="...", sections=["pediatric_use"])
openfda_adverse_searcher(drug="pembrolizumab")
- Filter for pediatric if possible- Repeat for other checkpoint inhibitors
Complex Queries¶
Multi-Drug Regimen Safety¶
Analyze potential safety concerns for the FOLFOX chemotherapy regimen
(5-FU, leucovorin, oxaliplatin) based on FDA adverse event data.
Expected BioMCP Usage:
think
- Plan multi-drug analysisopenfda_adverse_searcher(drug="fluorouracil")
openfda_adverse_searcher(drug="leucovorin")
openfda_adverse_searcher(drug="oxaliplatin")
- Identify overlapping toxicities
openfda_label_searcher(name="oxaliplatin")
- Check for combination warnings
Biomarker-Driven Treatment Selection¶
For a patient with BRAF V600E mutant melanoma with brain metastases,
what FDA-approved treatments are available and what are their CNS-specific
efficacy and safety considerations?
Expected BioMCP Usage:
think
- Structure biomarker-driven searcharticle_searcher(genes=["BRAF"], variants=["V600E"], diseases=["melanoma"])
openfda_label_searcher(indication="melanoma")
- For BRAF inhibitors:
openfda_label_getter(set_id="...", sections=["clinical_studies", "warnings_and_precautions"])
openfda_adverse_searcher(drug="dabrafenib", reaction="seizure")
openfda_adverse_searcher(drug="vemurafenib", reaction="brain")
Treatment Failure Analysis¶
A patient's lung adenocarcinoma progressed on osimertinib. Based on FDA data,
what are the documented resistance mechanisms and alternative approved treatments?
Expected BioMCP Usage:
think
- Analyze resistance and alternativesopenfda_label_getter(set_id="...", sections=["clinical_studies"])
for osimertinibarticle_searcher(genes=["EGFR"], keywords=["resistance", "osimertinib"])
openfda_label_searcher(indication="non-small cell lung cancer")
trial_searcher(conditions=["NSCLC"], keywords=["osimertinib resistant"])
Safety Monitoring¶
Post-Market Surveillance¶
Have there been any new safety signals for CDK4/6 inhibitors
(palbociclib, ribociclib, abemaciclib) in the past year?
Expected BioMCP Usage:
think
- Plan safety signal detectionopenfda_adverse_searcher(drug="palbociclib", limit=100)
openfda_adverse_searcher(drug="ribociclib", limit=100)
openfda_adverse_searcher(drug="abemaciclib", limit=100)
- Analyze for unusual patterns or frequencies
Rare Adverse Event Investigation¶
Investigate reports of pneumonitis associated with immune checkpoint inhibitors.
Which drugs have the highest frequency and what are the typical outcomes?
Expected BioMCP Usage:
think
- Structure pneumonitis investigationopenfda_adverse_searcher(drug="pembrolizumab", reaction="pneumonitis")
openfda_adverse_searcher(drug="nivolumab", reaction="pneumonitis")
openfda_adverse_searcher(drug="atezolizumab", reaction="pneumonitis")
- Compare frequencies and outcomes
openfda_adverse_getter(report_id="...")
for severe cases
Quality Assurance¶
Diagnostic Test Validation¶
What quality issues have been reported for liquid biopsy ctDNA tests
that could affect treatment decisions?
Expected BioMCP Usage:
think
- Identify quality factorsopenfda_device_searcher(device="liquid biopsy", genomics_only=True)
openfda_device_searcher(device="ctDNA", genomics_only=True)
openfda_device_searcher(device="circulating tumor", genomics_only=True)
- Analyze failure modes
Tips for Effective Prompts¶
- Be specific about the data needed: Specify if you want adverse events, labels, or device data
- Include relevant filters: Mention if focusing on serious events, specific populations, or genomic devices
- Request appropriate analysis: Ask for comparisons, trends, or specific data points
- Consider multiple data sources: Combine OpenFDA with literature and trial data for comprehensive answers
- Include time frames when relevant: Though OpenFDA doesn't support date filtering in queries, you can ask for analysis of recent reports
Integration Examples¶
Combining with Literature Search¶
Find FDA adverse events for venetoclax in CLL, then search for published
case reports that provide more clinical context for the most serious events.
Combining with Clinical Trials¶
What adverse events are reported for FDA-approved CAR-T therapies, and how
do these compare to adverse events being monitored in current clinical trials?
Combining with Variant Data¶
For patients with RET fusion-positive cancers, what FDA-approved targeted
therapies are available and what are their mutation-specific response rates?
Using Your OpenFDA API Key¶
The OpenFDA API has rate limits: 40 requests/minute without a key, or 240 requests/minute with a key. You can get a free API key at https://open.fda.gov/apis/authentication/
Method 1: Include API Key in Your Prompt¶
You can provide your API key directly in your conversation with the AI:
My OpenFDA API key is: YOUR_API_KEY_HERE
Search for all serious adverse events reported for pembrolizumab in the last year.
Include both death and hospitalization events.
Using my OpenFDA API key YOUR_API_KEY_HERE, compare the safety profiles of
all FDA-approved BRAF inhibitors for melanoma treatment.
I have an OpenFDA API key: YOUR_API_KEY_HERE
Analyze device malfunction reports for all NGS-based cancer diagnostic tests.
Focus on false positive and false negative results that could impact treatment decisions.
Method 2: Set Environment Variable (Recommended for Regular Use)¶
If you're using BioMCP regularly, set the environment variable once:
Then your prompts don't need to include the key:
Retrieve the complete FDA label for trastuzumab deruxtecan, including all
warnings and contraindications for HER2-low breast cancer patients.
Method 3: CLI Usage with API Key¶
When using the BioMCP CLI directly:
# Pass API key as parameter
biomcp openfda adverse search --drug pembrolizumab --serious --api-key YOUR_API_KEY_HERE
# Or set environment variable first
export OPENFDA_API_KEY="YOUR_API_KEY_HERE"
biomcp openfda device search --manufacturer Illumina --genomics-only
Example Prompts with API Key¶
Comprehensive Drug Safety Analysis¶
My OpenFDA API key is: YOUR_API_KEY_HERE
Perform a comprehensive safety analysis of sotorasib (Lumakras) including:
1. All serious adverse events from post-market surveillance
2. Complete FDA label with all sections
3. Any device issues if it's a companion diagnostic drug
4. Compare its safety profile to other KRAS G12C inhibitors if available
This is for a clinical review, so I need detailed data from all available FDA sources.
Large-Scale Adverse Event Analysis¶
Using my OpenFDA API key YOUR_API_KEY_HERE, analyze adverse events for all
FDA-approved checkpoint inhibitors (pembrolizumab, nivolumab, atezolizumab,
durvalumab, avelumab, cemiplimab).
For each drug:
- Get the top 20 most frequent adverse events
- Identify immune-related adverse events
- Check for any black box warnings in their labels
- Note any fatal events
This requires many API calls, so please use my API key for higher rate limits.
Multi-Device Comparison¶
I have an OpenFDA API key: YOUR_API_KEY_HERE
Compare all FDA adverse event reports for NGS-based companion diagnostic devices
from major manufacturers (Foundation Medicine, Guardant Health, Tempus, etc.).
Focus on:
- Test failure rates
- Sample quality issues
- False positive/negative reports
- Software-related problems
This analysis requires querying multiple device records, so the API key will help
avoid rate limiting.
Batch Label Retrieval¶
My OpenFDA API key is YOUR_API_KEY_HERE.
Retrieve the complete FDA labels for all CDK4/6 inhibitors (palbociclib,
ribociclib, abemaciclib) and extract:
- Approved indications
- Dose modifications for adverse events
- Drug-drug interactions
- Special population considerations
Then create a comparison table of their safety profiles and dosing guidelines.
When to Provide an API Key¶
You should provide your API key when:
- Performing large-scale analyses requiring many API calls
- Conducting comprehensive safety reviews across multiple drugs/devices
- Running batch operations like comparing multiple products
- Doing rapid iterative searches that might hit rate limits
- Performing systematic reviews requiring extensive data retrieval
API Key Security Notes¶
- Never share your actual API key in public forums or repositories
- The AI will use your key only for the current session
- Keys passed as parameters override environment variables
- The FDA API key is free and can be regenerated if compromised
Important Notes¶
- Always expect the AI to use the
think
tool first for complex queries - The AI should include appropriate disclaimers about adverse events not proving causation
- Results are limited by FDA's data availability and reporting patterns
- The AI should suggest when additional data sources might provide complementary information
- With an API key, you can make 240 requests/minute vs 40 without
Known Limitations¶
Drug Shortage Data¶
Important: The FDA does not currently provide a machine-readable API for drug shortage data. The shortage search tools will return an informative message directing users to the FDA's web-based shortage database. This is a limitation of FDA's current data infrastructure, not a bug in BioMCP.
Alternative resources for drug shortage information:
- FDA Drug Shortages Database: https://www.accessdata.fda.gov/scripts/drugshortages/
- ASHP Drug Shortages: https://www.ashp.org/drug-shortages/current-shortages
Other Limitations¶
- Device adverse event reports use abbreviated device names (e.g., "F1CDX" instead of "FoundationOne CDx")
- Adverse event reports represent voluntary submissions and may not reflect true incidence rates
- Recall information may have a delay of 24-48 hours from initial FDA announcement